aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2024-04-09 01:00:18 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2024-04-09 01:00:18 +0200
commitc35067aa197500f78693091873acd15994355685 (patch)
tree5fae079684d11ce3eec21f4f385fac8007fba3e0
parentcb09ea51e017d4ed942bf4626ab1ddeb52e8cf46 (diff)
downloaddotfiles-c35067aa197500f78693091873acd15994355685.tar.gz
nvim plugins
-rw-r--r--nvim/lua/plugins/completion.lua25
-rw-r--r--nvim/lua/plugins/hardline.lua1
2 files changed, 22 insertions, 4 deletions
diff --git a/nvim/lua/plugins/completion.lua b/nvim/lua/plugins/completion.lua
index 4d46317..1a4ef7a 100644
--- a/nvim/lua/plugins/completion.lua
+++ b/nvim/lua/plugins/completion.lua
@@ -2,30 +2,47 @@ return {
{
"hrsh7th/nvim-cmp",
dependencies = {
- 'neovim/nvim-lspconfig',
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-path',
- 'hrsh7th/cmp-cmdline'
+ 'hrsh7th/cmp-cmdline',
+ 'hrsh7th/cmp-vsnip',
+ 'hrsh7th/vim-vsnip'
},
config = function()
local cmp = require'cmp'
cmp.setup {
snippet = {
- expand = function()
- vim.snippet.expand(args.body)
+ expand = function(args)
+ vim.fn["vsnip#anonymous"](args.body)
end,
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
+ mapping = cmp.mapping.preset.insert({
+ ['<C-Space>'] = cmp.mapping.complete(),
+ ['<C-e>'] = cmp.mapping.abort(),
+ ['<CR>'] = cmp.mapping.confirm({ select = true }),
+ }),
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
+ { name = 'vsnip' },
},{
{ name = 'buffer' },
})
}
end,
+ },{
+ 'neovim/nvim-lspconfig',
+ config = function()
+ local lspconfig = require('lspconfig')
+
+ lspconfig.rust_analyzer.setup {}
+ lspconfig.pyright.setup {}
+ lspconfig.clangd.setup {}
+ end,
+
},
}
diff --git a/nvim/lua/plugins/hardline.lua b/nvim/lua/plugins/hardline.lua
index d756f79..53d0ee8 100644
--- a/nvim/lua/plugins/hardline.lua
+++ b/nvim/lua/plugins/hardline.lua
@@ -3,6 +3,7 @@ return {
"ojroques/nvim-hardline",
config = function()
require("hardline").setup {
+ bufferline = true,
}
end,
}