fzf-lsp.nvim
fzf-lsp.nvim copied to clipboard
call lua function in actions
I was wondering if its possible to add functionality where we can set a lua function to be called instead of a vim cmd using g.fzf_lsp_actions
?
I have a custom qf list populating method in lua, which I use along with fzf.vim
and a couple of custom LSP handlers. It would be great if I can get the same behavior with the qflist made by fzf-lsp
.
Right now with the current setup is not possible, but it should be easy to add. Let me check if i understand correctly, you want to do something like: viml version
let g:fzf_lsp_action = {
'ctrl-t': luaeval("my_custom_action_fn")
}
lua version
vim.g.fzf_lsp_action = {
"ctrl-t" = my_custom_fn,
}
with my_custom_fn
be like:
local function my_custom_fn(fzf_lines) -- fzf_lines is lua table containing all the selected lines
-- ...
end
Is this what are you looking for?
yes, this is exactly what im talking about. I think it would be a great addition to this plugin, and allow its users to get more creative with handling the selected entries from FZF.