Update dependencies; update which-key;

add telescope-extensions with telescope-live-grep-args
This commit is contained in:
Mark 2024-07-24 12:51:22 -04:00
parent df99743622
commit b81b0d2e72
3 changed files with 82 additions and 33 deletions

View file

@ -24,4 +24,14 @@ require('which-key').register({
f = { lint_and_format, 'Lint and format current buffer' }
}, { prefix = '<leader>c' })
require('which-key').add({
{
"<leader>sF",
function ()
require("telescope").extensions.live_grep_args.live_grep_args()
end,
desc = "Telescope live_grep_args"
},
})
return {}

View file

@ -0,0 +1,38 @@
return {
"nvim-telescope/telescope.nvim",
dependencies = {
{
"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",
},
},
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
}