From f8e686a33461e5498264c7b384ca6ce90d54bd94 Mon Sep 17 00:00:00 2001 From: tastytea Date: Fri, 12 Aug 2022 15:21:26 +0200 Subject: [PATCH] nvim: reqrite completion config --- .config/nvim/lua/my/completion.lua | 39 ++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/.config/nvim/lua/my/completion.lua b/.config/nvim/lua/my/completion.lua index 6f9dc1f..68d8c1f 100644 --- a/.config/nvim/lua/my/completion.lua +++ b/.config/nvim/lua/my/completion.lua @@ -1,12 +1,8 @@ require('my/plugins') -packer.use 'https://github.com/hrsh7th/cmp-nvim-lsp' -packer.use 'https://github.com/hrsh7th/cmp-buffer' -packer.use 'https://github.com/hrsh7th/cmp-path' -packer.use 'https://github.com/hrsh7th/cmp-cmdline' -packer.use 'https://github.com/hrsh7th/cmp-nvim-lua' packer.use { 'https://github.com/hrsh7th/nvim-cmp', + requires = 'https://github.com/L3MON4D3/LuaSnip', config = function() local cmp = require'cmp' if cmp == nil then @@ -75,3 +71,36 @@ 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', +-- } +