Skip to content
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

Make textDocument/documentSymbol ignore imported symbols #288

Open
niqodea opened this issue Oct 19, 2023 · 0 comments
Open

Make textDocument/documentSymbol ignore imported symbols #288

niqodea opened this issue Oct 19, 2023 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@niqodea
Copy link

niqodea commented Oct 19, 2023

When requesting textDocument/documentSymbol, jedi-language-server always includes symbols in import statements. This is different from pyright, which instead ignores these symbols when providing the result, and python-lsp-server, which lets you select the behavior based on the pylsp.plugins.jedi_symbols.include_import_symbols option.

I think that pyright's behavior is more useful when it comes to the use case of simply visualizing symbols in neovim's quickfix list or in aerial.nvim. Including import symbols bloats the top of the list with unnecessary information.

Would it be possible to include a flag in the same vein of python-lsp-server to only return symbols defined in the file?

Thank you!

@pappasam pappasam added help wanted Extra attention is needed enhancement New feature or request labels Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants