From 46b319153060b76c19e28a5f6b84c2d8fe7e7f36 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 11 Mar 2021 01:40:20 -0500 Subject: updates --- lua/plugins/compe-config.lua | 36 +++++++----------------------------- 1 file changed, 7 insertions(+), 29 deletions(-) (limited to 'lua/plugins/compe-config.lua') diff --git a/lua/plugins/compe-config.lua b/lua/plugins/compe-config.lua index 6033c0e7..75630c6d 100644 --- a/lua/plugins/compe-config.lua +++ b/lua/plugins/compe-config.lua @@ -1,5 +1,7 @@ -- TODO we need snippet support and to maybe get better docs idk + +vim.cmd [[set shortmess+=c]] vim.o.completeopt = "menuone,noselect" require'compe'.setup { @@ -11,10 +13,11 @@ require'compe'.setup { throttle_time = 80; source_timeout = 200; incomplete_delay = 400; - max_abbr_width = 100; - max_kind_width = 100; - max_menu_width = 100; - documentation = false; + allow_prefix_unmatch = false; + max_abbr_width = 1000; + max_kind_width = 1000; + max_menu_width = 1000000; + documentation = true; source = { path = true; @@ -33,30 +36,6 @@ require'compe'.setup { local t = function(str) return vim.api.nvim_replace_termcodes(str, true, true, true) end - --- local check_back_space = function() --- local col = vim.fn.col('.') - 1 --- if col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') then --- return true --- else --- return false --- end --- end - --- Use (s-)tab to: ---- move to prev/next item in completion menuone ---- jump to prev/next snippet's placeholder --- _G.tab_complete = function() --- if vim.fn.pumvisible() == 1 then --- return t "" - -- elseif vim.fn.call("vsnip#available", {1}) == 1 then - -- return t "(vsnip-expand-or-jump)" - -- elseif check_back_space() then - -- return t "" - -- else - -- return vim.fn['compe#complete']() - -- end --- end _G.s_tab_complete = function() if vim.fn.pumvisible() == 1 then return t "" @@ -67,7 +46,6 @@ _G.s_tab_complete = function() end end --- vim.api.nvim_set_keymap("i", "", "v:lua.tab_complete()", {expr = true}) vim.api.nvim_set_keymap("s", "", "v:lua.tab_complete()", {expr = true}) vim.api.nvim_set_keymap("i", "", "v:lua.s_tab_complete()", {expr = true}) vim.api.nvim_set_keymap("s", "", "v:lua.s_tab_complete()", {expr = true}) -- cgit v1.2.3