You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 7, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 7, 2024. It is now read-only.
tint_background_colors does not work in neovim v0.10 #53
Just for reference, using a different minimal init.lua like the following, I am able to reproduce with the content in /tmp/init.lua and running with nvim -u /tmp/init.lua:
and see it change correctly. Not 100% sure why things would act any different when calling this via autocmds, however this seems to only work when there is 1 window visible, which brings into account Normal versus NormalNC.
@antonk52 - the problem seems to arise when NormalNC is not defined, which makes sense (see :h NormalNC). I'm not entirely sure what changed upstream to cause this, but if you add something like vim.cmd("hi NormalNC guifg=#ffd700 guibg=#000087"), you should see it start working with one of the minimal examples noted here. Obviously for your own configuration, you can add the appropriate definition as well.
I am not really sure that this is something that I can solve here in this plugin as I do not want to make assumptions about people's color scheme choices, so ensuring/spoofing a setup of NormalNC feels like the wrong thing to do here. I think linking it to Normalfeels like it would be a mildly unobtrusive way to solve the problem, but I will have to think about it.
Let me know if this works for you in the mean time or not (making sure your colorscheme defines NormalNCbefore you setup tint).
Latest Neovim Nightly has some breaking changes affecting highlight groups, took me quite sometime to ajust my config ..
Now my config seems to be working fine except the NvimTree, tinting is quite weird there.. other file browsers like Oil or NeoTree are working just fine but NvimTree is behaving weird.
By chance are you using NvimTree? Have you noticed anything special there? Perhaps some HL group missing? (just wondering if this is something similar to NormalNC above)
ie: I see the parent dir + one go file getting tinted and another file not getting tinted:
Since it works fine with other file browsers I supposed something is broken in the HL groups, just couldn't find out what yet
Another example:
In here all directories + a.out get tinted, the rest of the files don't
@rodhash I do not use NvimTree, but if you have a way to reproduce it (an init.lua with a minimal set of plugins installed to reproduce the issue) I am happy to try to help debug.
You can also try calling :lua require("tint").refresh() manually to see if it is indeed an issue with load ordering. This will force tint to re-evaluate all loaded colors, etc. and update its highlight namespaces accordingly. If that doesn't work, you can try :hi link NormalNC Normal (I don't fully recall the syntax, but link NormalNC -> Normal) and then refresh again and see if that works. That would tell if you if it is the same issue as noted here.
Activity
levouh commentedon Jan 28, 2024
I just updated to
HEAD(NVIM v0.10.0-dev-2221+g47cd532bf) and I cannot reproduce this.Do you have a set of steps to get to this point? E.g. are you opening files after opening
nvimitself, or are you opening them with-o, etc.?I would also assume that nothing in your configuration changed between the two
nvimversions?antonk52 commentedon Jan 28, 2024
The way I could repro this is
nvim init.luathen create a split with:vs<cr>. Repeat with a master build.Correct, the configuration is identical.
I used a prebuilt binary from the release for macos from the nightly build built from 2cd76a7
I tried disabling all plugins but tint and using a built in
bluetheme and could repro this issueI was able to narrow down the issue to this minimal init.lua
Screenshot for reference. Above nvim 0.9.5, below the nightly build.
levouh commentedon Jan 29, 2024
Just for reference, using a different minimal
init.lualike the following, I am able to reproduce with the content in/tmp/init.luaand running withnvim -u /tmp/init.lua:The namespaces in this minimal setup getting noted as
2and3, and when running something like:I get output like:
which notes that at least within the namespaces, the colors are being tinted correctly.
Further, with a single window open, I can do something like:
and see it change correctly. Not 100% sure why things would act any different when calling this via autocmds, however this seems to only work when there is 1 window visible, which brings into account
NormalversusNormalNC.@antonk52 - the problem seems to arise when
NormalNCis not defined, which makes sense (see:h NormalNC). I'm not entirely sure what changed upstream to cause this, but if you add something likevim.cmd("hi NormalNC guifg=#ffd700 guibg=#000087"), you should see it start working with one of the minimal examples noted here. Obviously for your own configuration, you can add the appropriate definition as well.I am not really sure that this is something that I can solve here in this plugin as I do not want to make assumptions about people's color scheme choices, so ensuring/spoofing a setup of
NormalNCfeels like the wrong thing to do here. I think linking it toNormalfeels like it would be a mildly unobtrusive way to solve the problem, but I will have to think about it.Let me know if this works for you in the mean time or not (making sure your colorscheme defines
NormalNCbefore you setuptint).antonk52 commentedon Jan 30, 2024
Thanks for looking into this. I can verify that setting
NormalNChighlighting group solves the issue for me.rodhash commentedon Apr 29, 2024
Latest Neovim Nightly has some breaking changes affecting highlight groups, took me quite sometime to ajust my config ..
Now my config seems to be working fine except the NvimTree, tinting is quite weird there.. other file browsers like Oil or NeoTree are working just fine but NvimTree is behaving weird.
By chance are you using NvimTree? Have you noticed anything special there? Perhaps some HL group missing? (just wondering if this is something similar to NormalNC above)
ie: I see the parent dir + one go file getting tinted and another file not getting tinted:
Since it works fine with other file browsers I supposed something is broken in the HL groups, just couldn't find out what yet
Another example:
In here all directories +
a.outget tinted, the rest of the files don'tlevouh commentedon May 1, 2024
@rodhash I do not use NvimTree, but if you have a way to reproduce it (an
init.luawith a minimal set of plugins installed to reproduce the issue) I am happy to try to help debug.You can also try calling
:lua require("tint").refresh()manually to see if it is indeed an issue with load ordering. This will forcetintto re-evaluate all loaded colors, etc. and update its highlight namespaces accordingly. If that doesn't work, you can try:hi link NormalNC Normal(I don't fully recall the syntax, but linkNormalNC -> Normal) and then refresh again and see if that works. That would tell if you if it is the same issue as noted here.