From 44623eda3dbb7eb230d24495d9b8115fcd2bc9e0 Mon Sep 17 00:00:00 2001 From: Thomas Vanbesien Date: Tue, 19 May 2026 20:15:33 +0200 Subject: feat(nvim): add fzf-lua fuzzy finder - plugin/50-fzf-lua.lua: vim.pack fzf-lua + nvim-web-devicons, default setup(), 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) --- .config/nvim/plugin/50-fzf-lua.lua | 21 +++++++++++++++++++++ .local/bin/dotfiles | 2 ++ 2 files changed, 23 insertions(+) create mode 100644 .config/nvim/plugin/50-fzf-lua.lua 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", "ff", fzf.files, { desc = "Find files" }) +vim.keymap.set("n", "fg", fzf.live_grep, { desc = "Find by grep (live)" }) +vim.keymap.set("n", "fb", fzf.buffers, { desc = "Find buffers" }) +vim.keymap.set("n", "fh", fzf.helptags, { desc = "Find help tags" }) +vim.keymap.set("n", "fr", fzf.resume, { desc = "Resume last picker" }) diff --git a/.local/bin/dotfiles b/.local/bin/dotfiles index d29f4fe..ae97ce8 100755 --- a/.local/bin/dotfiles +++ b/.local/bin/dotfiles @@ -90,6 +90,8 @@ sync) bash # shell bash-completion # collection of bash completions fzf # fuzzy finder + fd # fast file finder (fzf-lua files provider) + ripgrep # fast grep (fzf-lua live_grep provider) ranger glib2 # file explorer (and dependency) bat # syntax highlighter python-pipx # Python apps environment -- cgit v1.3.1