@@ -20,6 +20,8 @@ return { -- Fuzzy Finder (files, lsp, etc)
2020
2121 -- Useful for getting pretty icons, but requires a Nerd Font.
2222 { ' nvim-tree/nvim-web-devicons' , enabled = vim .g .have_nerd_font },
23+ -- Useful for searching within a particular directory
24+ { ' nvim-telescope/telescope-live-grep-args.nvim' , version = ' ^1.0.0' },
2325 },
2426 config = function ()
2527 -- Telescope is a fuzzy finder that comes with a lot of different things that
@@ -64,6 +66,7 @@ return { -- Fuzzy Finder (files, lsp, etc)
6466 -- Enable Telescope extensions if they are installed
6567 pcall (require (' telescope' ).load_extension , ' fzf' )
6668 pcall (require (' telescope' ).load_extension , ' ui-select' )
69+ pcall (require (' telescope' ).load_extension , ' live_grep_args' )
6770
6871 -- See `:help telescope.builtin`
6972 local builtin = require ' telescope.builtin'
@@ -94,6 +97,9 @@ return { -- Fuzzy Finder (files, lsp, etc)
9497 vim .keymap .set (' n' , ' <leader>s.' , builtin .oldfiles , { desc = ' [S]earch Recent Files ("." for repeat)' })
9598 vim .keymap .set (' n' , ' <leader><leader>' , builtin .buffers , { desc = ' [ ] Find existing buffers' })
9699
100+ local lga = require (' telescope' ).extensions .live_grep_args
101+ vim .keymap .set (' n' , ' <leader>sa' , lga .live_grep_args , { desc = ' [S]earch by Grep with [A]rgs, e.g. in certain dirs' })
102+
97103 -- Slightly advanced example of overriding default behavior and theme
98104 vim .keymap .set (' n' , ' <leader>/' , function ()
99105 -- You can pass additional configuration to Telescope to change the theme, layout, etc.
0 commit comments