From 1bf1458f4e9956273565feb22c592b27ea52c0e0 Mon Sep 17 00:00:00 2001 From: tastytea Date: Fri, 12 Aug 2022 18:54:03 +0200 Subject: [PATCH] nvim: completion: fix no workie after repeated compile I re-arranged the dependencies. Now it looks more like the example in the readme. --- .config/nvim/lua/my/completion.lua | 40 ++++++------------------------ .config/nvim/lua/my/lsp.lua | 3 --- 2 files changed, 8 insertions(+), 35 deletions(-) diff --git a/.config/nvim/lua/my/completion.lua b/.config/nvim/lua/my/completion.lua index 9c350cb..a82a80e 100644 --- a/.config/nvim/lua/my/completion.lua +++ b/.config/nvim/lua/my/completion.lua @@ -3,6 +3,14 @@ require('my/plugins') packer.use { 'https://github.com/hrsh7th/nvim-cmp', requires = { + { + 'https://github.com/hrsh7th/cmp-nvim-lsp', + requires = 'https://github.com/neovim/nvim-lspconfig'; + }, + 'https://github.com/hrsh7th/cmp-buffer', + 'https://github.com/hrsh7th/cmp-path', + 'https://github.com/hrsh7th/cmp-cmdline', + -- 'https://github.com/hrsh7th/cmp-nvim-lua', { 'https://github.com/saadparwaiz1/cmp_luasnip', requires = 'https://github.com/L3MON4D3/LuaSnip' @@ -76,35 +84,3 @@ packer.use { }) end } - -packer.use { - 'https://github.com/hrsh7th/cmp-nvim-lsp', - requires = 'https://github.com/hrsh7th/nvim-cmp', - config = function() - require'cmp'.setup { - sources = { - name = 'nvim_lsp' - } - } - end -} - -packer.use { - 'https://github.com/hrsh7th/cmp-buffer', - requires = 'https://github.com/hrsh7th/nvim-cmp', -} - -packer.use { - 'https://github.com/hrsh7th/cmp-path', - requires = 'https://github.com/hrsh7th/nvim-cmp', -} - -packer.use { - 'https://github.com/hrsh7th/cmp-cmdline', - requires = 'https://github.com/hrsh7th/nvim-cmp', -} - --- packer.use { --- 'https://github.com/hrsh7th/cmp-nvim-lua', --- requires = 'https://github.com/hrsh7th/nvim-cmp', --- } diff --git a/.config/nvim/lua/my/lsp.lua b/.config/nvim/lua/my/lsp.lua index 85aa4c6..d7e13af 100644 --- a/.config/nvim/lua/my/lsp.lua +++ b/.config/nvim/lua/my/lsp.lua @@ -4,9 +4,6 @@ require('my/completion') packer.use { 'https://github.com/neovim/nvim-lspconfig', - requires = { - 'https://github.com/hrsh7th/cmp-nvim-lsp' - }, config = function() map('n', '', vim.diagnostic.goto_prev) map('n', '', vim.diagnostic.goto_next)