perf(nvim): use event = "VeryLazy" provided by lazy.nvim

This commit is contained in:
Price Hiller 2023-01-11 07:23:27 -06:00
parent 1e62446ae5
commit 56b07605f1

View File

@ -20,12 +20,14 @@ lazy.setup({
-- Commonly used library -- Commonly used library
{ {
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",
event = "VeryLazy",
}, },
-- Much nicer ui, integrates cmdheight = 0 wella -- Much nicer ui, integrates cmdheight = 0 wella
-- NOTE: Temporarily disabling this until nightly is fixed -- NOTE: Temporarily disabling this until nightly is fixed
-- { -- {
-- "folke/noice.nvim", -- "folke/noice.nvim",
-- event = "VeryLazy",
-- config = function() -- config = function()
-- -- NOTE: Might be redundant, to check later -- -- NOTE: Might be redundant, to check later
-- require("plugins.configs.nvim-notify") -- require("plugins.configs.nvim-notify")
@ -45,6 +47,7 @@ lazy.setup({
{ "folke/tokyonight.nvim" }, { "folke/tokyonight.nvim" },
{ {
"EdenEast/nightfox.nvim", "EdenEast/nightfox.nvim",
event = "VeryLazy",
config = function() config = function()
require("nightfox").setup({ require("nightfox").setup({
options = { options = {
@ -56,6 +59,7 @@ lazy.setup({
}, },
{ {
"rebelot/kanagawa.nvim", "rebelot/kanagawa.nvim",
event = "VeryLazy",
config = function() config = function()
require("plugins.configs.kanagawa") require("plugins.configs.kanagawa")
end, end,
@ -64,12 +68,13 @@ lazy.setup({
-- Icons for folders, files, etc. -- Icons for folders, files, etc.
{ {
"kyazdani42/nvim-web-devicons", "kyazdani42/nvim-web-devicons",
event = "BufEnter", event = "VeryLazy",
}, },
-- Statusline. -- Statusline.
{ {
"nvim-lualine/lualine.nvim", "nvim-lualine/lualine.nvim",
event = "VeryLazy",
config = function() config = function()
require("plugins.configs.statusline") require("plugins.configs.statusline")
end, end,
@ -78,7 +83,7 @@ lazy.setup({
-- Indentation Guides -- Indentation Guides
{ {
"lukas-reineke/indent-blankline.nvim", "lukas-reineke/indent-blankline.nvim",
event = "BufEnter", event = "VeryLazy",
config = function() config = function()
require("plugins.configs.indent-blankline") require("plugins.configs.indent-blankline")
end, end,
@ -87,6 +92,7 @@ lazy.setup({
-- Treesitter -- Treesitter
{ {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
event = "VeryLazy",
build = ":TSUpdate", build = ":TSUpdate",
dependencies = { dependencies = {
"p00f/nvim-ts-rainbow", "p00f/nvim-ts-rainbow",
@ -100,6 +106,7 @@ lazy.setup({
{ {
"nvim-treesitter/nvim-treesitter-textobjects", "nvim-treesitter/nvim-treesitter-textobjects",
event = "VeryLazy",
after = { "nvim-treesitter" }, after = { "nvim-treesitter" },
config = function() config = function()
require("nvim-treesitter.configs").setup({ require("nvim-treesitter.configs").setup({
@ -160,7 +167,7 @@ lazy.setup({
-- Highlight given color codes -- Highlight given color codes
{ {
"brenoprata10/nvim-highlight-colors", "brenoprata10/nvim-highlight-colors",
event = "BufEnter", event = "VeryLazy",
config = function() config = function()
require("nvim-highlight-colors").setup({ require("nvim-highlight-colors").setup({
enable_tailwind = true, enable_tailwind = true,
@ -182,6 +189,7 @@ lazy.setup({
-- Telescope -- Telescope
{ {
"nvim-telescope/telescope.nvim", "nvim-telescope/telescope.nvim",
event = "VeryLazy",
dependencies = { dependencies = {
"nvim-telescope/telescope-media-files.nvim", "nvim-telescope/telescope-media-files.nvim",
"nvim-telescope/telescope-file-browser.nvim", "nvim-telescope/telescope-file-browser.nvim",
@ -198,11 +206,13 @@ lazy.setup({
{ {
"stevearc/dressing.nvim", "stevearc/dressing.nvim",
event = "VeryLazy",
}, },
-- File Tree -- File Tree
{ {
"nvim-neo-tree/neo-tree.nvim", "nvim-neo-tree/neo-tree.nvim",
event = "VeryLazy",
branch = "v2.x", branch = "v2.x",
dependencies = { dependencies = {
"kyazdani42/nvim-web-devicons", "kyazdani42/nvim-web-devicons",
@ -218,6 +228,7 @@ lazy.setup({
-- Lspconfig -- Lspconfig
{ {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
event = "VeryLazy",
dependencies = { dependencies = {
"hrsh7th/cmp-nvim-lsp", "hrsh7th/cmp-nvim-lsp",
"folke/neodev.nvim", "folke/neodev.nvim",
@ -230,7 +241,6 @@ lazy.setup({
"b0o/schemastore.nvim", "b0o/schemastore.nvim",
}, },
-- after = "noice.nvim", -- after = "noice.nvim",
event = "BufEnter",
config = function() config = function()
require("mason").setup({}) require("mason").setup({})
require("plugins.configs.lsp") require("plugins.configs.lsp")
@ -240,6 +250,7 @@ lazy.setup({
-- Incremental rename, easier to view renames -- Incremental rename, easier to view renames
{ {
"smjonas/inc-rename.nvim", "smjonas/inc-rename.nvim",
event = "VeryLazy",
config = function() config = function()
require("inc_rename").setup({}) require("inc_rename").setup({})
end, end,
@ -248,6 +259,7 @@ lazy.setup({
-- Better LSP Virtual Text Lines -- Better LSP Virtual Text Lines
{ {
url = "https://git.sr.ht/~whynothugo/lsp_lines.nvim", url = "https://git.sr.ht/~whynothugo/lsp_lines.nvim",
event = "VeryLazy",
config = function() config = function()
require("lsp_lines").setup() require("lsp_lines").setup()
end, end,
@ -256,6 +268,7 @@ lazy.setup({
-- Lsp From Null LS -- Lsp From Null LS
{ {
"jose-elias-alvarez/null-ls.nvim", "jose-elias-alvarez/null-ls.nvim",
event = "VeryLazy",
config = function() config = function()
require("plugins.configs.null_ls") require("plugins.configs.null_ls")
end, end,
@ -264,6 +277,7 @@ lazy.setup({
-- Autopairs -- Autopairs
{ {
"windwp/nvim-autopairs", "windwp/nvim-autopairs",
event = "VeryLazy",
config = function() config = function()
require("nvim-autopairs").setup() require("nvim-autopairs").setup()
end, end,
@ -272,6 +286,7 @@ lazy.setup({
-- Snippets -- Snippets
{ {
"rafamadriz/friendly-snippets", "rafamadriz/friendly-snippets",
event = "VeryLazy",
config = function() config = function()
require("luasnip.loaders.from_vscode").lazy_load() require("luasnip.loaders.from_vscode").lazy_load()
end, end,
@ -280,12 +295,12 @@ lazy.setup({
"saadparwaiz1/cmp_luasnip", "saadparwaiz1/cmp_luasnip",
}, },
after = "LuaSnip", after = "LuaSnip",
event = "BufEnter",
}, },
-- Code completion -- Code completion
{ {
"hrsh7th/nvim-cmp", "hrsh7th/nvim-cmp",
event = "VeryLazy",
dependencies = { dependencies = {
"hrsh7th/cmp-nvim-lsp", "hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-path", "hrsh7th/cmp-path",
@ -308,12 +323,13 @@ lazy.setup({
{ {
"tzachar/cmp-fuzzy-buffer", "tzachar/cmp-fuzzy-buffer",
event = "VeryLazy",
dependencies = { "hrsh7th/nvim-cmp", "tzachar/fuzzy.nvim" }, dependencies = { "hrsh7th/nvim-cmp", "tzachar/fuzzy.nvim" },
}, },
{ "tzachar/cmp-fuzzy-path", dependencies = { "hrsh7th/nvim-cmp", "tzachar/fuzzy.nvim" } }, { "tzachar/cmp-fuzzy-path", dependencies = { "hrsh7th/nvim-cmp", "tzachar/fuzzy.nvim" } },
{ {
"saecki/crates.nvim", "saecki/crates.nvim",
event = { "BufRead Cargo.toml" }, event = "VeryLazy",
dependencies = { { "nvim-lua/plenary.nvim" } }, dependencies = { { "nvim-lua/plenary.nvim" } },
config = function() config = function()
require("crates").setup() require("crates").setup()
@ -323,6 +339,7 @@ lazy.setup({
-- DAP, debugger -- DAP, debugger
{ {
"mfussenegger/nvim-dap", "mfussenegger/nvim-dap",
event = "VeryLazy",
config = function() config = function()
require("dap.ext.vscode").load_launchjs() require("dap.ext.vscode").load_launchjs()
require("plugins.configs._dap") require("plugins.configs._dap")
@ -333,6 +350,7 @@ lazy.setup({
-- Python debugger, dapinstall does not play nice with debugpy -- Python debugger, dapinstall does not play nice with debugpy
{ {
"mfussenegger/nvim-dap-python", "mfussenegger/nvim-dap-python",
event = "VeryLazy",
after = "nvim-dap", after = "nvim-dap",
config = function() config = function()
require("plugins.configs.python-dap") require("plugins.configs.python-dap")
@ -342,6 +360,7 @@ lazy.setup({
-- Virtual Text for DAP -- Virtual Text for DAP
{ {
"theHamsta/nvim-dap-virtual-text", "theHamsta/nvim-dap-virtual-text",
event = "VeryLazy",
after = "nvim-dap", after = "nvim-dap",
config = function() config = function()
require("nvim-dap-virtual-text").setup({}) require("nvim-dap-virtual-text").setup({})
@ -351,6 +370,7 @@ lazy.setup({
-- Fancy ui for dap -- Fancy ui for dap
{ {
"rcarriga/nvim-dap-ui", "rcarriga/nvim-dap-ui",
event = "VeryLazy",
after = "nvim-dap", after = "nvim-dap",
config = function() config = function()
require("plugins.configs.dap-ui") require("plugins.configs.dap-ui")
@ -360,6 +380,7 @@ lazy.setup({
-- Code formatting -- Code formatting
{ {
"sbdchd/neoformat", "sbdchd/neoformat",
event = "VeryLazy",
cmd = "Neoformat", cmd = "Neoformat",
config = function() config = function()
require("plugins.configs.neoformat") require("plugins.configs.neoformat")
@ -368,6 +389,7 @@ lazy.setup({
{ {
"anuvyklack/pretty-fold.nvim", "anuvyklack/pretty-fold.nvim",
event = "VeryLazy",
dependencies = "anuvyklack/nvim-keymap-amend", dependencies = "anuvyklack/nvim-keymap-amend",
config = function() config = function()
require("pretty-fold").setup({ require("pretty-fold").setup({
@ -379,6 +401,7 @@ lazy.setup({
-- Git signs -- Git signs
{ {
"lewis6991/gitsigns.nvim", "lewis6991/gitsigns.nvim",
event = "VeryLazy",
config = function() config = function()
require("gitsigns").setup({ require("gitsigns").setup({
current_line_blame = true, current_line_blame = true,
@ -392,7 +415,7 @@ lazy.setup({
-- Highlight certain comments, TODO, BUG, etc. -- Highlight certain comments, TODO, BUG, etc.
{ {
"folke/todo-comments.nvim", "folke/todo-comments.nvim",
event = "BufEnter", event = "VeryLazy",
config = function() config = function()
require("todo-comments").setup({}) require("todo-comments").setup({})
end, end,
@ -401,6 +424,7 @@ lazy.setup({
-- Show possible key bindings during typing -- Show possible key bindings during typing
{ {
"folke/which-key.nvim", "folke/which-key.nvim",
event = "VeryLazy",
config = function() config = function()
require("which-key").setup({}) require("which-key").setup({})
end, end,
@ -409,6 +433,7 @@ lazy.setup({
-- Create full path if not existing on write -- Create full path if not existing on write
{ {
"jghauser/mkdir.nvim", "jghauser/mkdir.nvim",
event = "VeryLazy",
config = function() config = function()
require("mkdir") require("mkdir")
end, end,
@ -417,6 +442,7 @@ lazy.setup({
-- Text commenting -- Text commenting
{ {
"terrortylor/nvim-comment", "terrortylor/nvim-comment",
event = "VeryLazy",
cmd = "CommentToggle", cmd = "CommentToggle",
config = function() config = function()
require("nvim_comment").setup() require("nvim_comment").setup()
@ -426,11 +452,13 @@ lazy.setup({
-- Move selections with alt+movement key -- Move selections with alt+movement key
{ {
"matze/vim-move", "matze/vim-move",
event = "VeryLazy",
}, },
-- Register support in telescope with persistent save -- Register support in telescope with persistent save
{ {
"AckslD/nvim-neoclip.lua", "AckslD/nvim-neoclip.lua",
event = "VeryLazy",
dependencies = { dependencies = {
{ "tami5/sqlite.lua", module = "sqlite" }, { "tami5/sqlite.lua", module = "sqlite" },
{ "nvim-telescope/telescope.nvim" }, { "nvim-telescope/telescope.nvim" },
@ -445,6 +473,7 @@ lazy.setup({
-- Markdown Previewer -- Markdown Previewer
{ {
"iamcco/markdown-preview.nvim", "iamcco/markdown-preview.nvim",
event = "VeryLazy",
build = "cd app && npm install", build = "cd app && npm install",
init = function() init = function()
vim.g.mkdp_filetypes = { "markdown" } vim.g.mkdp_filetypes = { "markdown" }
@ -456,6 +485,7 @@ lazy.setup({
-- Better Git integration -- Better Git integration
{ {
"TimUntersberger/neogit", "TimUntersberger/neogit",
event = "VeryLazy",
config = function() config = function()
require("neogit").setup({ require("neogit").setup({
disable_commit_confirmation = true, disable_commit_confirmation = true,
@ -464,7 +494,7 @@ lazy.setup({
}, },
}) })
end, end,
event = "BufWinEnter", event = "VeryLazy",
dependencies = { dependencies = {
"sindrets/diffview.nvim", "sindrets/diffview.nvim",
}, },
@ -473,11 +503,13 @@ lazy.setup({
-- Ansible Syntax Highlighting -- Ansible Syntax Highlighting
{ {
"pearofducks/ansible-vim", "pearofducks/ansible-vim",
event = "VeryLazy",
}, },
-- Better search display -- Better search display
{ {
"kevinhwang91/nvim-hlslens", "kevinhwang91/nvim-hlslens",
event = "VeryLazy",
module = "hlslens", module = "hlslens",
keys = "/", keys = "/",
config = function() config = function()
@ -502,12 +534,14 @@ lazy.setup({
-- Log Syntax Highlighting -- Log Syntax Highlighting
{ {
"MTDL9/vim-log-highlighting", "MTDL9/vim-log-highlighting",
event = "VeryLazy",
}, },
-- Lots of small modules pulled into -- Lots of small modules pulled into
-- one git repository -- one git repository
{ {
"echasnovski/mini.nvim", "echasnovski/mini.nvim",
event = "VeryLazy",
config = function() config = function()
require("mini.cursorword").setup({}) require("mini.cursorword").setup({})
end, end,
@ -516,6 +550,7 @@ lazy.setup({
-- Smoother Scrolling -- Smoother Scrolling
{ {
"karb94/neoscroll.nvim", "karb94/neoscroll.nvim",
event = "VeryLazy",
config = function() config = function()
require("neoscroll").setup({ require("neoscroll").setup({
easing_function = "circular", easing_function = "circular",
@ -526,6 +561,7 @@ lazy.setup({
-- Generate function/class/etc annotations -- Generate function/class/etc annotations
{ {
"danymat/neogen", "danymat/neogen",
event = "VeryLazy",
dependencies = "nvim-treesitter/nvim-treesitter", dependencies = "nvim-treesitter/nvim-treesitter",
config = function() config = function()
require("neogen").setup({ require("neogen").setup({
@ -544,16 +580,19 @@ lazy.setup({
-- Multiple cursor/multiple visual selection support -- Multiple cursor/multiple visual selection support
{ {
"mg979/vim-visual-multi", "mg979/vim-visual-multi",
event = "VeryLazy",
}, },
-- Editorconfig support -- Editorconfig support
{ {
"gpanders/editorconfig.nvim", "gpanders/editorconfig.nvim",
event = "VeryLazy",
}, },
-- Maintain last cursor position in files -- Maintain last cursor position in files
{ {
"ethanholz/nvim-lastplace", "ethanholz/nvim-lastplace",
event = "VeryLazy",
config = function() config = function()
require("nvim-lastplace").setup({ require("nvim-lastplace").setup({
lastplace_ignore_buftype = { "quickfix", "nofile", "help" }, lastplace_ignore_buftype = { "quickfix", "nofile", "help" },
@ -569,6 +608,7 @@ lazy.setup({
-- More codeactions -- More codeactions
{ {
"ThePrimeagen/refactoring.nvim", "ThePrimeagen/refactoring.nvim",
event = "VeryLazy",
dependencies = { dependencies = {
{ "nvim-lua/plenary.nvim" }, { "nvim-lua/plenary.nvim" },
{ "nvim-treesitter/nvim-treesitter" }, { "nvim-treesitter/nvim-treesitter" },
@ -578,6 +618,7 @@ lazy.setup({
-- Http Request Support -- Http Request Support
{ {
"NTBBloodbath/rest.nvim", "NTBBloodbath/rest.nvim",
event = "VeryLazy",
dependencies = { dependencies = {
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",
}, },
@ -593,6 +634,7 @@ lazy.setup({
-- Allows repeating actions and more -- Allows repeating actions and more
{ {
"anuvyklack/hydra.nvim", "anuvyklack/hydra.nvim",
event = "VeryLazy",
dependencies = { dependencies = {
"anuvyklack/keymap-layer.nvim", "anuvyklack/keymap-layer.nvim",
"lewis6991/gitsigns.nvim", "lewis6991/gitsigns.nvim",
@ -607,6 +649,7 @@ lazy.setup({
-- Faster motions -- Faster motions
{ {
"phaazon/hop.nvim", "phaazon/hop.nvim",
event = "VeryLazy",
config = function() config = function()
-- you can configure Hop the way you like here; see :h hop-config -- you can configure Hop the way you like here; see :h hop-config
require("hop").setup({ keys = "etovxqpdygfblzhckisuran" }) require("hop").setup({ keys = "etovxqpdygfblzhckisuran" })
@ -616,6 +659,7 @@ lazy.setup({
-- Surround actions -- Surround actions
{ {
"kylechui/nvim-surround", "kylechui/nvim-surround",
event = "VeryLazy",
config = function() config = function()
require("nvim-surround").setup({}) require("nvim-surround").setup({})
end, end,
@ -624,6 +668,7 @@ lazy.setup({
-- Better list continuation -- Better list continuation
{ {
"gaoDean/autolist.nvim", "gaoDean/autolist.nvim",
event = "VeryLazy",
ft = { ft = {
"markdown", "markdown",
"text", "text",
@ -638,6 +683,7 @@ lazy.setup({
-- Tint inactive windows -- Tint inactive windows
{ {
"levouh/tint.nvim", "levouh/tint.nvim",
event = "VeryLazy",
config = function() config = function()
require("tint").setup({ require("tint").setup({
highlight_ignore_patterns = { "WinSeparator" }, highlight_ignore_patterns = { "WinSeparator" },
@ -650,6 +696,7 @@ lazy.setup({
-- Highlight argument definitions and usages -- Highlight argument definitions and usages
{ {
"m-demare/hlargs.nvim", "m-demare/hlargs.nvim",
event = "VeryLazy",
dependencies = { "nvim-treesitter/nvim-treesitter" }, dependencies = { "nvim-treesitter/nvim-treesitter" },
config = function() config = function()
require("hlargs").setup({}) require("hlargs").setup({})
@ -659,6 +706,7 @@ lazy.setup({
-- Vim Latex Support -- Vim Latex Support
{ {
"lervag/vimtex", "lervag/vimtex",
event = "VeryLazy",
ft = "tex", ft = "tex",
config = function() config = function()
vim.g.vimtext_view_method = "zathura" vim.g.vimtext_view_method = "zathura"
@ -668,6 +716,7 @@ lazy.setup({
{ {
"akinsho/toggleterm.nvim", "akinsho/toggleterm.nvim",
event = "VeryLazy",
config = function() config = function()
require("toggleterm").setup({ require("toggleterm").setup({
start_in_insert = false, start_in_insert = false,
@ -694,6 +743,7 @@ lazy.setup({
-- Take a screenshot of code selected -- Take a screenshot of code selected
{ {
"NarutoXY/silicon.lua", "NarutoXY/silicon.lua",
event = "VeryLazy",
dependencies = { "nvim-lua/plenary.nvim" }, dependencies = { "nvim-lua/plenary.nvim" },
config = function() config = function()
require("silicon").setup({}) require("silicon").setup({})
@ -703,6 +753,7 @@ lazy.setup({
-- Nice sidebar cursor goodies -- Nice sidebar cursor goodies
{ {
"gen740/SmoothCursor.nvim", "gen740/SmoothCursor.nvim",
event = "VeryLazy",
after = "kanagawa.nvim", after = "kanagawa.nvim",
config = function() config = function()
require("smoothcursor").setup({ require("smoothcursor").setup({
@ -727,6 +778,7 @@ lazy.setup({
-- Color Picker -- Color Picker
{ {
"uga-rosa/ccc.nvim", "uga-rosa/ccc.nvim",
event = "VeryLazy",
config = function() config = function()
require("plugins.configs.ccc") require("plugins.configs.ccc")
end, end,
@ -742,6 +794,7 @@ lazy.setup({
-- Task runner & job management -- Task runner & job management
{ {
"stevearc/overseer.nvim", "stevearc/overseer.nvim",
event = "VeryLazy",
config = function() config = function()
require("overseer").setup() require("overseer").setup()
end, end,
@ -750,11 +803,12 @@ lazy.setup({
-- Better buffer deletion -- Better buffer deletion
{ {
"famiu/bufdelete.nvim", "famiu/bufdelete.nvim",
event = "VeryLazy",
}, },
}, { }, {
checker = { checker = {
enabled = true, enabled = true,
concurrency = 20 concurrency = 20,
}, },
lockfile = vim.fn.stdpath('data') .. '/lazy-lock.json' lockfile = vim.fn.stdpath("data") .. "/lazy-lock.json",
}) })