LeaderF
LeaderF copied to clipboard
[Feature request] support goto definition and find reference providing by LSP
Describe your question, feature request, or bug.
operations provided by Leaderf gtags are very common for viewing source code, and sometimes LSP is also good choice which can provide those information. But, using LSP in other plugin, we can not get consistent experience of Leaderf. Would you like to support LSP in Leaderf? or can get information like reference from other LSP plugin? If does, leaderf can query from two sources (gtags and LSP) and show the other one when one getting nothing. For goto definition, can Leaderf gtags return a number of definition now? which can co-work with other LSP plugin under a single key binding. (i found gtags can't goto member definition of a struct).
Steps to reproduce
Actual behaviour
Expected behaviour
I found a method to combine goto definition of coc.nvim and Leaderf together:
function! s:GoToImplementation()
if CocAction('jumpImplementation')
return v:true
endif
if CocAction('jumpDefinition')
return v:true
endif
execute(printf("Leaderf! gtags --auto-jump -d %s", expand("<cword>")))
endfunction
👍