mirror of
https://github.com/LazyVim/starter.git
synced 2026-07-25 14:01:03 +00:00
Grep with arguments within telescope
This commit is contained in:
parent
f49ff03773
commit
587307ca09
1 changed files with 22 additions and 9 deletions
|
|
@ -1,13 +1,26 @@
|
||||||
-- lua/plugins/telescope.lua
|
-- lua/plugins/telescope.lua
|
||||||
-- https://www.lazyvim.org/extras/editor/telescope
|
-- https://www.lazyvim.org/extras/editor/telescope
|
||||||
return {
|
return {
|
||||||
"nvim-telescope/telescope.nvim",
|
{
|
||||||
opts = function(_, opts)
|
"nvim-telescope/telescope.nvim",
|
||||||
opts.keys = opts.keys or {}
|
opts = function(_, opts)
|
||||||
opts.keys["<Space><Space>"] = function()
|
opts.keys = opts.keys or {}
|
||||||
require("telescope.builtin").find_files({
|
opts.keys["<Space><Space>"] = function()
|
||||||
cwd = require("project_nvim.project").get_project_root() or vim.fn.getcwd(),
|
require("telescope.builtin").find_files({
|
||||||
})
|
cwd = require("project_nvim.project").get_project_root() or vim.fn.getcwd(),
|
||||||
end
|
})
|
||||||
end,
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nvim-telescope/telescope-live-grep-args.nvim",
|
||||||
|
dependencies = { "nvim-telescope/telescope.nvim" },
|
||||||
|
config = function()
|
||||||
|
require("telescope").load_extension("live_grep_args")
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>sg", function()
|
||||||
|
require("telescope").extensions.live_grep_args.live_grep_args()
|
||||||
|
end, { desc = "Live Grep with Args" })
|
||||||
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue