summaryrefslogtreecommitdiff
path: root/neovim/.config/nvim/lua/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'neovim/.config/nvim/lua/plugins')
-rw-r--r--neovim/.config/nvim/lua/plugins/telescope.lua45
1 files changed, 42 insertions, 3 deletions
diff --git a/neovim/.config/nvim/lua/plugins/telescope.lua b/neovim/.config/nvim/lua/plugins/telescope.lua
index 6a81359..08729ca 100644
--- a/neovim/.config/nvim/lua/plugins/telescope.lua
+++ b/neovim/.config/nvim/lua/plugins/telescope.lua
@@ -1,13 +1,52 @@
return {
{
'nvim-telescope/telescope.nvim',
+ tag = '0.1.8',
dependencies = {
- 'nvim-lua/plenary.nvim',
+ {
+ 'nvim-lua/plenary.nvim',
+ },
+ {
+ "nvim-telescope/telescope-live-grep-args.nvim",
+ -- This will not install any breaking changes.
+ -- For major updates, this must be adjusted manually.
+ version = "^1.0.0",
+ },
},
+ cmd = "Telescope",
keys = {
- { '<F3>', '<cmd>Telescope buffers<CR>', desc = 'Telescope buffers' },
+ { '<F3>', '<cmd>Telescope buffers<CR>', desc = 'Telescope buffers' },
{ '<F4>', '<cmd>Telescope find_files<CR>', desc = 'Telescope find files' },
- { '<F6>', '<cmd>Telescope live_grep<CR>', desc = 'Telescope live grep' },
+ { '<F6>', '<cmd>Telescope live_grep<CR>', desc = 'Telescope live grep' },
},
+ config = function()
+ local telescope = require("telescope")
+ local lga_actions = require("telescope-live-grep-args.actions")
+
+ -- first setup telescope
+ telescope.setup({
+ extensions = {
+ live_grep_args = {
+ auto_quoting = true, -- enable/disable auto-quoting
+ -- define mappings, e.g.
+ mappings = { -- extend mappings
+ i = {
+ ["<C-k>"] = lga_actions.quote_prompt(),
+ ["<C-i>"] = lga_actions.quote_prompt({ postfix = " --iglob " }),
+ -- freeze the current list and start a fuzzy search in the frozen list
+ ["<C-space>"] = lga_actions.to_fuzzy_refine,
+ },
+ },
+ -- ... also accepts theme settings, for example:
+ -- theme = "dropdown", -- use dropdown theme
+ -- theme = { }, -- use own theme spec
+ -- layout_config = { mirror=true }, -- mirror preview pane
+ }
+ }
+ })
+
+ -- then load the extension
+ telescope.load_extension("live_grep_args")
+ end
},
}