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
https://pyrefly.org/sandbox/?project=N4IgZglgNgpgziAXKOBDAdgEwEYHsAeAdAA4CeSImMYABGLrgBQCUNAtAHw0Byu6MiADroaomsQBOEdABdGg8AwXNhw%2BkxXp1LYSAA0IAK4zocEuUQgAxDQCqJqBBmk6h9AGMTfOKqzU6uBIAtqgyAProhkHYMBKM%2BIg00jKsnDRwMhJCImISMDKGEiJgCtxRMVk0wPgAvgq6BmR5YFCkhDK4QVAUNgAKpM2t6Rg4BDTufJAA5oWhEHyEwjYAyjAwNAAWMjLEcIgA9PtN1K2EgVP7MOj7mLjucPsTWhAzEnN8%2BwESNKgAbqjQVDYWDjSYvWZeES4YiQszCMgyDZ8Ni-WJweYiAC8NAUAGZCABGABM9XQIBqBlQnggqIAYtAYBQ0Fg8EQyOSgA
(Only applicable for extension issues) IDE Information
$ nvim --version
NVIM v0.11.4
Build type: Release
LuaJIT 2.1.1741730670
Describe the Bug
Most LSPs support a parameter
includeDeclarationwhen 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
Opening the references in neovim shows the following:
I'd prefer it to show just the bottom 2 lines, but passing
includeDeclaration = falseto 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 isSandbox Link
https://pyrefly.org/sandbox/?project=N4IgZglgNgpgziAXKOBDAdgEwEYHsAeAdAA4CeSImMYABGLrgBQCUNAtAHw0Byu6MiADroaomsQBOEdABdGg8AwXNhw%2BkxXp1LYSAA0IAK4zocEuUQgAxDQCqJqBBmk6h9AGMTfOKqzU6uBIAtqgyAProhkHYMBKM%2BIg00jKsnDRwMhJCImISMDKGEiJgCtxRMVk0wPgAvgq6BmR5YFCkhDK4QVAUNgAKpM2t6Rg4BDTufJAA5oWhEHyEwjYAyjAwNAAWMjLEcIgA9PtN1K2EgVP7MOj7mLjucPsTWhAzEnN8%2BwESNKgAbqjQVDYWDjSYvWZeES4YiQszCMgyDZ8Ni-WJweYiAC8NAUAGZCABGABM9XQIBqBlQnggqIAYtAYBQ0Fg8EQyOSgA
(Only applicable for extension issues) IDE Information