Closed nicolimo86 closed 2 years ago
I am experiencing this same issue
Can you see if using another colorscheme fixes it?
I've just became aware that not all colorschemes have the tree-sitter support, including mine. I haven't tried yet to install a diffirent colorscheme with such TS support...but I suspect that the issue should be related to that. Feel free to close the issue.
I have been experiencing the same issue. I don't use a colourscheme, I just use the default theme that ships with neovim.
If there is a requirement to use a specific colourscheme that is compatible with twilight, then it might be worth indicating this in the documentation and giving some examples of known colourschemes that work well with the plugin.
Also, is it not possible for this to work with the default scheme at all?
It should work with any color scheme, but something might go wrong with some colorschemes.
Can you give me the output for:
:hi Twilight
:hi Normal
The result for the 2 commands is the following:
:hi Twilight --> E411: highlight group not found: Twilight
:hi Normal --> Normal xxx ctermfg=223 ctermbg=235 guifg=#ebdbb2 guibg=#282828
Did you run twilight setup? The colorgroup should be defined
I think I know why it's not working for you. You probably change your colorscheme after twilight setup. That would clear any hl groups set by Twilight.
also had this issue, and can confirm that it works after moving twilight setup towards the top of my config. before :hi Twilight
didn't find the group until after :Twilight
was run, but at that point the highlight group was empty.
@folke Thanks for the troubleshooting steps. Unfortunately the issue is still present.
Output of :hi Twilight
:
:hi Twilight
Twilight xxx guifg=#404040 guibg=#000000
Output of :hi Normal
:
:hi Normal
Normal xxx cleared
Some additional context:
6.0
init.lua
and is completely Lua basedHopefully that helps with tracking this bug down! Please let me know if there's any other information I can provide and I'll be more than happy to assist.
I've encountered the same issue as @brotherkaif (same neovim version, same issue, just on Manjaro/KDE). But I found the cause of the issue on my end:
Turns out that I didn't have termguicolors
enabled in my config. (I've recently switched to a neovim-config repo to build my own configs around...) After I enabled the vim-option and reopened neovim, Twilight worked as intended again.
I hope this works for Kaif, too. Maybe this deserves a mention in the requirements-section of the README, @folke?
Turns out that I didn't have
termguicolors
enabled in my config. I hope this works for Kaif, too. Maybe this deserves a mention in the requirements-section of the README, @folke?
in my opinion that's not a good move because it's not really a requirement. termguicolors
is only used if it's enabled, like you said, but also only if cterm
isn't set. for example, i use hi Twilight ctermfg=8
and it works as expected. a better change would be adding a ctermfg
option to the highlight definition so termguicolors doesn't need to be enabled for console users.
Fair enough, I'm not really partial to either option, so I'll defer to the maintainer. :)
Hi, I had the same issue and basically the same situation as @brotherkaif, and setting hi Twilight ctermfg=8
fix the problem for me! (termguicolors
are not set). Tnx @lilibyte for mentioning it and everyone else for investigating the problem.
Hi everyone, I have tested out the fix mentioned by @lilibyte and @yistarostin and can confirm that this has resolved the issue.
Is this something that should be considered a bug (i.e. should the plugin attempt to set hi Twilight ctermfg=8
itself? Or should this be an update to the documentation and considered as user configuration?
Either way, setting hi Twilight ctermfg=8
has fixed the problem. Thanks everyone for the help :-)
Turns out that I didn't have
termguicolors
enabled in my config. I hope this works for Kaif, too. Maybe this deserves a mention in the requirements-section of the README, @folke?in my opinion that's not a good move because it's not really a requirement.
termguicolors
is only used if it's enabled, like you said, but also only ifcterm
isn't set. for example, i usehi Twilight ctermfg=8
and it works as expected. a better change would be adding actermfg
option to the highlight definition so termguicolors doesn't need to be enabled for console users.
I confirm this fixed the issue for me. Thanks for the hint!
Hi, it seems that twilight is not dimming the text that I'm not editing. I have the impression that the plugin is not doing anything (see screenshot).
INFO: neovim: v0.5.1 plugins:
The command![image](https://user-images.githubusercontent.com/760473/144726817-4144e417-e036-475d-b749-51228ec52dae.png)
:PlugInstall
has been runned succesfully and neovim was restarted. Zen-mode and twilight are configure as follow:I'm trying to edit a bash script while being in zen-mode:
what am I doing wrong?