From 2a2f85b82ed558fb9d1dca95431a2eac1b3301f2 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Fri, 16 Jul 2021 10:50:26 +0530 Subject: [PATCH] nvim: completion: Update nvim-compe settings Sync with upstream. While at it, since we do not use autocomplete anymore, change min_length to 1 to trigger completion easily. --- nvim/.config/nvim/after/plugin/completion.lua | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/nvim/.config/nvim/after/plugin/completion.lua b/nvim/.config/nvim/after/plugin/completion.lua index ea4a5b7..5e3fb4b 100644 --- a/nvim/.config/nvim/after/plugin/completion.lua +++ b/nvim/.config/nvim/after/plugin/completion.lua @@ -4,12 +4,23 @@ require'compe'.setup { enabled = true; autocomplete = false; debug = false; - min_length = 2; + min_length = 1; preselect = 'enable'; throttle_time = 80; source_timeout = 200; + resolve_timeout = 800; incomplete_delay = 400; - documentation = true; + max_abbr_width = 100; + max_kind_width = 100; + max_menu_width = 100; + documentation = { + border = { '', '' ,'', ' ', '', '', '', ' ' }, + winhighlight = "NormalFloat:CompeDocumentation,FloatBorder:CompeDocumentationBorder", + max_width = 120, + min_width = 60, + max_height = math.floor(vim.o.lines * 0.3), + min_height = 1, + }; source = { path = true; @@ -23,6 +34,9 @@ require'compe'.setup { treesitter = true; snippets_nvim = false; vsnip = true; + ultisnips = false; + luasnip = false; + emoji = false; }; }