aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2022-07-06 15:08:01 +0100
committerJuan J. Martinez <jjm@usebox.net>2022-07-06 15:08:01 +0100
commit1d7726b493edae02652a9143687bd2bd697b7235 (patch)
treefc4f4323e9fa85d646cb067874dd59371f8d4099
parentc4caa1a935e5549ea776b9ddf2ac68d69a7bcc7d (diff)
downloaddotnvim-1d7726b493edae02652a9143687bd2bd697b7235.tar.gz
dotnvim-1d7726b493edae02652a9143687bd2bd697b7235.zip
Missing file
-rw-r--r--cmp.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/cmp.lua b/cmp.lua
new file mode 100644
index 0000000..1e96706
--- /dev/null
+++ b/cmp.lua
@@ -0,0 +1,17 @@
+-- Setup nvim-cmp.
+local cmp = require'cmp'
+
+cmp.setup({
+ snippet = {
+ expand = function(args)
+ vim.fn["vsnip#anonymous"](args.body)
+ end,
+ },
+ mapping = cmp.mapping.preset.insert({
+ ['<CR>'] = cmp.mapping.confirm({ select = true }),
+ }),
+ sources = cmp.config.sources({
+ { name = 'nvim_lsp' },
+ { name = 'vsnip' },
+ })
+})