diff --git a/lua/core/plugins/autopairs.lua b/lua/core/plugins/autopairs.lua index 66ef17dc..4cf112ae 100644 --- a/lua/core/plugins/autopairs.lua +++ b/lua/core/plugins/autopairs.lua @@ -1,5 +1,6 @@ local M = { "windwp/nvim-autopairs", + event = { "BufReadPre", "BufNewFile" }, opts = { enable_check_bracket_line = false, -- Don't add pairs if it already has a close pair in the same line ignored_next_char = "[%w%.]", -- will ignore alphanumeric and `.` symbol diff --git a/lua/core/plugins/dap.lua b/lua/core/plugins/dap.lua index 8306c792..51b18864 100644 --- a/lua/core/plugins/dap.lua +++ b/lua/core/plugins/dap.lua @@ -1,7 +1,7 @@ local M = { { "mfussenegger/nvim-dap", - event = "VeryLazy", + lazy = true, dependencies = { "mfussenegger/nvim-dap-python", "leoluz/nvim-dap-go", diff --git a/lua/core/plugins/dropbear.lua b/lua/core/plugins/dropbear.lua index aa69b6f3..af36e6bf 100644 --- a/lua/core/plugins/dropbear.lua +++ b/lua/core/plugins/dropbear.lua @@ -2,5 +2,6 @@ local utils = require("utils.functions") return { "Bekaboo/dropbar.nvim", + event = { "BufReadPost", "BufNewFile" }, enabled = utils.isNeovimVersionsatisfied(10), } diff --git a/lua/core/plugins/flash.lua b/lua/core/plugins/flash.lua index 288e5635..f8aba5ca 100644 --- a/lua/core/plugins/flash.lua +++ b/lua/core/plugins/flash.lua @@ -1,6 +1,6 @@ return { "folke/flash.nvim", - event = "VeryLazy", + event = { "BufReadPost", "BufNewFile" }, opts = {}, keys = { { diff --git a/lua/core/plugins/flatten.lua b/lua/core/plugins/flatten.lua index 0248dd75..f2993c53 100644 --- a/lua/core/plugins/flatten.lua +++ b/lua/core/plugins/flatten.lua @@ -1,5 +1,7 @@ return { "willothy/flatten.nvim", + lazy = false, + priority = 1001, opts = { window = { open = "current", diff --git a/lua/core/plugins/fugitive.lua b/lua/core/plugins/fugitive.lua index 4bce805b..eae1237d 100644 --- a/lua/core/plugins/fugitive.lua +++ b/lua/core/plugins/fugitive.lua @@ -1,6 +1,7 @@ -- no Lua alternative local M = { "tpope/vim-fugitive", + cmd = "G", } return M diff --git a/lua/core/plugins/harpoon.lua b/lua/core/plugins/harpoon.lua index 12a8b5ea..604189a7 100644 --- a/lua/core/plugins/harpoon.lua +++ b/lua/core/plugins/harpoon.lua @@ -2,6 +2,7 @@ return { "ThePrimeagen/harpoon", enabled = vim.g.config.plugins.harpoon.enable, dependencies = { "nvim-lua/plenary.nvim" }, + event = "VimEnter", branch = "harpoon2", config = function() local harpoon = require("harpoon") diff --git a/lua/core/plugins/hydra.lua b/lua/core/plugins/hydra.lua index 0e6032d2..fe1f836e 100644 --- a/lua/core/plugins/hydra.lua +++ b/lua/core/plugins/hydra.lua @@ -1,6 +1,6 @@ local M = { "anuvyklack/hydra.nvim", - event = "VeryLazy", + lazy = true, dependencies = { "anuvyklack/keymap-layer.nvim", { diff --git a/lua/core/plugins/inc-rename.lua b/lua/core/plugins/inc-rename.lua index 43dcae75..c34cca69 100644 --- a/lua/core/plugins/inc-rename.lua +++ b/lua/core/plugins/inc-rename.lua @@ -1,4 +1,5 @@ return { "smjonas/inc-rename.nvim", + lazy = true, config = true, } diff --git a/lua/core/plugins/lsp.lua b/lua/core/plugins/lsp.lua index 963c6f8a..8ca0a2c6 100644 --- a/lua/core/plugins/lsp.lua +++ b/lua/core/plugins/lsp.lua @@ -6,8 +6,7 @@ return { event = { "BufReadPre", "BufNewFile" }, dependencies = { { "onsails/lspkind-nvim" }, - { "folke/neodev.nvim", config = true, lazy = true, ft = "lua" }, - { "folke/neoconf.nvim", config = true, lazy = true, ft = "lua" }, + { "folke/neoconf.nvim", config = true, ft = "lua" }, -- must be loaded before lsp }, config = function() require("core.plugins.lsp.lsp") @@ -15,7 +14,8 @@ return { }, { "williamboman/mason.nvim", - event = "VeryLazy", + lazy = true, + cmd = "Mason", dependencies = { { "williamboman/mason-lspconfig.nvim", module = "mason" }, }, diff --git a/lua/core/plugins/mini.lua b/lua/core/plugins/mini.lua index e1fa19d4..31b174bf 100644 --- a/lua/core/plugins/mini.lua +++ b/lua/core/plugins/mini.lua @@ -71,7 +71,7 @@ return { { "echasnovski/mini.files", - event = { "VimEnter" }, + kyes = "-", opts = { windows = { -- Whether to show preview of directory under cursor diff --git a/lua/core/plugins/neodev.lua b/lua/core/plugins/neodev.lua new file mode 100644 index 00000000..3059dd8a --- /dev/null +++ b/lua/core/plugins/neodev.lua @@ -0,0 +1 @@ +return { "folke/neodev.nvim", config = true, ft = "lua" } diff --git a/lua/core/plugins/none-ls.lua b/lua/core/plugins/none-ls.lua index dd997a5d..77fbec0a 100644 --- a/lua/core/plugins/none-ls.lua +++ b/lua/core/plugins/none-ls.lua @@ -1,5 +1,6 @@ local M = { "nvimtools/none-ls.nvim", + event = { "BufReadPre", "BufNewFile" }, dependencies = { "nvim-lua/plenary.nvim", }, diff --git a/lua/core/plugins/project.lua b/lua/core/plugins/project.lua index 12201f23..f25faf94 100644 --- a/lua/core/plugins/project.lua +++ b/lua/core/plugins/project.lua @@ -1,5 +1,6 @@ local M = { "ahmedkhalf/project.nvim", + cmd = "Telescope projects", -- can't use 'opts' because module has non standard name 'project_nvim' config = function() require("project_nvim").setup({ diff --git a/lua/core/plugins/starlite.lua b/lua/core/plugins/starlite.lua index ca299a9b..411df3e3 100644 --- a/lua/core/plugins/starlite.lua +++ b/lua/core/plugins/starlite.lua @@ -1,12 +1,20 @@ local M = { "ironhouzi/starlite-nvim", + event = { "BufReadPost", "BufNewFile" }, config = function() local map = vim.keymap.set - local default_options = { silent = true } - map("n", "*", ":lua require'starlite'.star()", default_options) - map("n", "g*", ":lua require'starlite'.g_star()", default_options) - map("n", "#", ":lua require'starlite'.hash()", default_options) - map("n", "g#", ":lua require'starlite'.g_hash()", default_options) + map({ "n", "x" }, "*", function() + require("starlite").star() + end, { desc = "Search forward (word)" }) + map({ "n", "x" }, "g*", function() + require("starlite").g_star() + end, { desc = "Search forward" }) + map({ "n", "x" }, "#", function() + require("starlite").hash() + end, { desc = "Search backward (word)" }) + map({ "n", "x" }, "g#", function() + require("starlite").g_hash() + end, { desc = "Search backward" }) end, } diff --git a/lua/core/plugins/toggleterm.lua b/lua/core/plugins/toggleterm.lua index 14849d05..b8d6835c 100644 --- a/lua/core/plugins/toggleterm.lua +++ b/lua/core/plugins/toggleterm.lua @@ -1,5 +1,6 @@ local M = { "akinsho/nvim-toggleterm.lua", + keys = "", config = function() local map = vim.api.nvim_set_keymap local buf_map = vim.api.nvim_buf_set_keymap diff --git a/lua/core/plugins/trouble.lua b/lua/core/plugins/trouble.lua index 929fdb69..eb69c4bc 100644 --- a/lua/core/plugins/trouble.lua +++ b/lua/core/plugins/trouble.lua @@ -2,6 +2,7 @@ local config = vim.g.config.plugins.trouble return { "folke/trouble.nvim", + lazy = true, dependencies = { "nvim-tree/nvim-web-devicons" }, enabled = config.enable, opts = config.opts, diff --git a/lua/core/plugins/typst.lua b/lua/core/plugins/typst.lua index 332e59e8..6164284f 100644 --- a/lua/core/plugins/typst.lua +++ b/lua/core/plugins/typst.lua @@ -1,5 +1,4 @@ return { "kaarmu/typst.vim", ft = "typst", - lazy = false, } diff --git a/lua/core/plugins/vimtex.lua b/lua/core/plugins/vimtex.lua index d86607e3..732464dc 100644 --- a/lua/core/plugins/vimtex.lua +++ b/lua/core/plugins/vimtex.lua @@ -1,6 +1,6 @@ local M = { "lervag/vimtex", - lazy = false, + ft = "tex", config = function() local conf = vim.g.config.plugins.tex local g = vim.g diff --git a/lua/core/plugins/which-key.lua b/lua/core/plugins/which-key.lua index ef469346..fcf38b6b 100644 --- a/lua/core/plugins/which-key.lua +++ b/lua/core/plugins/which-key.lua @@ -1,7 +1,7 @@ local icons = require("utils.icons") local M = { "folke/which-key.nvim", - event = "VeryLazy", + event = "VimEnter", opts = { icons = { breadcrumb = icons.arrows.DoubleArrowRight, -- symbol used in the command line area that shows your active key combo