jedi-language-server icon indicating copy to clipboard operation
jedi-language-server copied to clipboard

Make `textDocument/documentSymbol` ignore imported symbols

Open niqodea opened this issue 2 years ago • 0 comments

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!

niqodea avatar Oct 19 '23 23:10 niqodea