From 75793a911de3648963385c70237fc737f1967e9d Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Thu, 17 Oct 2024 22:45:09 -0500 Subject: nvim add tab complete --- nvim/lua/tjk/plugins/cmp.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'nvim/lua/tjk/plugins/cmp.lua') diff --git a/nvim/lua/tjk/plugins/cmp.lua b/nvim/lua/tjk/plugins/cmp.lua index 59ce630..1a3cf2f 100644 --- a/nvim/lua/tjk/plugins/cmp.lua +++ b/nvim/lua/tjk/plugins/cmp.lua @@ -12,7 +12,15 @@ return { { name = "path" }, { name = "buffer" }, { name = "treesitter" }, - } + }, + mapping = cmp.mapping.preset.insert { + --[''] = cmp.mapping.scroll_docs(-4), + --[''] = cmp.mapping.scroll_docs(4), + --[''] = cmp.mapping.complete(), + --[''] = cmp.mapping.abort(), + --[''] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + [''] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + }, } end } -- cgit v1.2.3