diff options
author | Damjan 9000 <damjan.9000@gmail.com> | 2024-02-26 20:46:46 +0100 |
---|---|---|
committer | Damjan 9000 <damjan.9000@gmail.com> | 2024-02-26 21:15:29 +0100 |
commit | 1ff3a155aab8ef8f9d14b51c382319fcd14e4da3 (patch) | |
tree | ff8e7695094365a18c3ca21bda1bd3f0bcf83444 /lua/cmp-setup.lua | |
parent | 4e7e6642a6a5b76c0dbb0e86748fcb12b4c95012 (diff) | |
parent | 8b5d48a199c02658e399f5b43ff8d06df1ede7fb (diff) |
Merge 'upstream/master' rewrite: slimmer, trimmer and more lazy kickstart.nvim
Diffstat (limited to 'lua/cmp-setup.lua')
-rw-r--r-- | lua/cmp-setup.lua | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/lua/cmp-setup.lua b/lua/cmp-setup.lua deleted file mode 100644 index 3ccd00c..0000000 --- a/lua/cmp-setup.lua +++ /dev/null @@ -1,53 +0,0 @@ --- [[ Configure nvim-cmp ]] --- See `:help cmp` -local cmp = require 'cmp' -local luasnip = require 'luasnip' -require('luasnip.loaders.from_vscode').lazy_load() -luasnip.config.setup {} - -cmp.setup { - snippet = { - expand = function(args) - luasnip.lsp_expand(args.body) - end, - }, - completion = { - completeopt = 'menu,menuone,noinsert', - }, - mapping = cmp.mapping.preset.insert { - ['<C-n>'] = cmp.mapping.select_next_item(), - ['<C-p>'] = cmp.mapping.select_prev_item(), - ['<C-b>'] = cmp.mapping.scroll_docs(-4), - ['<C-f>'] = cmp.mapping.scroll_docs(4), - ['<C-Space>'] = cmp.mapping.complete {}, - ['<CR>'] = cmp.mapping.confirm { - behavior = cmp.ConfirmBehavior.Replace, - select = true, - }, - ['<Tab>'] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif luasnip.expand_or_locally_jumpable() then - luasnip.expand_or_jump() - else - fallback() - end - end, { 'i', 's' }), - ['<S-Tab>'] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif luasnip.locally_jumpable(-1) then - luasnip.jump(-1) - else - fallback() - end - end, { 'i', 's' }), - }, - sources = { - { name = 'nvim_lsp' }, - { name = 'luasnip' }, - { name = 'path' }, - }, -} - --- vim: ts=2 sts=2 sw=2 et |