diff options
Diffstat (limited to 'nvim/lua')
-rw-r--r-- | nvim/lua/plugins/completion.lua | 25 | ||||
-rw-r--r-- | nvim/lua/plugins/hardline.lua | 1 |
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, } |