summaryrefslogtreecommitdiffstats
path: root/.config/nvim/plugin/50-fzf-lua.lua
diff options
context:
space:
mode:
authorThomas Vanbesien <tvanbesi@proton.me>2026-05-19 20:15:33 +0200
committerThomas Vanbesien <tvanbesi@proton.me>2026-05-19 20:16:55 +0200
commit44623eda3dbb7eb230d24495d9b8115fcd2bc9e0 (patch)
tree23542a5594893df6b9266d8a7fcedde500739d3d /.config/nvim/plugin/50-fzf-lua.lua
parent35bee2f832850529df5391c654d253db89afd131 (diff)
downloaddotfiles-44623eda3dbb7eb230d24495d9b8115fcd2bc9e0.tar.gz
dotfiles-44623eda3dbb7eb230d24495d9b8115fcd2bc9e0.zip
feat(nvim): add fzf-lua fuzzy finder
- plugin/50-fzf-lua.lua: vim.pack fzf-lua + nvim-web-devicons, default setup(), <Leader>f* keymaps (files/live_grep/buffers/helptags/resume) - dotfiles sync: declare fd + ripgrep, the fzf-lua files/live_grep providers (rg already present, fd to be installed on next sync)
Diffstat (limited to '.config/nvim/plugin/50-fzf-lua.lua')
-rw-r--r--.config/nvim/plugin/50-fzf-lua.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/.config/nvim/plugin/50-fzf-lua.lua b/.config/nvim/plugin/50-fzf-lua.lua
new file mode 100644
index 0000000..9e86ed1
--- /dev/null
+++ b/.config/nvim/plugin/50-fzf-lua.lua
@@ -0,0 +1,21 @@
+--
+-- Fuzzy finder configuration (files, grep, buffers, help)
+--
+-- See https://github.com/ibhagwan/fzf-lua
+-- Uses the `fzf` binary, `rg` for grep, `fd` for the files provider and `bat`
+-- for previews -- all installed by `dotfiles sync`.
+
+vim.pack.add({
+ "https://github.com/nvim-tree/nvim-web-devicons", -- File-type icons (also used by lualine)
+ "https://github.com/ibhagwan/fzf-lua",
+})
+
+local fzf = require("fzf-lua")
+
+fzf.setup({})
+
+vim.keymap.set("n", "<Leader>ff", fzf.files, { desc = "Find files" })
+vim.keymap.set("n", "<Leader>fg", fzf.live_grep, { desc = "Find by grep (live)" })
+vim.keymap.set("n", "<Leader>fb", fzf.buffers, { desc = "Find buffers" })
+vim.keymap.set("n", "<Leader>fh", fzf.helptags, { desc = "Find help tags" })
+vim.keymap.set("n", "<Leader>fr", fzf.resume, { desc = "Resume last picker" })