mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-07-15 20:04:39 +02:00
updates
This commit is contained in:
parent
fdb0d5bd29
commit
46b3191530
13 changed files with 2878 additions and 65 deletions
|
@ -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})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue