Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

[BUG] Symbols from coc.nvim are not parsed properly #232

Open
neur1n opened this issue Jul 26, 2023 · 2 comments
Open

[BUG] Symbols from coc.nvim are not parsed properly #232

neur1n opened this issue Jul 26, 2023 · 2 comments

Comments

@neur1n
Copy link

neur1n commented Jul 26, 2023

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.

@adamency
Copy link

adamency commented Nov 4, 2023

@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 !

@wyg1997
Copy link

wyg1997 commented Nov 10, 2023

Facing the same problem here. Any suggestions for a quick fix?
Thanks in advance for your assistance!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants