From f307fb2124fd453ed5e7b2ebfe6842cbbedd8340 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 1 Apr 2022 23:15:25 +0200 Subject: [PATCH 1/3] Don't autoinstall groovyls --- lua/setup/lspinstall.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/setup/lspinstall.lua b/lua/setup/lspinstall.lua index 977c111..a48fbf4 100644 --- a/lua/setup/lspinstall.lua +++ b/lua/setup/lspinstall.lua @@ -93,7 +93,6 @@ local servers = { 'cmake', 'clangd', 'jsonls', - 'groovyls', 'sumneko_lua', 'dockerls', } From 4462d4af5c6222f89bafee0ca7f9b3a3fe2c2c73 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 1 Apr 2022 23:15:33 +0200 Subject: [PATCH 2/3] lazy load snippets --- lua/setup/luasnip.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/setup/luasnip.lua b/lua/setup/luasnip.lua index 86ca7dc..8627e83 100644 --- a/lua/setup/luasnip.lua +++ b/lua/setup/luasnip.lua @@ -52,4 +52,4 @@ ls.snippets = { }) }, } -require('luasnip.loaders.from_vscode').load() +require('luasnip.loaders.from_vscode').lazy_load() From ee3b97648ab616cea042bcbba848b366627ae904 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 1 Apr 2022 23:38:59 +0200 Subject: [PATCH 3/3] Some lazy loading of plugins --- lua/my_plugins.lua | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 880b5ea..03a4085 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -38,6 +38,7 @@ return require('packer').startup(function() use({ 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate', + event = 'BufRead', config = get_setup('treesitter'), }) use({ @@ -78,22 +79,23 @@ return require('packer').startup(function() }) use({ 'hrsh7th/nvim-cmp', + event = 'InsertEnter', requires = { - 'hrsh7th/cmp-buffer', - 'hrsh7th/cmp-nvim-lsp', - 'L3MON4D3/LuaSnip', - 'saadparwaiz1/cmp_luasnip', - 'hrsh7th/cmp-nvim-lua', - 'octaltree/cmp-look', - 'hrsh7th/cmp-path', - 'hrsh7th/cmp-calc', - 'f3fora/cmp-spell', - 'hrsh7th/cmp-emoji', - 'hrsh7th/cmp-cmdline', + { 'hrsh7th/cmp-buffer', after = 'nvim-cmp' }, + { 'hrsh7th/cmp-nvim-lsp', after = 'nvim-cmp' }, + { 'L3MON4D3/LuaSnip', after = 'nvim-cmp' }, + { 'saadparwaiz1/cmp_luasnip', after = 'nvim-cmp' }, + { 'hrsh7th/cmp-nvim-lua', after = 'nvim-cmp' }, + { 'octaltree/cmp-look', after = 'nvim-cmp' }, + { 'hrsh7th/cmp-path', after = 'nvim-cmp' }, + { 'hrsh7th/cmp-calc', after = 'nvim-cmp' }, + { 'f3fora/cmp-spell', after = 'nvim-cmp' }, + { 'hrsh7th/cmp-emoji', after = 'nvim-cmp' }, + { 'hrsh7th/cmp-cmdline', after = 'nvim-cmp' }, }, config = get_setup('cmp'), }) - use({ 'L3MON4D3/LuaSnip', config = get_setup('luasnip') }) + use({ 'L3MON4D3/LuaSnip', event = 'InsertEnter', config = get_setup('luasnip') }) use({ 'rafamadriz/friendly-snippets' }) use({ 'onsails/lspkind-nvim' }) use({ 'Shatur/neovim-cmake', requires = { 'mfussenegger/nvim-dap' }, config = get_setup('cmake') }) @@ -106,7 +108,7 @@ return require('packer').startup(function() 'ahmedkhalf/project.nvim', config = get_setup('project'), }) - use({ 'p00f/nvim-ts-rainbow' }) + use({ 'p00f/nvim-ts-rainbow', requires = 'nvim-treesitter/nvim-treesitter', after = 'nvim-treesitter' }) use({ 'windwp/nvim-autopairs', config = get_setup('nvim-autopairs'), @@ -131,12 +133,14 @@ return require('packer').startup(function() use({ 'danymat/neogen', requires = 'nvim-treesitter/nvim-treesitter', + after = 'nvim-treesitter', config = get_setup('neogen'), }) use({ 'abecodes/tabout.nvim' }) use({ 'stevearc/dressing.nvim' }) use({ 'nvim-treesitter/nvim-treesitter-textobjects', + after = 'nvim-treesitter', requires = 'nvim-treesitter/nvim-treesitter', }) use({