From 0d3c651897f9e4b3a7e97b327d4a6574fe350b6c Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Thu, 4 Apr 2024 01:38:02 +0200 Subject: nvim some more plugins --- nvim/lua/plugins/completion.lua | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 nvim/lua/plugins/completion.lua (limited to 'nvim/lua/plugins/completion.lua') diff --git a/nvim/lua/plugins/completion.lua b/nvim/lua/plugins/completion.lua new file mode 100644 index 0000000..4d46317 --- /dev/null +++ b/nvim/lua/plugins/completion.lua @@ -0,0 +1,31 @@ +return { + { + "hrsh7th/nvim-cmp", + dependencies = { + 'neovim/nvim-lspconfig', + 'hrsh7th/cmp-nvim-lsp', + 'hrsh7th/cmp-buffer', + 'hrsh7th/cmp-path', + 'hrsh7th/cmp-cmdline' + }, + config = function() + local cmp = require'cmp' + cmp.setup { + snippet = { + expand = function() + vim.snippet.expand(args.body) + end, + }, + window = { + completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered(), + }, + sources = cmp.config.sources({ + { name = 'nvim_lsp' }, + },{ + { name = 'buffer' }, + }) + } + end, + }, +} -- cgit v1.2.3