aboutsummaryrefslogtreecommitdiff
path: root/nvim/lua/plugins/completion.lua
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2024-04-04 01:38:02 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2024-04-04 01:38:02 +0200
commit0d3c651897f9e4b3a7e97b327d4a6574fe350b6c (patch)
tree65353bba1e82dd4ea2c20a4c4bee89c6d2f282c3 /nvim/lua/plugins/completion.lua
parentc511b5f4c99c152b56985cda8eef2d2bb42df412 (diff)
downloaddotfiles-0d3c651897f9e4b3a7e97b327d4a6574fe350b6c.tar.gz
nvim some more plugins
Diffstat (limited to 'nvim/lua/plugins/completion.lua')
-rw-r--r--nvim/lua/plugins/completion.lua31
1 files changed, 31 insertions, 0 deletions
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,
+ },
+}