From 143847c01930c4e7e0283c019002a95193175557 Mon Sep 17 00:00:00 2001 From: Alec Goncharow Date: Sun, 9 Feb 2025 10:54:12 -0500 Subject: many things. --- .config/nvim/lua/autocomplete.lua | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to '.config/nvim/lua/autocomplete.lua') diff --git a/.config/nvim/lua/autocomplete.lua b/.config/nvim/lua/autocomplete.lua index 4ada86b..58af67f 100644 --- a/.config/nvim/lua/autocomplete.lua +++ b/.config/nvim/lua/autocomplete.lua @@ -1,6 +1,7 @@ -- Set up nvim-cmp. local cmp = require 'cmp' + cmp.setup({ snippet = { -- REQUIRED - you must specify a snippet engine @@ -11,11 +12,12 @@ cmp.setup({ -- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users. end, }, - experimental = { - ghost_text = { - hl_group = "CmpGhostText", - }, - }, + -- can't figure this out, could be cool if ghost text actually took on different color + -- experimental = { + -- ghost_text = { + -- hl_group = "CmpGhostText", + -- }, + -- }, window = { completion = cmp.config.window.bordered({ border = 'none' }), documentation = cmp.config.window.bordered({ border = 'none' }), @@ -23,8 +25,8 @@ cmp.setup({ mapping = cmp.mapping.preset.insert({ [''] = cmp.mapping.scroll_docs(-4), [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.confirm({ select = false }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. - [''] = cmp.mapping.abort(), + [''] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + [''] = cmp.mapping.complete(), }), sources = cmp.config.sources({ { name = 'nvim_lsp' }, @@ -35,7 +37,10 @@ cmp.setup({ -- { name = 'snippy' }, -- For snippy users. }, { { name = 'buffer' }, - }) + }), + completion = { + autocomplete = false, + } }) -- Set configuration for specific filetype. -- cgit v1.2.3-70-g09d2