diff options
| author | Thomas Vanbesien <tvanbesi@proton.me> | 2026-06-13 00:28:08 +0200 |
|---|---|---|
| committer | Thomas Vanbesien <tvanbesi@proton.me> | 2026-06-13 00:40:07 +0200 |
| commit | cf8ceeb3210cd446533b798b22f0f5eada954207 (patch) | |
| tree | c4c8519377850ceb7244ec300699d0f6789230ad /.config/nvim/plugin/50-fzf.lua | |
| parent | 036db1dd17978719d31179550622339afde76c60 (diff) | |
| download | dotfiles-cf8ceeb3210cd446533b798b22f0f5eada954207.tar.gz dotfiles-cf8ceeb3210cd446533b798b22f0f5eada954207.zip | |
docs(nvim): edit comments
Diffstat (limited to '.config/nvim/plugin/50-fzf.lua')
| -rw-r--r-- | .config/nvim/plugin/50-fzf.lua | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/.config/nvim/plugin/50-fzf.lua b/.config/nvim/plugin/50-fzf.lua index e0c4ce3..e57d95a 100644 --- a/.config/nvim/plugin/50-fzf.lua +++ b/.config/nvim/plugin/50-fzf.lua @@ -1,7 +1,14 @@ -- --- Fuzzy finder configuration (files, grep, buffers, help) +-- 50-fzf.lua -- --- See https://github.com/ibhagwan/fzf-lua +-- * Configures fzf. +-- +-- Keymaps: +-- `<Leader>ff`: File picker +-- `<Leader>fg`: Grep picker +-- `<Leader>fb`: Buffer picker +-- `<Leader>fh`: Help tag picker +-- `<Leader>fr`: Resume last picker -- Avoid conflicts with the already existing fzf configuration at ~/.config/fzf/fzf.bash vim.env.FZF_DEFAULT_OPTS = nil @@ -32,20 +39,19 @@ fzf.setup({ keymap = { fzf = { true, -- inherit defaults - ["tab"] = "down", -- navigate instead of fzf's default toggle + ["tab"] = "down", ["btab"] = "up", - ["ctrl-y"] = "toggle", -- multi-select toggle (tab no longer does it) + ["ctrl-y"] = "toggle", }, builtin = { true, -- inherit defaults - ["<M-/>"] = "toggle-preview", -- show/hide preview - ["<C-n>"] = "preview-half-page-down", -- scroll preview (Ctrl-j/k navigate) + ["<M-/>"] = "toggle-preview", + ["<C-n>"] = "preview-half-page-down", ["<C-p>"] = "preview-half-page-up", }, }, actions = { - files = { true, ["alt-y"] = copy_to_clipboard }, -- files + live_grep - buffers = { true, ["alt-y"] = copy_to_clipboard }, + files = { true, ["alt-y"] = copy_to_clipboard }, }, -- Sticky footer of keybinding hints, like --footer in ~/.config/fzf/fzf.bash. fzf_opts = { @@ -57,6 +63,8 @@ fzf.setup({ }, }) +---------------------------------------------------------------------------------------------------- + vim.keymap.set("n", "<Leader>ff", fzf.files, { desc = "Fuzzy-find files" }) vim.keymap.set("n", "<Leader>fg", fzf.live_grep, { desc = "Fuzzy-find files content" }) vim.keymap.set("n", "<Leader>fb", fzf.buffers, { desc = "Fuzzy-find buffers" }) |
