Add fzf-lua for project navigation
Wraps the fzf binary already installed via brew, alongside rg and fd, so it needs no plugin dependencies - unlike telescope, which would also pull in plenary. Picks up nvim-web-devicons for file icons, which is the first thing actually using that plugin. Maps live under <leader>f: files, live grep, buffers, grep the word under the cursor, and help tags. The intent is to stop treating netrw as the way into a project and switch to jumping by name, leaving buffers open and bouncing between them, rather than quitting out of nvim to change file. Netrw is untouched and still on :Ex for browsing an unfamiliar tree. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e8e9bf0663
commit
865b52c2e5
4 changed files with 21 additions and 0 deletions
15
neovim/config/plugins/fzf-lua.lua
Normal file
15
neovim/config/plugins/fzf-lua.lua
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
vim.pack.add({ 'https://github.com/ibhagwan/fzf-lua' })
|
||||
|
||||
local fzf = require('fzf-lua')
|
||||
|
||||
fzf.setup()
|
||||
|
||||
local function map(lhs, rhs, desc)
|
||||
vim.keymap.set('n', lhs, rhs, { desc = desc })
|
||||
end
|
||||
|
||||
map('<leader>ff', fzf.files, 'Find files')
|
||||
map('<leader>fg', fzf.live_grep, 'Grep project')
|
||||
map('<leader>fb', fzf.buffers, 'Switch buffer')
|
||||
map('<leader>fw', fzf.grep_cword, 'Grep word under cursor')
|
||||
map('<leader>fh', fzf.helptags, 'Search help')
|
||||
Loading…
Reference in a new issue