summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.config/nvim/plugin/50-fzf-lua.lua21
-rwxr-xr-x.local/bin/dotfiles2
2 files changed, 23 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" })
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