Coc.nvim: Possible to jump to symbol under cursor?

Created on 9 Apr 2019  路  5Comments  路  Source: neoclide/coc.nvim

Trying to get symbols to work with what I am currently hovered on (if anything).

nnoremap <silent> <c-s> :<C-u>CocList -I symbols expand("<cword>")<CR>

This works in other remapping for other plugins, but this seems to never be expanded. Any ideas?

Most helpful comment

You should use command like:

nnoremap <silent> <c-s>  :exe 'CocList -I --normal --input='.expand('<cword>').' symbols'<CR>

All 5 comments

What's problem with goto deifinition?

For some reason in my PHP/Laravel project, it does not pick up go to definition on any symbol.

image

But manually searching for the symbol works fine:

image

You should use command like:

nnoremap <silent> <c-s>  :exe 'CocList -I --normal --input='.expand('<cword>').' symbols'<CR>

Works perfectly. Just improved my workflow massively, thank you.

You should use command like:

nnoremap <silent> <c-s>  :exe 'CocList -I --normal --input='.expand('<cword>').' symbols'<CR>

is there any way to accept the item from the resulting list without hitting again ? @chemzqm

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zhou13 picture zhou13  路  3Comments

LinArcX picture LinArcX  路  4Comments

npearson72 picture npearson72  路  3Comments

andys8 picture andys8  路  3Comments

svenstaro picture svenstaro  路  4Comments