mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2024-12-22 18:07:34 +00:00
Update min and more lazify
This commit is contained in:
parent
35561b6aa5
commit
20c0af47a6
@ -1,5 +1,5 @@
|
|||||||
if vim.fn.has("nvim-0.7.0") ~= 1 then
|
if vim.fn.has("nvim-0.9.0") ~= 1 then
|
||||||
print("ERROR: Requires nvim >= 0.7.0")
|
print("ERROR: Requires nvim >= 0.9.0")
|
||||||
end
|
end
|
||||||
|
|
||||||
local o = vim.o
|
local o = vim.o
|
||||||
|
@ -19,8 +19,6 @@ vim.opt.rtp:prepend(lazypath)
|
|||||||
-- Setup lazy.nvim
|
-- Setup lazy.nvim
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
spec = {
|
spec = {
|
||||||
-- TODO: Move plugins to be split by plugin or feature types
|
|
||||||
-- { import = "plugins" },
|
|
||||||
{ import = "lazy_plugins" },
|
{ import = "lazy_plugins" },
|
||||||
},
|
},
|
||||||
lockfile = vim.fn.stdpath("config") .. utils.map_version_rule({
|
lockfile = vim.fn.stdpath("config") .. utils.map_version_rule({
|
||||||
|
@ -113,10 +113,41 @@ return {
|
|||||||
|
|
||||||
-- Find text everywhere!
|
-- Find text everywhere!
|
||||||
{
|
{
|
||||||
-- TODO: Maybe replace this with Telescope?
|
|
||||||
"https://github.com/mhinz/vim-grepper",
|
"https://github.com/mhinz/vim-grepper",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.grepper")
|
-- Grepper settings and shortcuts
|
||||||
|
vim.g.grepper = {
|
||||||
|
quickfix = 1,
|
||||||
|
open = 1,
|
||||||
|
switch = 0,
|
||||||
|
jump = 0,
|
||||||
|
tools = { "git", "rg", "ag", "ack", "pt", "grep" },
|
||||||
|
dir = "repo,cwd",
|
||||||
|
}
|
||||||
|
|
||||||
|
require("utils").keymap_set({ "n", "x" }, "gs", "<plug>(GrepperOperator)", {
|
||||||
|
silent = true,
|
||||||
|
noremap = false,
|
||||||
|
desc = "Grepper",
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Override Todo command to use Grepper
|
||||||
|
vim.api.nvim_create_user_command(
|
||||||
|
"Todo",
|
||||||
|
":Grepper -noprompt -query TODO",
|
||||||
|
{ desc = "Search for TODO tags" }
|
||||||
|
)
|
||||||
|
|
||||||
|
-- Make some shortands for various grep programs
|
||||||
|
if vim.fn.executable("rg") == 1 then
|
||||||
|
vim.api.nvim_create_user_command("Rg", ":GrepperRg <args>", { nargs = "+", desc = "Ripgrep" })
|
||||||
|
end
|
||||||
|
if vim.fn.executable("ag") == 1 then
|
||||||
|
vim.api.nvim_create_user_command("Ag", ":GrepperAg <args>", { nargs = "+", desc = "Silversearcher" })
|
||||||
|
end
|
||||||
|
if vim.fn.executable("ack") == 1 then
|
||||||
|
vim.api.nvim_create_user_command("Ack", ":GrepperAck <args>", { nargs = "+", desc = "Ack search" })
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
-- Grepper settings and shortcuts
|
|
||||||
vim.g.grepper = {
|
|
||||||
quickfix = 1,
|
|
||||||
open = 1,
|
|
||||||
switch = 0,
|
|
||||||
jump = 0,
|
|
||||||
tools = { "git", "rg", "ag", "ack", "pt", "grep" },
|
|
||||||
dir = "repo,cwd",
|
|
||||||
}
|
|
||||||
|
|
||||||
require("utils").keymap_set({ "n", "x" }, "gs", "<plug>(GrepperOperator)", {
|
|
||||||
silent = true,
|
|
||||||
noremap = false,
|
|
||||||
desc = "Grepper",
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Override Todo command to use Grepper
|
|
||||||
vim.api.nvim_create_user_command("Todo", ":Grepper -noprompt -query TODO", { desc = "Search for TODO tags" })
|
|
||||||
|
|
||||||
-- Make some shortands for various grep programs
|
|
||||||
if vim.fn.executable("rg") == 1 then
|
|
||||||
vim.api.nvim_create_user_command("Rg", ":GrepperRg <args>", { nargs = "+", desc = "Ripgrep" })
|
|
||||||
end
|
|
||||||
if vim.fn.executable("ag") == 1 then
|
|
||||||
vim.api.nvim_create_user_command("Ag", ":GrepperAg <args>", { nargs = "+", desc = "Silversearcher" })
|
|
||||||
end
|
|
||||||
if vim.fn.executable("ack") == 1 then
|
|
||||||
vim.api.nvim_create_user_command("Ack", ":GrepperAck <args>", { nargs = "+", desc = "Ack search" })
|
|
||||||
end
|
|
Loading…
Reference in New Issue
Block a user