Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: &termguicolors must be set on WSL windows terminal #96

Open
somecho opened this issue Apr 9, 2023 · 5 comments
Open

Bug: &termguicolors must be set on WSL windows terminal #96

somecho opened this issue Apr 9, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@somecho
Copy link

somecho commented Apr 9, 2023

Describe the bug
On Windows Terminal using WSL2, initializing colorizer in init.lua causes the error &termguicolors must be set

Operating System:
Debian 11
Neovim Version:
0.8.3
Colorizer Version:
36c610a

@somecho somecho added the bug Something isn't working label Apr 9, 2023
@mentos1386
Copy link

Make sure you have set termguicolors defined before calling setup().

I have the following in my init.vim:

set termguicolors
lua require'colorizer'.setup()

@vereym
Copy link

vereym commented Nov 3, 2023

I have the same issue on nixos and I have vim.o.termguicolors = true defined in my init.lua so maybe it's a lua config problem?

@mbpowers
Copy link

It looks like termguicolors=true is now the default but it is set after VimEnter according to this and this and is maybe related. I am not getting the termguicolor missing error when I set it in my config, but when I do set it, I encounter a different bug. Since setting it is redundant now I would like to remove that but that causes this plugin to complain unnecessarily.

Seems like we should either remove this warning as someone would have to intentionally disable termguicolors now or check at if its enabled some point after VimEnter. Thoughts?

@Vixima
Copy link

Vixima commented Feb 26, 2024

similar problem on my arch install, i have o.termguicolors = true in an options.lua where i keep any vim.cmd, vim.g, and vim.opt stuff set, it gets loaded by init.lua.

@shyun3
Copy link

shyun3 commented May 17, 2024

As of Neovim 0.10, termguicolors is enabled by default if Neovim detects that the terminal supports 24-bit color. It would be nice if the plugin could pick up on this instead of relying on the user to set termguicolors manually.

polyzen added a commit to polyzen/dotfiles that referenced this issue May 21, 2024
nvim-colorizer still requires termguicolors to be set:
norcalli/nvim-colorizer.lua#96

Still need to adjust for dynamic LSP capabilities.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants