ALEFindReferences: add -fzf flag to show output in fzf#5018
ALEFindReferences: add -fzf flag to show output in fzf#5018hsanson merged 2 commits intodense-analysis:masterfrom
Conversation
w0rp
left a comment
There was a problem hiding this comment.
Seems like a decent idea to me for fzf users. You could move the fzf specific code to an autoload/ale/fzf.vim script so it's only loaded on demand. You could edit the HandleLSPResponse function back to how it was without the early return as it was fine how it was and we don't need such a big diff.
autoload/ale/references.vim
Outdated
| \) | ||
| endfor | ||
| function! ale#references#ShowInFzf(item_list, options) abort | ||
| let name = "LSP References" |
There was a problem hiding this comment.
Use the l: variable prefix for local variables to be consistent with the rest of the code.
There was a problem hiding this comment.
Right, done in the latest force push
10c1594 to
9cdd54b
Compare
|
Thanks for the review @w0rp. I finally had some time to get back to this. In the last force push:
The only thing that's missing is unit tests, which I'm not really sure how to handle at this point. I've been using this for the past few months and I think it works ok, maybe we can add it for now and then iterate some more. edit: I also added docs and squashed commits |
9cdd54b to
f7f225a
Compare
67038d4 to
b649b6c
Compare
Allows using -fzf to show previews using fzf.vim. Includes: - add support for opening in bufers, splits, tabs and for adding matches quickfix - add support for -relative - add fzf preview `--highlight-line` option - add fzf.vim autoload module
hsanson
left a comment
There was a problem hiding this comment.
Thanks, looks like a very useful feature.
This adds
:ALEFindReferences -fzfto list/matches found by the LSP Server using fzf and fzf.vim.Enable this with. This is what's working:
fzf/fzf.vimHow to use this?
Either:
Set
g:ale_references_use_fzf = 1to havefzfbe the defaultALEFindreferencesmethodCall
AleFindReferences -fzf, for example I use:Demo
Here's what this looks like:
asciicast
Related: #2252, #3321, #5001