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?
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 thepylsp.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!