nvim stuff

This commit is contained in:
doyle 2022-06-22 23:32:09 +10:00
parent ae083e0b4d
commit d47caea342

View File

@ -154,6 +154,10 @@ lua <<EOF
snippet = { snippet = {
expand = function(args) luasnip.lsp_expand(args.body) end, expand = function(args) luasnip.lsp_expand(args.body) end,
}, },
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
completion = { autocomplete = false }, completion = { autocomplete = false },
mapping = cmp.mapping.preset.insert({ mapping = cmp.mapping.preset.insert({
['<C-d>'] = cmp.mapping.scroll_docs(4), ['<C-d>'] = cmp.mapping.scroll_docs(4),
@ -162,7 +166,6 @@ lua <<EOF
['<C-j>'] = cmp.mapping.scroll_docs(1), -- Scroll the docs down by 1 line ['<C-j>'] = cmp.mapping.scroll_docs(1), -- Scroll the docs down by 1 line
['<CR>'] = cmp.mapping.confirm { behavior = cmp.ConfirmBehavior.Replace, select = true, }, ['<CR>'] = cmp.mapping.confirm { behavior = cmp.ConfirmBehavior.Replace, select = true, },
['<Tab>'] = cmp.mapping(function(fallback) -- Move down the autocomplete list ['<Tab>'] = cmp.mapping(function(fallback) -- Move down the autocomplete list
cmp.complete()
if cmp.visible() then if cmp.visible() then
cmp.select_next_item() cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then elseif luasnip.expand_or_jumpable() then