From 58ae25ee12273c9175409bb1b337eefacf099fa8 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 10 Dec 2022 19:29:28 +0100 Subject: [PATCH] lazy load cmp --- lua/my_plugins.lua | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 9fa6d4f..9a62fc3 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -95,26 +95,26 @@ return require('packer').startup(function() use({ 'hrsh7th/nvim-cmp', 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' }, - { 'dmitmel/cmp-cmdline-history' }, - { 'ray-x/cmp-treesitter' }, - { 'hrsh7th/cmp-nvim-lsp-signature-help' }, + { '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' }, + { 'dmitmel/cmp-cmdline-history', after = 'nvim-cmp' }, + { 'ray-x/cmp-treesitter', after = 'nvim-cmp' }, + { 'hrsh7th/cmp-nvim-lsp-signature-help', after = 'nvim-cmp' }, { 'p00f/clangd_extensions.nvim' }, - { 'rcarriga/cmp-dap', - opt = true, - module = 'cmp_dap' }, }, config = get_setup('my_cmp'), + module = { "nvim-cmp", "cmp" }, + event = "InsertEnter *", + }) use({ 'L3MON4D3/LuaSnip', config = get_setup('luasnip'), @@ -238,6 +238,10 @@ return require('packer').startup(function() 'rcarriga/nvim-dap-ui', module = 'dapui' }, + { + 'rcarriga/cmp-dap', + module = 'cmp_dap' + }, }, keys = { { 'n', '' },