symbols-outline.nvim
symbols-outline.nvim copied to clipboard
[BUG] Symbols from coc.nvim are not parsed properly
I'm using the latest symbols-outline.nvim with coc.nvim and get the following error messages when calling :SymbolsOutline:
...ols-outline.nvim/lua/symbols-outline/utils/lsp_utils.lua:45: attempt to index field 'location' (a nil value)
stack traceback:
^I...ols-outline.nvim/lua/symbols-outline/utils/lsp_utils.lua:45: in function 'get_selection_range'
^I...gged\symbols-outline.nvim/lua/symbols-outline/parser.lua:30: in function 'parse'
^I...vim\plugged\symbols-outline.nvim/lua/symbols-outline.lua:296: in function 'on_symbols'
^I...mbols-outline.nvim/lua/symbols-outline/providers/coc.lua:90: in function <...mbols-outline.nvim/lua/symbols-outline
/providers/coc.lua:89>
After some debugging, I found that it may be related to the returns of request_symbols function in coc.lua (link). The returned table cannot be resolved by the sort_symbols function in lsp_utils.lua.
Since I don't have nvim-lsp configured, I have no idea how to fix the request_symbols in coc.lua without a reference. I will be happy to create a PR if the return contents of other symbol provider are provided. Thanks.
@simrat39 can you please acknowledge this issue ? Symbols-Outline.nvim seems to be completely unusable when using CoC.nvim as the LSP client.
Thanks in advance !
Facing the same problem here. Any suggestions for a quick fix? Thanks in advance for your assistance!