Lazy load stuff

This commit is contained in:
2024-12-28 00:46:28 +01:00
parent 23bb4549f1
commit b96a12e1ff
19 changed files with 141 additions and 163 deletions
+5 -5
View File
@@ -1,8 +1,7 @@
return {
{
"auto-save.nvim",
lazy = false,
load = function() end,
event = { "InsertLeave", "TextChanged", },
keys = {
{
"<leader>w",
@@ -12,7 +11,6 @@ return {
desc = "Toggle autosave"
},
},
event = { "InsertLeave", "TextChanged", },
opts = {
write_all_buffers = true,
condition = function(buf)
@@ -23,9 +21,11 @@ return {
return ft ~= "oil" and ft ~= "harpoon"
end,
},
after = function(plug)
beforeAll = function()
vim.g.auto_save_state = true
require("auto-save").setup(plug.opt)
end,
after = function(plug)
require("auto-save").setup(plug.opts)
end,
},
}
+1 -2
View File
@@ -1,8 +1,7 @@
return {
{
"blink-cmp",
lazy = false,
load = function() end,
event = "InsertEnter",
opts = {
keymap = {
preset = "default",
-2
View File
@@ -1,8 +1,6 @@
return {
{
"conform.nvim",
lazy = false,
load = function() end,
cmd = "ConformInfo",
keys = {
{
+2 -5
View File
@@ -1,8 +1,6 @@
return {
{
"gitsigns.nvim",
lazy = false,
load = function() end,
event = { "BufReadPost", "BufWritePost", "BufNewFile" },
opts = {
signs = {
@@ -23,8 +21,8 @@ return {
vim.keymap.set(mode, l, r, { buffer = buffer, desc = desc })
end
map("n", "]h", gs.next_hunk, "Next Hunk")
map("n", "[h", gs.prev_hunk, "Prev Hunk")
map('n', ']h', function() gs.nav_hunk('next') end, "Next Hunk")
map('n', '[h', function() gs.nav_hunk('prev') end, "Prev Hunk")
map({ "n", "v" }, "<leader>ga", ":Gitsigns stage_hunk<CR>", "Add Hunk")
map({ "n", "v" }, "<leader>gr", ":Gitsigns reset_hunk<CR>", "Reset Hunk")
map("n", "<leader>gu", gs.undo_stage_hunk, "Unstage Hunk")
@@ -43,7 +41,6 @@ return {
{
"git-conflict.nvim",
lazy = false,
load = function() end,
keys = {
{ "<leader>gxo", "<Plug>(git-conflict-ours)", desc = "Accept ours" },
{ "<leader>gxt", "<Plug>(git-conflict-theirs)", desc = "Accept theirs" },
-4
View File
@@ -1,8 +1,6 @@
return {
{
"nvim-navic",
lazy = false,
load = function() end,
opts = {
highlight = true,
lsp = {
@@ -16,8 +14,6 @@ return {
{
"lualine.nvim",
lazy = false,
load = function() end,
opts = {
options = {
theme = "auto",
-2
View File
@@ -1,8 +1,6 @@
return {
{
"nvim-lint",
lazy = false,
load = function() end,
event = { "BufReadPost", "BufWritePost", "BufNewFile" },
opts = {
javascript = { "biomejs", "eslint_d" },
+67
View File
@@ -0,0 +1,67 @@
return {
{
"lsp",
event = { "BufReadPost", "BufWritePost", "BufNewFile" },
load = function() end,
after = function()
-- see https://github.com/neovim/nvim-lspconfig/issues/3494
require("lspconfig").lua_ls.setup({})
require("lspconfig").hls.setup({})
require("lspconfig").rust_analyzer.setup({})
require("lspconfig").clangd.setup({})
require("lspconfig").omnisharp.setup({})
require("lspconfig").pyright.setup({})
require("lspconfig").nil_ls.setup({})
require("lspconfig").ts_ls.setup({})
require("lspconfig").yamlls.setup({})
require("lspconfig").marksman.setup({})
require("lspconfig").ltex.setup({})
require("lspconfig").texlab.setup({})
require("lspconfig").html.setup({})
require("lspconfig").helm_ls.setup({})
require("lspconfig").zls.setup({})
require("lspconfig").jsonls.setup({
on_new_config = function(new_config)
new_config.settings.json.schemas = new_config.settings.json.schemas or {}
vim.list_extend(new_config.settings.json.schemas, require("schemastore").json.schemas())
end,
settings = {
json = {
format = {
enable = true,
},
validate = { enable = true },
},
},
})
require("lspconfig").gopls.setup({
settings = {
-- https://go.googlesource.com/vscode-go/+/HEAD/docs/settings.md#settings-for
gopls = {
analyses = {
nilness = true,
unusedparams = true,
unusedwrite = true,
useany = true
},
experimentalPostfixCompletions = true,
gofumpt = true,
staticcheck = true,
usePlaceholders = true,
hints = {
assignVariableTypes = true,
compositeLiteralFields = true,
compositeLiteralTypes = true,
constantValues = true,
functionTypeParameters = true,
parameterNames = true,
rangeVariableTypes = true
}
}
}
})
end,
},
}
-6
View File
@@ -1,8 +1,6 @@
return {
{
"mini.icons",
lazy = false,
load = function() end,
after = function()
require("mini.icons").setup();
MiniIcons.mock_nvim_web_devicons()
@@ -11,8 +9,6 @@ return {
{
"mini.operators",
lazy = false,
load = function() end,
opts = {
replace = {
prefix = "cr",
@@ -31,8 +27,6 @@ return {
{
"mini.splitjoin",
lazy = false,
load = function() end,
keys = {
{ "gS", desc = "Split arguments" },
{ "gJ", desc = "Join arguments" },
+1 -11
View File
@@ -1,8 +1,6 @@
return {
{
"nvim-surround",
lazy = false,
load = function() end,
after = function()
require("nvim-surround").setup({})
end,
@@ -10,8 +8,6 @@ return {
{
"vim-wordmotion",
lazy = false,
load = function() end,
keys = {
-- This overrides the default ge & gw but i never used them.
{ "gw", "<plug>WordMotion_w", desc = "Next small world", mode = { "n", "x", "o" } },
@@ -20,15 +16,13 @@ return {
{ "igw", "<plug>WordMotion_iw", desc = "inner small word", mode = { "x", "o" } },
{ "agw", "<plug>WordMotion_aw", desc = "a small word (with white-space)", mode = { "x", "o" } },
},
after = function()
before = function()
vim.g.wordmotion_nomap = true
end,
},
{
"increment-activator",
lazy = false,
load = function() end,
keys = {
{ "<C-A>", desc = "Increment" },
{ "<C-X>", desc = "Decrement" },
@@ -37,8 +31,6 @@ return {
{
"leap.nvim",
load = function() end,
lazy = false,
keys = {
{ "s", "<Plug>(leap-forward-till)", mode = { "n", "x", }, desc = "Leap forward to" },
{ "S", "<Plug>(leap-backward)", mode = { "n", "x", }, desc = "Leap backward to" },
@@ -49,8 +41,6 @@ return {
{
"flit.nvim",
load = function() end,
lazy = false,
keys = { "f", "F", "t", "T" },
after = function()
require("flit").setup()
+5 -5
View File
@@ -1,16 +1,16 @@
return {
{
"noice.nvim",
lazy = false,
load = function() end,
opts = {
presets = {
command_palette = true,
inc_rename = true,
},
signature = {
auto_open = {
enabled = false,
lsp = {
signature = {
auto_open = {
enabled = false,
},
},
},
views = {
-1
View File
@@ -2,7 +2,6 @@ return {
{
"oil.nvim",
lazy = false,
load = function() end,
keys = {
{ "-", "<CMD>Oil<CR>", desc = "Open parent directory" },
{ "<BS>", "<CMD>Oil<CR>", desc = "Open parent directory" },
-2
View File
@@ -1,8 +1,6 @@
return {
{
"statuscol.nvim",
lazy = false,
load = function() end,
after = function()
local builtin = require("statuscol.builtin")
require("statuscol").setup({
+1
View File
@@ -1,6 +1,7 @@
return {
{
"telescope.nvim",
load = vim.cmd.packadd,
cmd = "Telescope",
keys = {
{ "<leader>f", "<cmd>Telescope find_files<cr>", desc = "Find Files" },
+4 -6
View File
@@ -1,8 +1,9 @@
return {
{
"nvim-treesitter",
lazy = false,
load = function() end,
load = function()
vim.cmd.packadd("nvim-treesitter-textobjects")
end,
event = { "BufReadPost", "BufWritePost", "BufNewFile" },
opts = {
highlight = {
@@ -36,8 +37,6 @@ return {
{
"ts-comments.nvim",
lazy = false,
load = function() end,
after = function()
require("ts-comments").setup({})
end,
@@ -45,8 +44,7 @@ return {
{
"vim-illuminate",
lazy = false,
load = function() end,
load = vim.cmd.packadd,
event = { "BufReadPost", "BufWritePost", "BufNewFile" },
opts = {
providers = {
-12
View File
@@ -1,8 +1,6 @@
return {
{
"undotree",
load = function() end,
lazy = false,
keys = {
{ "<leader>u", vim.cmd.UndotreeToggle, desc = "Show undotree" },
},
@@ -10,8 +8,6 @@ return {
{
"which-key.nvim",
load = function() end,
lazy = false,
opts = {
plugins = { spelling = true },
},
@@ -23,8 +19,6 @@ return {
{
"nvim-colorizer.lua",
load = function() end,
lazy = false,
event = "BufReadPre",
opts = {
filetypes = {
@@ -51,8 +45,6 @@ return {
{
"nvim-pqf",
load = function() end,
lazy = false,
ft = "qf",
after = function()
require("pqf").setup()
@@ -61,8 +53,6 @@ return {
{
"virt-column.nvim",
lazy = false,
load = function() end,
opts = {
char = "▕",
},
@@ -73,8 +63,6 @@ return {
{
"indent-blankline.nvim",
lazy = false,
load = function() end,
event = { "BufReadPost", "BufWritePost", "BufNewFile" },
opts = {
indent = {