find-references on a definition should be find-uses (not include self)
Summary
x = 1
print(x)
If you find-references on the second x it goes to the first (good!) If you find-references on the first x it shows both itself and the second (bad, not helpful, should only be the second).
Version
No response
Oh wild we actually support this distinction but it's something the client tells us which it wants?
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#referenceContext
This problem affects PyCharm, where the default find usages shortcut doesn't work, but "find usages" from the menu does, which then shows two options, the current line and column as well sa the real find usages dialog the user wants.
If you find-references on the first x it shows both itself and the second (bad, not helpful, should only be the second).
This is also what pylance and rust analyzer does. So I'm not sure if this is indeed entirely undesired.
Same if you do find references on a function, r-a returns the function as well as all uses.
Hmm is cmd+click a different API than "find-references"? Or maybe it's one of those "they query a bunch of different ones with fallback" situtations?