LeaderF icon indicating copy to clipboard operation
LeaderF copied to clipboard

[Feature request] support goto definition and find reference providing by LSP

Open xaljer opened this issue 4 years ago • 2 comments

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

xaljer avatar Jan 23 '20 05:01 xaljer

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

xaljer avatar Apr 19 '20 02:04 xaljer

👍

Leandros avatar Dec 14 '21 08:12 Leandros