summaryrefslogtreecommitdiffstats
path: root/plugin
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
commit666114978ef4307b30087beb40aee64e9a1fd963 (patch)
tree0fb247767a298a7940cf1ffb067d6787a79e117d /plugin
parente27a1f8e747f557c3401da5e68d0087aa87a9603 (diff)
downloadnvim-config-666114978ef4307b30087beb40aee64e9a1fd963.tar.gz
nvim-config-666114978ef4307b30087beb40aee64e9a1fd963.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 'plugin')
-rw-r--r--plugin/50-fzf-lua.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/plugin/50-fzf-lua.lua b/plugin/50-fzf-lua.lua
new file mode 100644
index 0000000..9e86ed1
--- /dev/null
+++ b/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" })