-
Notifications
You must be signed in to change notification settings - Fork 282
Closed
Labels
help wantedLarger than "good first issue", but still well-defined and ready for someone to pick upLarger than "good first issue", but still well-defined and ready for someone to pick uplanguage-serverIssues specific to our IDE integration rather than type checkingIssues specific to our IDE integration rather than type checking
Description
Describe the Bug
Most LSPs support a parameter includeDeclaration when enumerating references which informs the LSP to include or exclude the symbol's declaration in its references. I prefer to have it off, but I don't seem to be able to do so with Pyrefly.
As a simple example, in the code
def foo() -> None:
...
foo()
foo()Opening the references in neovim shows the following:
foo.py|1 col 5-8| def foo() -> None:
foo.py|4 col 1-4| foo()
foo.py|5 col 1-4| foo()
I'd prefer it to show just the bottom 2 lines, but passing includeDeclaration = false to the native LSP interface doesn't seem to do it for me. This does work for me with other LSPs like rust-analyzer. The full command to test is
:lua vim.lsp.buf.references({ includeDeclaration = false })
Sandbox Link
(Only applicable for extension issues) IDE Information
$ nvim --version
NVIM v0.11.4
Build type: Release
LuaJIT 2.1.1741730670
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
help wantedLarger than "good first issue", but still well-defined and ready for someone to pick upLarger than "good first issue", but still well-defined and ready for someone to pick uplanguage-serverIssues specific to our IDE integration rather than type checkingIssues specific to our IDE integration rather than type checking