From 528aa2f19ad4aa6f6b53080d4f523ee1b3e15b86 Mon Sep 17 00:00:00 2001 From: jdhao Date: Fri, 11 Feb 2022 20:15:07 +0800 Subject: [PATCH] update nvim-cmp conf --- lua/config/nvim-cmp.lua | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/lua/config/nvim-cmp.lua b/lua/config/nvim-cmp.lua index 8146d61..e9f5781 100644 --- a/lua/config/nvim-cmp.lua +++ b/lua/config/nvim-cmp.lua @@ -41,8 +41,8 @@ cmp.setup({ keyword_length = 1, completeopt = "menu,noselect" }, - experimental = { - ghost_text = false + view = { + entries = 'custom', }, formatting = { format = lspkind.cmp_format({ @@ -59,4 +59,23 @@ cmp.setup({ }, }) -vim.cmd("hi link CmpItemMenu Comment") +-- see https://github.com/hrsh7th/nvim-cmp/wiki/Menu-Appearance#how-to-add-visual-studio-code-dark-theme-colors-to-the-menu +vim.cmd[[ + highlight! link CmpItemMenu Comment + " gray + highlight! CmpItemAbbrDeprecated guibg=NONE gui=strikethrough guifg=#808080 + " blue + highlight! CmpItemAbbrMatch guibg=NONE guifg=#569CD6 + highlight! CmpItemAbbrMatchFuzzy guibg=NONE guifg=#569CD6 + " light blue + highlight! CmpItemKindVariable guibg=NONE guifg=#9CDCFE + highlight! CmpItemKindInterface guibg=NONE guifg=#9CDCFE + highlight! CmpItemKindText guibg=NONE guifg=#9CDCFE + " pink + highlight! CmpItemKindFunction guibg=NONE guifg=#C586C0 + highlight! CmpItemKindMethod guibg=NONE guifg=#C586C0 + " front + highlight! CmpItemKindKeyword guibg=NONE guifg=#D4D4D4 + highlight! CmpItemKindProperty guibg=NONE guifg=#D4D4D4 + highlight! CmpItemKindUnit guibg=NONE guifg=#D4D4D4 +]]