diff options
| author | Alec Goncharow <alec@goncharow.dev> | 2025-02-09 10:54:12 -0500 |
|---|---|---|
| committer | Alec Goncharow <alec@goncharow.dev> | 2025-02-09 10:54:12 -0500 |
| commit | 143847c01930c4e7e0283c019002a95193175557 (patch) | |
| tree | 99a6a9462a496f8abef875331c29836b18b31780 /.config/nvim/lua/autocomplete.lua | |
| parent | 78efc3eb493b40ad2f79408a47bb873b5eea9db0 (diff) | |
many things.
Diffstat (limited to '.config/nvim/lua/autocomplete.lua')
| -rw-r--r-- | .config/nvim/lua/autocomplete.lua | 21 |
1 files changed, 13 insertions, 8 deletions
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({ ['<C-b>'] = cmp.mapping.scroll_docs(-4), ['<C-f>'] = cmp.mapping.scroll_docs(4), - ['<C-y>'] = cmp.mapping.confirm({ select = false }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. - ['<C-e>'] = cmp.mapping.abort(), + ['<C-y>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + ['<C-c>'] = 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. |
