hrsh7th / nvim-cmp

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

[Proposal] Use NormalFloat instead of Normal for cmp.config.window.bordered()'s winhighlight #2039

Closed slugbyte closed 2 months ago

slugbyte commented 2 months ago

I noticed that when borders are enabled using the following config

cmp.setup({
    window = {
       completion = cmp.config.window.bordered(),
       documentation = cmp.config.window.bordered(),
     },
})

nvim-cmp stops using Normal:Pmenu (here) for its winhighlight and starts using Normal:Normal (here), I was wondering if it could use NormalFloat instead of Normal so that floating windows and especially floating windows with boarders would be consistent with the nvim hl- docs related to floating windows. :help NormalFloat says its for Normal text in floating windows.

I was wondering if it could change the borders window winhighlight to NormalFloat:NormalFloat,FloatBorder:FloatBorder,CursorLine:Visual,Search:None or
Normal:NormalFloat,FloatBorder:FloatBorder,CursorLine:Visual,Search:None
In order to make backgrounds and borders consistent with all other floating windows, and make it easier for color-scheme maintainers to configure all floating windows.

This is an essentially asking for the same thing as issue #748 (merged in PR #1689) but for the main window's fg/bg instead of just the border.

I would be happy to create a PR if this is approved :)

slugbyte commented 2 months ago

I'm closing this issue and creating a new one because I realized I did not follow the standard bug report template .. sorry