cmp: add documentation border

This commit is contained in:
2022-04-14 19:59:44 +08:00
parent f67d9ca417
commit d5d716deb2
3 changed files with 14 additions and 8 deletions
+2 -1
View File
@@ -20,8 +20,8 @@
## TODOs
- [x] LSP
- [x] 调整配置文件缩进
- [ ] Telescope 选择主题配色
- [ ] Packer Plugins 懒加载
- [x] CMP snip换行后tab数量问题
- [x] CMP command 不区分大小写
@@ -32,4 +32,5 @@
- [x] LSP 放在 CMP sources 最前面
- [x] Autopairs 配置
- [x] 注释插件
- [ ] Luasnip 功能
- [ ] shift 块后保持选择
+10 -5
View File
@@ -84,7 +84,7 @@ cmp.setup({
else
fallback()
end
end, {'i', 'c'}),
end, {'i', 'c', 's'}),
['<C-j>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item({
@@ -93,10 +93,10 @@ cmp.setup({
else
fallback()
end
end, {'i', 'c'}),
['<C-d>'] = cmp.mapping.scroll_docs(-4),
end, {'i', 'c', 's'}),
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), {'i', 'c'}), -- d
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), {'i', 'c', 's'}), -- d
['<C-e>'] = cmp.mapping({
i = cmp.mapping.abort(),
c = cmp.mapping.close()
@@ -118,7 +118,7 @@ cmp.setup({
else
fallback()
end
end, {'i', 'c'}),
end, {'i', 'c', 's'}),
['<S-Tab>'] = cmp.mapping(function(fallback)
if luasnip.jumpable(-1) then
luasnip.jump(-1)
@@ -131,6 +131,11 @@ cmp.setup({
-- Highlight first item
completeopt = 'menu,menuone,noinsert'
},
window = {
documentation = {
border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
}
},
experimental = {
-- ghost_text = true
},
+2 -2
View File
@@ -4,5 +4,5 @@ catppuccin.setup()
vim.g.tokyonight_style = "night"
-- vim.cmd[[colorscheme catppuccin]]
vim.cmd[[colorscheme tokyonight]]
vim.cmd[[colorscheme catppuccin]]
-- vim.cmd[[colorscheme tokyonight]]