hrsh7th / nvim-cmp

A completion plugin for neovim coded in Lua.
MIT License
8.12k stars 402 forks source link

Use `FloatBorder` instead of `NormalFloat` for highlighting borders #748

Closed simonmandlik closed 2 years ago

simonmandlik commented 2 years ago

As it is, it is only possible to change the color of both normal text and border at once, e.g

image
simonmandlik commented 2 years ago

Don't really know why, but this bit of code in the config helps

    documentation = {
        border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
        winhighlight = 'NormalFloat:NormalFloat,FloatBorder:FloatBorder',
    },
esn89 commented 2 years ago

@simonmandlik I have the same question as you.

Can I see your code or nvim configuration where you set the hover/Documentation window fg and bg?

simonmandlik commented 2 years ago

Hi, I am using the following hg definitions

highlight CmpItemAbbr guibg=NONE
highlight! link CmpItemMenu LineNr
highlight! link CmpItemAbbrMatch Bold
highlight! link CmpItemAbbrMatchFuzzy Bold
highlight CmpItemAbbrDeprecated gui=strikethrough

highlight! link CmpItemKindConstant TSConstant
highlight! link CmpItemKindConstructor TSConstructor
highlight! link CmpItemKindField TSField
highlight! link CmpItemKindFunction TSFunction
highlight! link CmpItemKindKeyword TSKeyword
highlight! link CmpItemKindMethod TSMethod
highlight! link CmpItemKindOperator TSOperator
highlight! link CmpItemKindProperty TSProperty
highlight! link CmpItemKindText TSText
highlight! link CmpItemKindVariable TSVariable

highlight! link CmpItemKindSnippet TSString

highlight! link CmpItemKindEnum TSVariable
highlight! link CmpItemKindEnumMember TSField

highlight! link CmpItemKindModule TSNamespace
highlight! link CmpItemKindUnit TSNamespace

highlight! link CmpItemKindClass TSType
highlight! link CmpItemKindStruct TSType
highlight! link CmpItemKindInterface TSType

highlight! link CmpItemKindValue TSLiteral

highlight! link CmpItemKindFile TSNote
highlight! link CmpItemKindFolder TSNote

highlight! link CmpItemKindEvent TSWarning

highlight! link CmpItemKindColor TSAnnotation

highlight! link CmpItemKindReference TSLabel

highlight! link Pmenu ColorColumn
highlight! link PmenuSel CursorColumn
highlight! link PmenuSbar ColorColumn
highlight! link PmenuThumb Visual
esn89 commented 2 years ago

@simonmandlik Can I also see your highlight groups of NormalFloat and FloatBorder?

simonmandlik commented 2 years ago

I'm using just

highlight! link FloatBorder NonText

and NormalFloat is by default guifg=#d0d0d0 guibg=#151515. This comes from the base16-classic-dark theme I guess (https://github.com/RRethy/nvim-base16)

ribru17 commented 1 year ago

I would like to see this happen, I feel that most modern colorschemes define FloatBorder because of the LSP floating windows