Closed
Description
textDocument/documentSymbol
returns an empty result for non-existing files even though Jedi does provide symbol information. The culprit us the following code:
python-lsp-server/pylsp/plugins/symbols.py
Lines 94 to 99 in 0c76a52
This can reproduced by creating a new file in Spyder: No symbol information is available in the Symbols Switcher and Outline plugin as long as the file is not saved¹. Code folding and linting does work.
¹ Note: Saving the new file is not sufficient to fix the issue in Spyder <= 5.4.0 due an another unrelated bug. See spyder/spyder-ide#20047.
EDIT: Formatting