hrsh7th/nvim-cmp
View on GitHubcmp.config.window.bordered() changes active item highlight bg.
Open
#1029 opened on Jun 10, 2022
bughelp wanted
Description
FAQ
- I have checked the FAQ and it didn't resolve my problem.
Announcement
- I have checked Breaking change announcement.
Minimal reproducible full config
if has('vim_starting')
set encoding=utf-8
endif
scriptencoding utf-8
if &compatible
set nocompatible
endif
let s:plug_dir = expand('/tmp/plugged/vim-plug')
if !filereadable(s:plug_dir .. '/plug.vim')
execute printf('!curl -fLo %s/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim', s:plug_dir)
end
execute 'set runtimepath+=' . s:plug_dir
call plug#begin(s:plug_dir)
Plug 'hrsh7th/nvim-cmp'
Plug 'hrsh7th/cmp-buffer'
Plug 'hrsh7th/cmp-nvim-lsp'
Plug 'hrsh7th/vim-vsnip'
Plug 'neovim/nvim-lspconfig'
Plug 'olimorris/onedarkpro.nvim'
call plug#end()
PlugInstall | quit
colorscheme onedarkpro
" Setup global configuration. More on configuration below.
lua << EOF
local cmp = require "cmp"
cmp.setup {
snippet = {
expand = function(args)
vim.fn["vsnip#anonymous"](args.body)
end,
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered()
}
mapping = {
['<CR>'] = cmp.mapping.confirm({ select = true })
},
sources = {
{ name = "nvim_lsp" },
{ name = "buffer" },
},
}
EOF
lua << EOF
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
require'lspconfig'.cssls.setup {
capabilities = capabilities,
}
EOF
Description
When I use cmp.config.window.bordered() it changes active item highlight bg for the completion menu.
Steps to reproduce
- Use minimal config above.
- Open any filetype
- Make sure language server is installed for that filetype
- Start typing anything.
- Select first item.
- See that it way too bright
- remove
windowsection from cmp config. - Repeat steps 2 - 5
- See color difference
Expected behavior
Expected color is around #2d323b (not exact)
Actual behavior
Actual color is around #52565e (not exact) (too bright)
Additional context
My complete config is at https://github.com/Lalit64/HydroVim