- Disable visual multi until useful

- Switch to darcula-solid theme
This commit is contained in:
2021-05-26 22:18:02 +02:00
parent a5a1424be0
commit 59809f0f77
6 changed files with 44 additions and 20 deletions

View File

@@ -12,7 +12,7 @@ require'compe'.setup {
max_abbr_width = 100;
max_kind_width = 100;
max_menu_width = 100;
documentation = false;
documentation = true;
source = {
path = true;
@@ -31,6 +31,29 @@ 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
_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>"
@@ -41,6 +64,7 @@ _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})