Update min and more lazify

This commit is contained in:
ViViDboarder 2024-07-17 17:36:44 -07:00
parent 35561b6aa5
commit 20c0af47a6
4 changed files with 35 additions and 35 deletions

View File

@ -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

View File

@ -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({

View File

@ -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,
}, },

View File

@ -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