From 3403d072e2e791e5f0dd11285eb0acd4e278360c Mon Sep 17 00:00:00 2001 From: Daniel Carrillo Date: Sat, 28 Jan 2023 18:14:14 +0100 Subject: [PATCH] [neovim] Add lazy events to some plugins --- .config/nvim/lazy-lock.json | 26 +++++------ .config/nvim/lua/core/plugins.lua | 57 +++++++++++++---------- .config/nvim/lua/plugins/init.lua | 1 - .config/nvim/lua/plugins/lsp/lsp-saga.lua | 3 -- 4 files changed, 45 insertions(+), 42 deletions(-) diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 754bf66..a22b362 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -1,7 +1,7 @@ { "Comment.nvim": { "branch": "master", "commit": "d9cfae1059b62f7eacc09dba181efe4894e3b086" }, "DAPInstall.nvim": { "branch": "main", "commit": "8798b4c36d33723e7bba6ed6e2c202f84bb300de" }, - "LuaSnip": { "branch": "master", "commit": "563827f00bb4fe43269e3be653deabc0005f1302" }, + "LuaSnip": { "branch": "master", "commit": "500981ff6cefc7343e3959ef0f939bd0bfd49ba9" }, "auto-save.nvim": { "branch": "main", "commit": "4b59610e1318f8a89501cee9d47a0e8650f0a4d5" }, "b64.nvim": { "branch": "main", "commit": "12dde6ebc3035f010833f513cfbd9abad92b28b3" }, "bufferline.nvim": { "branch": "main", "commit": "028a87933d99f8bb88f2f70a4def3ff9574f3594" }, @@ -9,33 +9,33 @@ "cmp-nvim-lsp": { "branch": "main", "commit": "59224771f91b86d1de12570b4070fe4ad7cd1eeb" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, - "diffview.nvim": { "branch": "main", "commit": "b3a8a4fa7d8f621eadd299bda61be417411c5a2a" }, - "friendly-snippets": { "branch": "main", "commit": "046e4d3491baf664e0eef5231d28beb49333578b" }, + "diffview.nvim": { "branch": "main", "commit": "dc77f487b292c4a89dd437d80331e3aacbe3aaed" }, + "friendly-snippets": { "branch": "main", "commit": "a6f7a1609addb4e57daa6bedc300f77f8d225ab7" }, "fzy-lua-native": { "branch": "master", "commit": "085c7d262aa35cc55a8523e8c1618d398bf717a7" }, "git-blame.nvim": { "branch": "master", "commit": "5ddf157139ecfc0d2161f00c2cce4874578dc355" }, "gitsigns.nvim": { "branch": "main", "commit": "bb808fc7376ed7bac0fbe8f47b83d4bf01738167" }, - "go.nvim": { "branch": "master", "commit": "adab4c599d65aed7e3840dc713f2c46864410721" }, - "guihua.lua": { "branch": "master", "commit": "1a8af45b2117d28ca56d38c275af1c211f0ffd94" }, + "go.nvim": { "branch": "master", "commit": "c74af231c78176ea5fdc5529e7b1a1a301f3427a" }, + "guihua.lua": { "branch": "master", "commit": "8c0288e9b256931161fd4bd2ff69251b538c1776" }, "indent-blankline.nvim": { "branch": "master", "commit": "8299fe7703dfff4b1752aeed271c3b95281a952d" }, "lazy.nvim": { "branch": "main", "commit": "15fe46a728b7473d4cae368838bbc1c79c3a3f48" }, - "lspsaga.nvim": { "branch": "main", "commit": "c8edd1b76e9f3fa5a91d7f6a08326328509e6c0e" }, + "lspsaga.nvim": { "branch": "main", "commit": "aae60979aa328be90e4b39455ae8be4a8ea0a787" }, "lualine-lsp-progress": { "branch": "master", "commit": "56842d097245a08d77912edf5f2a69ba29f275d7" }, "lualine.nvim": { "branch": "master", "commit": "0050b308552e45f7128f399886c86afefc3eb988" }, "markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "422b9745143150e16cd3fe331c74f6737de75e72" }, - "mason.nvim": { "branch": "main", "commit": "621730a9911ff7544e6aab5570748c342ba8b1f7" }, + "mason.nvim": { "branch": "main", "commit": "2469bfc2538652cb0cf88c129f67d38e46a9cb59" }, "neo-tree.nvim": { "branch": "v2.x", "commit": "8238865e1d9c61f1a260c290653f2c419503e0a9" }, "nui.nvim": { "branch": "main", "commit": "b99e6cb13dc51768abc1c4c8585045a0c0459ef1" }, - "null-ls.nvim": { "branch": "main", "commit": "2ff0a4ed1985d04bae3f21915ee0b1be3932c164" }, + "null-ls.nvim": { "branch": "main", "commit": "7b2b28e207a1df4ebb13c7dc0bd83f69b5403d71" }, "nvim-autopairs": { "branch": "master", "commit": "31042a5823b55c4bfb30efcbba2fc1b5b53f90dc" }, "nvim-cmp": { "branch": "main", "commit": "e7e2ef7031db8e0cfad7ad9916ec766ddd9dbb3b" }, "nvim-dap": { "branch": "master", "commit": "700a3c7d6fbe5b07bee74e9952b456120d355c47" }, "nvim-dap-ui": { "branch": "master", "commit": "1e21b3b50e67700e32285b5a74e645311fd8bbea" }, - "nvim-dap-virtual-text": { "branch": "master", "commit": "191345947a92a5188d791e9786a5b4f205dcaca3" }, - "nvim-lspconfig": { "branch": "master", "commit": "1d3203b4c39ea5ec63cf1271d9e3b14a91706897" }, - "nvim-treesitter": { "branch": "master", "commit": "6ae94e0341bead5bc00c4d14396fb7fd28629d3a" }, + "nvim-dap-virtual-text": { "branch": "master", "commit": "7f7f2af549e72a0b7bddc3b4f827beb027ea8ce3" }, + "nvim-lspconfig": { "branch": "master", "commit": "1e988250a0f52a68ddb72905d623405d634e9c5d" }, + "nvim-treesitter": { "branch": "master", "commit": "5812ae26f749f38fb6a315bd0c3544e6ed9905d4" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "a0f89563ba36b3bacd62cf967b46beb4c2c29e52" }, - "nvim-web-devicons": { "branch": "master", "commit": "3548363849878ef895ce54edda02421279b419d8" }, + "nvim-web-devicons": { "branch": "master", "commit": "a421d183ef37dfa13f51a5805bed2381aebf9080" }, "plenary.nvim": { "branch": "master", "commit": "1c7e3e6b0f4dd5a174fcea9fda8a4d7de593b826" }, "projections.nvim": { "branch": "main", "commit": "6820ad90343b5ec78f236bbe0e13d9c8078a0c48" }, "sad.nvim": { "branch": "master", "commit": "e8ab74c7a506f96a823527bfa78a66681483120b" }, @@ -49,4 +49,4 @@ "vim-markdown-toc": { "branch": "master", "commit": "7ec05df27b4922830ace2246de36ac7e53bea1db" }, "vim-visual-multi": { "branch": "master", "commit": "1c9207b28c8898ab01b54e6d6b61b0b820a814bc" }, "wilder.nvim": { "branch": "master", "commit": "679f348dc90d80ff9ba0e7c470c40a4d038dcecf" } -} +} \ No newline at end of file diff --git a/.config/nvim/lua/core/plugins.lua b/.config/nvim/lua/core/plugins.lua index de9379c..942d705 100644 --- a/.config/nvim/lua/core/plugins.lua +++ b/.config/nvim/lua/core/plugins.lua @@ -44,52 +44,59 @@ lazy.setup({ }, -- Plugins - { "nvim-lua/plenary.nvim" }, + { "nvim-lua/plenary.nvim", lazy = true }, { "windwp/nvim-autopairs" }, { "numToStr/Comment.nvim", version = "v0.*" }, { "JoosepAlviste/nvim-ts-context-commentstring" }, - { "kyazdani42/nvim-web-devicons" }, - { "akinsho/bufferline.nvim", version = "v3.*" }, + { "kyazdani42/nvim-web-devicons", lazy = true }, + { "akinsho/bufferline.nvim", event = "VeryLazy", version = "v3.*" }, { "moll/vim-bbye" }, - { "nvim-lualine/lualine.nvim" }, - { "lukas-reineke/indent-blankline.nvim", version = "v2.*" }, - { "nvim-zh/auto-save.nvim" }, + { "nvim-lualine/lualine.nvim", event = "VeryLazy" }, + { "lukas-reineke/indent-blankline.nvim", event = "BufReadPost", version = "v2.*" }, + { "nvim-zh/auto-save.nvim", event = "BufReadPost" }, { "gelguy/wilder.nvim" }, { "romgrk/fzy-lua-native" }, { "mg979/vim-visual-multi", version = "v0.*" }, { "gnikdroy/projections.nvim" }, - { "nvim-treesitter/nvim-treesitter" }, - { "ray-x/sad.nvim" }, + { "nvim-treesitter/nvim-treesitter", event = "BufReadPost" }, + { "ray-x/sad.nvim", cmd = "Sad" }, { "nvim-neo-tree/neo-tree.nvim", version = "v2.x", dependencies = { "MunifTanjim/nui.nvim" }, }, - { "taybart/b64.nvim" }, + { "taybart/b64.nvim", event = "VeryLazy" }, -- cmp plugins - { "hrsh7th/nvim-cmp" }, - { "hrsh7th/cmp-buffer" }, - { "hrsh7th/cmp-path" }, - { "saadparwaiz1/cmp_luasnip" }, - { "hrsh7th/cmp-nvim-lsp" }, + { + "hrsh7th/nvim-cmp", + event = "InsertEnter", + dependencies = { + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + "saadparwaiz1/cmp_luasnip", + "hrsh7th/cmp-nvim-lsp", + }, + }, -- Snippets { "L3MON4D3/LuaSnip", version = "v1.*" }, { "rafamadriz/friendly-snippets" }, -- LSP - { "neovim/nvim-lspconfig" }, + { + "neovim/nvim-lspconfig", event = "BufReadPre", + }, { "williamboman/mason.nvim" }, { "williamboman/mason-lspconfig.nvim" }, - { "jose-elias-alvarez/null-ls.nvim" }, - { "RRethy/vim-illuminate" }, - { "folke/trouble.nvim" }, - { "glepnir/lspsaga.nvim" }, + { "jose-elias-alvarez/null-ls.nvim", event = "BufReadPre" }, + { "RRethy/vim-illuminate", event = "BufReadPost" }, + { "folke/trouble.nvim", cmd = { "TroubleToggle", "Trouble" } }, + { "glepnir/lspsaga.nvim", event = "BufRead" }, { "arkav/lualine-lsp-progress" }, -- Telescope - { "nvim-telescope/telescope.nvim" }, + { "nvim-telescope/telescope.nvim", cmd = "Telescope" }, { "nvim-telescope/telescope-ui-select.nvim" }, { "nvim-telescope/telescope-fzf-native.nvim", @@ -97,15 +104,15 @@ lazy.setup({ }, -- Git - { "lewis6991/gitsigns.nvim", version = "v0.*" }, + { "lewis6991/gitsigns.nvim", event = "BufReadPre", version = "v0.*" }, { "sindrets/diffview.nvim" }, { "f-person/git-blame.nvim" }, -- DAP - { "mfussenegger/nvim-dap", version = "0.*" }, - { "rcarriga/nvim-dap-ui", version = "v2.*" }, - { "ravenxrz/DAPInstall.nvim" }, - { "theHamsta/nvim-dap-virtual-text" }, + { "mfussenegger/nvim-dap", event = "VeryLazy", version = "0.*" }, + { "rcarriga/nvim-dap-ui", event = "VeryLazy", version = "v2.*" }, + { "ravenxrz/DAPInstall.nvim", event = "VeryLazy" }, + { "theHamsta/nvim-dap-virtual-text", event = "VeryLazy" }, -- Go { "ray-x/go.nvim" }, diff --git a/.config/nvim/lua/plugins/init.lua b/.config/nvim/lua/plugins/init.lua index 25007e8..5855b7a 100644 --- a/.config/nvim/lua/plugins/init.lua +++ b/.config/nvim/lua/plugins/init.lua @@ -1,4 +1,3 @@ -require("plugins.impatient") require("plugins.cmp") require("plugins.telescope") require("plugins.treesitter") diff --git a/.config/nvim/lua/plugins/lsp/lsp-saga.lua b/.config/nvim/lua/plugins/lsp/lsp-saga.lua index 777d470..349c697 100644 --- a/.config/nvim/lua/plugins/lsp/lsp-saga.lua +++ b/.config/nvim/lua/plugins/lsp/lsp-saga.lua @@ -7,9 +7,6 @@ lsp_saga.setup({ ui = { border = "rounded", code_action_icon = "", - colors = { - normal_bg = "#222436", - }, }, preview = { lines_above = 5,