mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-31 23:20:08 +02:00
added LSP kinds for everything
This commit is contained in:
parent
d97766b0a7
commit
6b5fbb3385
2 changed files with 68 additions and 45 deletions
|
@ -83,7 +83,6 @@ If you are looking for snippets checkout this github topic: [Snippet Topic](http
|
||||||
## TODO
|
## TODO
|
||||||
|
|
||||||
**HIGH PRIORITY**
|
**HIGH PRIORITY**
|
||||||
- lsp kind for snippets
|
|
||||||
- list all binaries needed for functionality
|
- list all binaries needed for functionality
|
||||||
- learn what opt is
|
- learn what opt is
|
||||||
- learn nvim-dap in depth
|
- learn nvim-dap in depth
|
||||||
|
|
|
@ -1,39 +1,63 @@
|
||||||
vim.o.completeopt = "menuone,noselect"
|
vim.o.completeopt = "menuone,noselect"
|
||||||
|
|
||||||
require'compe'.setup {
|
require'compe'.setup {
|
||||||
enabled = true;
|
enabled = true,
|
||||||
autocomplete = true;
|
autocomplete = true,
|
||||||
debug = false;
|
debug = false,
|
||||||
min_length = 1;
|
min_length = 1,
|
||||||
preselect = 'enable';
|
preselect = 'enable',
|
||||||
throttle_time = 80;
|
throttle_time = 80,
|
||||||
source_timeout = 200;
|
source_timeout = 200,
|
||||||
incomplete_delay = 400;
|
incomplete_delay = 400,
|
||||||
max_abbr_width = 100;
|
max_abbr_width = 100,
|
||||||
max_kind_width = 100;
|
max_kind_width = 100,
|
||||||
max_menu_width = 100;
|
max_menu_width = 100,
|
||||||
documentation = true;
|
documentation = true,
|
||||||
|
|
||||||
source = {
|
source = {
|
||||||
path = true;
|
path = {kind = " "},
|
||||||
buffer = true;
|
buffer = {kind = " "},
|
||||||
calc = true;
|
calc = {kind = " "},
|
||||||
vsnip = true;
|
vsnip = {kind = " "},
|
||||||
nvim_lsp = true;
|
nvim_lsp = {kind = " "},
|
||||||
nvim_lua = true;
|
nvim_lua = {kind = " "},
|
||||||
spell = true;
|
spell = {kind = " "},
|
||||||
tags = true;
|
tags = false,
|
||||||
snippets_nvim = true;
|
snippets_nvim = {kind = " "},
|
||||||
treesitter = true;
|
treesitter = {kind = " "},
|
||||||
};
|
emoji = {kind = " ﲃ "}
|
||||||
|
-- for emoji press : (idk if that in compe tho)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- m
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
|
||||||
local t = function(str)
|
local t = function(str)
|
||||||
return vim.api.nvim_replace_termcodes(str, true, true, true)
|
return vim.api.nvim_replace_termcodes(str, true, true, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
local check_back_space = function()
|
local check_back_space = function()
|
||||||
|
@ -49,24 +73,24 @@ end
|
||||||
--- move to prev/next item in completion menuone
|
--- move to prev/next item in completion menuone
|
||||||
--- jump to prev/next snippet's placeholder
|
--- jump to prev/next snippet's placeholder
|
||||||
_G.tab_complete = function()
|
_G.tab_complete = function()
|
||||||
if vim.fn.pumvisible() == 1 then
|
if vim.fn.pumvisible() == 1 then
|
||||||
return t "<C-n>"
|
return t "<C-n>"
|
||||||
elseif vim.fn.call("vsnip#available", {1}) == 1 then
|
elseif vim.fn.call("vsnip#available", {1}) == 1 then
|
||||||
return t "<Plug>(vsnip-expand-or-jump)"
|
return t "<Plug>(vsnip-expand-or-jump)"
|
||||||
elseif check_back_space() then
|
elseif check_back_space() then
|
||||||
return t "<Tab>"
|
return t "<Tab>"
|
||||||
else
|
else
|
||||||
return vim.fn['compe#complete']()
|
return vim.fn['compe#complete']()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
_G.s_tab_complete = function()
|
_G.s_tab_complete = function()
|
||||||
if vim.fn.pumvisible() == 1 then
|
if vim.fn.pumvisible() == 1 then
|
||||||
return t "<C-p>"
|
return t "<C-p>"
|
||||||
elseif vim.fn.call("vsnip#jumpable", {-1}) == 1 then
|
elseif vim.fn.call("vsnip#jumpable", {-1}) == 1 then
|
||||||
return t "<Plug>(vsnip-jump-prev)"
|
return t "<Plug>(vsnip-jump-prev)"
|
||||||
else
|
else
|
||||||
return t "<S-Tab>"
|
return t "<S-Tab>"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.api.nvim_set_keymap("i", "<Tab>", "v:lua.tab_complete()", {expr = true})
|
vim.api.nvim_set_keymap("i", "<Tab>", "v:lua.tab_complete()", {expr = true})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue