-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code lens "recent change" shows on every Python import statement that imports a Class or Function SymbolKind #371
Comments
Awesome product, by the way! I love it. |
Unfortunately right now I don't think there is much I can do to address this. Although once microsoft/vscode#34968 lands I might be in a better position to be able to address this issue depending on the data provided by the language service and how abstract it can be. Thanks! 😄 |
I also had this issue but updating to VS Code (1.24.1) and Gitlens (8.4.0) seem to have fixed the issue. Thanks! |
I'm not sure why this changed -- maybe the python language service changed at the same time. @phillipdwright are you seeing this fixed as well? |
Err. Nevermind, this was fixed as part of #331 |
I don't believe this is resolved. #331 fixes this for imports of the form As a workaround, I have I have updated to VS Code 1.24.1 and GitLens 8.4.0. |
The only real option there is to use Maybe once microsoft/vscode#34968 lands and the language services provide more information, I can detect that those symbols are within an import and then suppress them |
microsoft/vscode#34968 has landed, but it doesn't seem to give what we would need (unless I'm misunderstanding something). I came to this issue because of a similar issue with @matklad's rust-analyzer, where there is recent changes for every simple |
microsoft/vscode#34968 didn't expose any more information to GitLens, but microsoft/vscode#57984 fixed that (which will be released when the vscode 1.28 ships). I have also made some changes in the next release of GitLens, to stop adding the authorship codelens unless the symbol spans more than 1 line -- which should help with this issue as well. |
Yeah - that change to stop one line recent changes is a good thing - that looks like it should fix it. Sorry to have bothered you! |
No bother at all -- your post prompted me to add the single line change! 😄 |
I'm going to close this, as I believe this has been addressed now. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Steps to Reproduce:
from X import Y
, where Y is a class or function. Eg.,62a7eaf removed these annotations for imports of the form
import X
orfrom X import Y
, whereY
is aSymbolKind.Module
, but they remain whenY
is any otherSymbolKind
. I know there are settings for disabling "recent change" Code lens annotations (gitlens.codeLens.recentChange.enabled
) and for disabling Code lens annotations altogether for differentSymbolKind
s, but this removes annotations that would be helpful elsewhere in the file.With added settings
the example above shows as follows:
Adding
"symbolScopes": ["!Module", "!Function", "!Class"]
to my settings would also remove helpful Code lens annotations on the class and function definitions in the file.Would it be possible to have Python import statements be treated differently for purposes of Code lens and only have annotations show up for
SymbolKind.File
on those lines?The text was updated successfully, but these errors were encountered: