Closed A-Lamia closed 1 year ago
An other interesting idea could be deprecating NormalNC
(or leaving it for compatibility reasons) and instead of having a toggle being able to set an inactive color to the highlight group eg:
vim.api.nvim_set_hl(0, "Normal",
{
fg = "#E0E0E0",
bg = "#1A1D23",
nc = "#16181D",
}
)
:h nvim_win_set_hl_ns
Not clear why it needs a new API, or massively breaking changes.
I tried playing around with this and don't really understand how this would work with a popup window (it's never active), do you have an example ?
There is no "popup window" in Neovim. (You may be thinking of the Pmenu
?) This is one of the major differences to Vim.
popup menu in the context of what I'm talking about in my above post, i call them that so that it's distinct that I'm talking specifically about "supplementary" or "menu" windows such as the ones made by lsp, nvim-cmp, my whole issue is that there is no way to distinguish between the 2 even though from a UX point of view they are very different, eg "popups" are not active windows by default.
But I'm telling you that there is no difference; everything is just a "floating window". If you want a different UX for some of them, you're responsible for implementing it yourself.
once again i know, that is the issue, but lsp doesn't supply separate highlights to target it specifically, and there is no way of modifying the defaults (that I'm aware of, i looked through the docs and found nothing.) like you can with nvim-cmp.
So maybe you can describe your actual problem (since your proposed "solution" is overkill and not feasible).
Apologies maybe my first half of the post was not specific enough.
Is the title still accurate? If so, this is wontfix.
yes the title is accurate, it seems i miss understood what a feature request is this can be closed if it's out of scope, thanks.
No, it's a feature request alright. But you're asking for a lot without really making the case why that massive change is necessary to achieve what you're actually after. (Which I'm still not clear on, for the record.)
Thanks but I'll be closing this, it seems the direction of this post has already been set, I'd rather not waste time trying to build a case and gather images when i already know what the outcome is.
For future reference next time instead of being dismissive just say It's out of scope so we can all move on.
Problem
Good day :),
For a little background i maintain AstroTheme and i have found something that is bothering, I've spent days trying to workaround it but it seems LSP hovers and documentation has destroyed me.
At first i thought the solution could be to have the same ability to change the default highlights for LSP as you can with nvim-cmp but this just adds more complexity with figuring out how to change user config settings and restoring them (Something a theme should not be doing imo).
Currently most floats / popups are using
NormalFloat
,FloatBorder
FloatTitle
, when usingNormalNC
for dimming it's nice to set the "Floating" windows to the base color the issue is this will effect every floating window including things like CMP and LSP causing these types of popup windows to now have no distinguishing background, if using LSP document and focus the popup you will then get a nice shade change fromNormalNC
but not in reverse.From a UX point of view there are 2 types of windows in neovim Popups / Menus and Floating windows. A floating window would want to take your focus but a "popup" is supplementary to the current window though we have no way of distinguishing between them when using
NormalNC
.Expected behavior
Having a way to distinguish between floats and popups.
I had thought of 3 solutions but only 1 of them seems viable currently:
Add the ability to change the LSP highlight defaults.
Add NormalFloatNC.
Add a property when setting highlights that would allow that highlight group to be effected by NormalNC.
nc = true
.Anyway thanks for reading my ramble looking forward to getting crushed by reality! 🏋️