diff options
| author | pml68 <tutorialmester@gmail.com> | 2024-03-18 21:33:54 +0100 |
|---|---|---|
| committer | pml68 <tutorialmester@gmail.com> | 2024-03-18 21:33:54 +0100 |
| commit | 30073d82a57a4839f9687c9dbcde627c112b1839 (patch) | |
| tree | efe4ff05512462fc94edeea7c1f5996149cfa96c /lua/pml68/configs/cmp.lua | |
| parent | feat: missed the Float part (diff) | |
| download | nvim-30073d82a57a4839f9687c9dbcde627c112b1839.tar.gz | |
feat: autocompletion, keymaps and more
Diffstat (limited to '')
| -rw-r--r-- | lua/pml68/configs/cmp.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lua/pml68/configs/cmp.lua b/lua/pml68/configs/cmp.lua new file mode 100644 index 0000000..ff69651 --- /dev/null +++ b/lua/pml68/configs/cmp.lua @@ -0,0 +1,21 @@ +local cmp = require("cmp") + +cmp.setup({ + sources = { + {name = 'nvim_lsp'}, + }, + preselect = 'item', + completion = { + completeopt = 'menu,menuone,noinsert' + }, + mapping = cmp.mapping.preset.insert({ + ['<CR>'] = cmp.mapping.confirm({select = false}), + ['<S-Tab>'] = cmp.mapping.select_prev_item({behavior = 'select'}), + ['<Tab>'] = cmp.mapping.select_next_item({behavior = 'select'}), + }), + snippet = { + expand = function(args) + require('luasnip').lsp_expand(args.body) + end, + }, +}) |
