From f7e10dcac9054bf686d3cb326e72ddfeb2f0df5e Mon Sep 17 00:00:00 2001 From: Belal Elsabbagh Date: Tue, 13 May 2025 12:42:34 +0300 Subject: [PATCH] better --- .config/nvim/lua/plugins/completions.lua | 25 ++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/.config/nvim/lua/plugins/completions.lua b/.config/nvim/lua/plugins/completions.lua index 75d67e9..920da2f 100644 --- a/.config/nvim/lua/plugins/completions.lua +++ b/.config/nvim/lua/plugins/completions.lua @@ -23,13 +23,13 @@ return { -- C-k: Toggle signature help -- -- See the full "keymap" documentation for information on defining your own keymap. - keymap = { preset = 'default', ['C-space'] = {} }, + keymap = { preset = 'default', [''] = { 'show', 'show_documentation', 'hide_documentation' } }, appearance = { -- Sets the fallback highlight groups to nvim-cmp's highlight groups -- Useful for when your theme doesn't support blink.cmp -- Will be removed in a future release - use_nvim_cmp_as_default = true, + use_nvim_cmp_as_default = false, -- Set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font' -- Adjusts spacing to ensure icons are aligned nerd_font_variant = 'mono', @@ -47,6 +47,27 @@ return { -- -- See the fuzzy documentation for more information fuzzy = { implementation = 'prefer_rust_with_warning' }, + + completion = { + accept = { + -- experimental auto-brackets support + auto_brackets = { + enabled = true, + }, + }, + menu = { + draw = { + treesitter = { 'lsp' }, + }, + }, + documentation = { + auto_show = true, + auto_show_delay_ms = 200, + }, + ghost_text = { + enabled = vim.g.ai_cmp, + }, + }, }, opts_extend = { 'sources.default' }, }