-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there an easy way to configure actions of all providers that deal with files? #279
Comments
Unfortinately there's no easy way to configure all the default actions in one go, tehcnically they all "inherit" from That said, this is lua and everything is easy, you can "hack" your way to do what you want in a couple of lines: local actions = require'fzf-lua.actions'
-- incase you want to use it somwhere
local old_file_edit_or_qf = actions.file_edit_or_qf
actions.file_edit_or_qf = actions.file_edit |
Did you try this? Because it doesn't work for me. Anyway, if we're talking hacks, the best thing I could come up with is: local fzf_lua_config = require('fzf-lua.config')
local actions = require('fzf-lua.actions')
fzf_lua_config.globals.files.actions.default = actions.file_edit But I'm afraid that as it relies a bit on fzf-lua's internals it might get broken one day by an update. Anyway I guess I'll use this for now, but if you ever get to it it would be nice to have a proper way to configure this. And in any case thanks for replying quickly :) |
I did not try :-)
I have no plan on changing this anytime soon, this is a good enough "hack" IMO. If I get inspired I might add a "global" action table, but that would require some other changes as there's already loads of configuration options as is. |
See #331, all you need to do one is delete all the individual provider action tables and use this instead: require 'fzf-lua'.setup({
actions = {
files = {
["default"] = actions.file_edit,
["ctrl-s"] = actions.file_split,
["ctrl-v"] = actions.file_vsplit,
["ctrl-t"] = actions.file_tabedit,
["alt-q"] = actions.file_sel_to_qf,
},
},
}) |
I want to configure the default action to always open multiple selections in multiple buffers, and never in a quickfix list. Is there an easy way to configure this for all providers?
From what I understand, the way I would have to go to do this is to configure this explicitly for each of the providers, or am I wrong? Is there a way to change the "default" actions?
The text was updated successfully, but these errors were encountered: