From 7578ca5ed6cfd177bd965c14d7e8f9a7c2820d29 Mon Sep 17 00:00:00 2001 From: Sirisak Lueangsaksri <1087399+spywhere@users.noreply.github.com> Date: Thu, 21 Mar 2024 16:27:56 +0700 Subject: [PATCH] refactor(nvim): custom bindings for fzf --- configs/nvim/lua/plugin/navigation/fzf.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/configs/nvim/lua/plugin/navigation/fzf.lua b/configs/nvim/lua/plugin/navigation/fzf.lua index 509cade..2907e3d 100644 --- a/configs/nvim/lua/plugin/navigation/fzf.lua +++ b/configs/nvim/lua/plugin/navigation/fzf.lua @@ -8,6 +8,7 @@ registry.install { 'nvim-tree/nvim-web-devicons' }, config = function () + local actions = require('fzf-lua.actions') require('fzf-lua').setup { winopts = { height = 0.9, @@ -31,6 +32,17 @@ registry.install { fzf = { ['ctrl-u'] = 'half-page-up', ['ctrl-d'] = 'half-page-down', + ['ctrl-a'] = 'beginning-of-line', + ['ctrl-e'] = 'end-of-line', + } + }, + actions = { + files = { + ['default'] = actions.file_edit_or_qf, + ['ctrl-s'] = actions.file_split, + ['ctrl-v'] = actions.file_vsplit, + ['ctrl-t'] = actions.file_tabedit, + ['ctrl-q'] = actions.file_sel_to_qf } } }