diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2024-05-09 16:45:45 -0400 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2024-05-09 16:45:45 -0400 |
commit | 41365e2b1d6ec38d7514e94d6ff191ae37dd4250 (patch) | |
tree | 809f9d8d0b39f5a07632c28b5bccf44b8528cdb3 /lua | |
parent | 26a0660f278d78e049364e69f4ebaa39e8cf1116 (diff) |
Diffstat (limited to 'lua')
-rw-r--r-- | lua/cshift/plugins/cmp.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lua/cshift/plugins/cmp.lua b/lua/cshift/plugins/cmp.lua index a1e80b4..ae490f5 100644 --- a/lua/cshift/plugins/cmp.lua +++ b/lua/cshift/plugins/cmp.lua @@ -3,6 +3,8 @@ return { dependencies = { "neovim/nvim-lspconfig", "hrsh7th/cmp-nvim-lsp", + "L3MON4D3/LuaSnip", + "saadparwaiz1/cmp_luasnip", }, config = function() @@ -10,12 +12,21 @@ return { cmp.setup({ snippit = { expand = function(args) + require('luasnip').lsp_expand(args.body) end }, window = { }, + mapping = cmp.mapping.preset.insert({ + ['<C-b>'] = cmp.mapping.scroll_docs(-4), + ['<C-f>'] = cmp.mapping.scroll_docs(4), + ['<C-Space>'] = cmp.mapping.complete(), + ['<C-e>'] = cmp.mapping.abort(), + ['<S-CR>'] = cmp.mapping.confirm({select=true}), + }), + sources = cmp.config.sources({ {name = "nvim_lsp"} }, { |