neoclide / coc.nvim

Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
Other
24.33k stars 956 forks source link

When showing symbol references in CocList, add the function name where the symbol is found #2514

Closed shahar3000 closed 3 years ago

shahar3000 commented 3 years ago

When looking for a symbol, Similar to cscope, it would be great if the function name the symbol was found at would appear in the list of results, for example:

image

chemzqm commented 3 years ago

Can't understand.

shahar3000 commented 3 years ago

when using for example (coc-references) the location list shows lines in the format: <file_path>|<line_num> col <col_num>|<line>

the new format I propose is <file_path>|<line_num> col <col_num>|<<function_name>><line>

for example, this line: src/vsd/vsd-rsm.c |1251 col 11| wcommon->released = false; would become: src/vsd/vsd-rsm.c |1251 col 11| <rsm_st_dst_apply_log_tree_intent> wcommon->released = false;