liuchengxu / vista.vim

:cactus: Viewer & Finder for LSP symbols and tags
https://liuchengxu.github.io/vista.vim
MIT License
1.88k stars 89 forks source link

Try initial run for the nearest function on startup #403

Closed liuchengxu closed 3 years ago

liuchengxu commented 3 years ago

Close #402

Frederick888 commented 3 years ago

This fixed ctags but not coc.nvim. When using coc as default executive, still b:vista_nearest_method_or_function is only available after :Vista.

liuchengxu commented 3 years ago

It was expected to work with coc.nvim too, but the problem of coc.nvim is seemingly not as trivial as the one of ctags, as an LSP plugin, it's much more complex than the CLI calling. I'm not sure I have more time/interest to dig into this as I use ctags the default executive :P.

Frederick888 commented 3 years ago

@liuchengxu That's ok since others should probably also use b:coc_current_function if they want this from coc.nvim.

If for some reason they really need coc.vim function name from vista.vim, a suboptimal solution could be:

autocmd User CocStatusChange call vista#RunForNearestMethodOrFunction()
luong-komorebi commented 3 years ago

i m curious why this is not merged ?

liuchengxu commented 3 years ago

@luong-komorebi Thanks for the reminder, I almost forget this one :P. It's fine to merge this, at least it fixes the problem for ctags.