diff options
author | Chris <[email protected]> | 2021-03-11 01:40:20 -0500 |
---|---|---|
committer | Chris <[email protected]> | 2021-03-11 01:40:20 -0500 |
commit | 46b319153060b76c19e28a5f6b84c2d8fe7e7f36 (patch) | |
tree | 0dfa27f15fdb63da309cfff742c0a861d94d0832 /lua | |
parent | fdb0d5bd299408e416852d01d7dedb70dfb7aeb0 (diff) |
updates
Diffstat (limited to 'lua')
-rw-r--r-- | lua/plugins/compe-config.lua | 36 | ||||
-rw-r--r-- | lua/plugins/treesitter-config.lua | 7 |
2 files changed, 11 insertions, 32 deletions
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 "<C-n>" - -- elseif vim.fn.call("vsnip#available", {1}) == 1 then - -- return t "<Plug>(vsnip-expand-or-jump)" - -- elseif check_back_space() then - -- return t "<Tab>" - -- else - -- return vim.fn['compe#complete']() - -- end --- end _G.s_tab_complete = function() if vim.fn.pumvisible() == 1 then return t "<C-p>" @@ -67,7 +46,6 @@ _G.s_tab_complete = function() end end --- vim.api.nvim_set_keymap("i", "<Tab>", "v:lua.tab_complete()", {expr = true}) vim.api.nvim_set_keymap("s", "<Tab>", "v:lua.tab_complete()", {expr = true}) vim.api.nvim_set_keymap("i", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true}) vim.api.nvim_set_keymap("s", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true}) diff --git a/lua/plugins/treesitter-config.lua b/lua/plugins/treesitter-config.lua index b9549a46..30b65d82 100644 --- a/lua/plugins/treesitter-config.lua +++ b/lua/plugins/treesitter-config.lua @@ -3,17 +3,18 @@ require'nvim-treesitter.configs'.setup { highlight = { enable = true, -- false will disable the whole extension }, -} - -require "nvim-treesitter.configs".setup { playground = { enable = true, disable = {}, updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code persist_queries = false -- Whether the query persists across vim sessions + }, + rainbow = { + enable = false } } + -- require'nvim-treesitter.configs'.setup { -- refactor = { -- highlight_current_scope = { enable = false }, |