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

Helix not picking up true color when running inside Zellij #6728

Closed
andradei opened this issue Apr 12, 2023 · 3 comments
Closed

Helix not picking up true color when running inside Zellij #6728

andradei opened this issue Apr 12, 2023 · 3 comments
Labels
C-bug Category: This is a bug

Comments

@andradei
Copy link

Summary

When inside Zellij, true colors are not being detected and themes can't be set.

Versions

  • zellij 0.35.2
  • uname -av: Linux AE-22-01 5.10.102.1-microsoft-standard-WSL2 moved insert keymap to keymap.rs #1 SMP Wed Mar 2 00:30:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
  • Windows 11
  • wezterm: 20230408-112425-69ae8472
  • helix: 23.03 (3cf0372)

Reproduction Steps

  1. Open a terminal (wezterm or windows terminal)
  2. Start wsl
  3. Open helix: theme is picked up and works
  4. Close helix
  5. Start a Zellij session
  6. Open helix: theme is borked, trying to set a new theme throws the following message

image

Helix log

~/.cache/helix/helix.log
2023-04-12T13:54:16.283 helix_vcs [ERROR] failed to obtain current head name for /home/andradei/.config/helix/config.toml
2023-04-12T13:54:16.294 helix_view::editor [ERROR] Failed to initialize the LSP for `source.toml` { cannot find binary path }
2023-04-12T13:54:49.495 helix_view::theme [WARN] Theme: invalid modifier: "normal"
2023-04-12T13:54:49.495 helix_view::theme [WARN] Theme: invalid modifier: "normal"
2023-04-12T13:54:49.633 helix_view::theme [WARN] Theme: invalid modifier: "normal"
2023-04-12T13:54:49.633 helix_view::theme [WARN] Theme: invalid modifier: "normal"
2023-04-12T14:06:40.308 helix_vcs [ERROR] Error {
    context: "failed to open git repo",
    source: Discover(
        NoGitRepository {
            path: "/home/andradei/.config/helix",
        },
    ),
}
2023-04-12T14:06:40.308 helix_vcs [ERROR] failed to open diff base for /home/andradei/.config/helix/config.toml
2023-04-12T14:06:40.308 helix_vcs [ERROR] Error {
    context: "failed to open git repo",
    source: Discover(
        NoGitRepository {
            path: "/home/andradei/.config/helix",
        },
    ),
}
2023-04-12T14:06:40.308 helix_vcs [ERROR] failed to obtain current head name for /home/andradei/.config/helix/config.toml
2023-04-12T14:06:40.327 helix_view::editor [ERROR] Failed to initialize the LSP for `source.toml` { cannot find binary path }
2023-04-12T14:07:16.037 helix_view::editor [ERROR] editor error: Unsupported theme: theme requires true color support
2023-04-12T14:07:17.562 helix_view::editor [ERROR] editor error: Unsupported theme: theme requires true color support
2023-04-12T14:07:19.840 helix_view::theme [WARN] Theme: invalid modifier: "normal"
2023-04-12T14:07:19.840 helix_view::theme [WARN] Theme: invalid modifier: "normal"
2023-04-12T14:07:19.840 helix_view::editor [ERROR] editor error: Unsupported theme: theme requires true color support
2023-04-12T14:07:20.955 helix_view::theme [WARN] Theme: invalid modifier: "normal"
2023-04-12T14:07:20.955 helix_view::theme [WARN] Theme: invalid modifier: "normal"
2023-04-12T14:07:20.955 helix_view::editor [ERROR] editor error: Unsupported theme: theme requires true color support
2023-04-12T14:07:23.970 helix_view::theme [WARN] Theme: invalid modifier: "normal"
2023-04-12T14:07:23.970 helix_view::theme [WARN] Theme: invalid modifier: "normal"
2023-04-12T14:07:23.981 helix_view::editor [ERROR] editor error: Unsupported theme: theme requires true color support
2023-04-12T14:07:24.232 helix_view::editor [ERROR] editor error: Unsupported theme: theme requires true color support
2023-04-12T14:07:24.626 helix_view::editor [ERROR] editor error: Unsupported theme: theme requires true color support
2023-04-12T14:07:28.070 helix_view::editor [ERROR] editor error: Unsupported theme: theme requires true color support

Platform

Ubuntu on WSL2

Terminal Emulator

wezterm 20230408-112425-69ae8472

Helix Version

helix 23.03 (3cf0372)

@andradei andradei added the C-bug Category: This is a bug label Apr 12, 2023
@andradei
Copy link
Author

Opened an issue on Zellij, but it may be the case that the problem lies on the helix side
zellij-org/zellij#2359

@andradei
Copy link
Author

Don't know what happened. Maybe I had to reboot the machine (?😂) but now it is working. No errors.

@HollayHorvath
Copy link

HollayHorvath commented Jan 23, 2024

I'm having the same issue but only when I restart a Zellij session and that session has a Helix instance.

If I drop back to shell ([Esc]) and run Helix everything is good, but if I press [Enter] to run Helix it's on default theme and on :theme I only get base16_default and default themes.
The only relevant line from the log: 2024-01-23T21:00:47.065 helix_term::application [WARN] failed to load theme `gruvbox_dark_hard` - Theme: file not found for: gruvbox_dark_hard

Terminal emulator: either xfce4-terminal or alacritty, doesn't seem to matter, my guess would be that it's caused by some kind of path issue.

Zellij: 0.39.2
Helix: 23.10

Edit:
OS: Linux Mint (Ubuntu 22.04)

One thing I found is that it's the only process that is a session leader (px aux | rg hx, unnecessary columns dropped)

pts/11  Sl+  Jan02   0:05 /usr/lib/helix/hx
pts/20  Sl+  Jan09   0:09 /usr/lib/helix/hx weekly_hours
pts/17  Sl+  Jan21   2:29 /usr/lib/helix/hx .
pts/34  Sl+  Jan22   0:12 /usr/lib/helix/hx .
pts/5   Tl   11:33   0:00 /usr/lib/helix/hx /home/allegretto/.config/helix/languages.toml
pts/5    Tl  12:09   0:01 /usr/lib/helix/hx /home/allegretto/.config/helix/languages.toml
pts/24  Sl+  21:08   0:00 /usr/lib/helix/hx .
pts/18 Ssl+  21:15   4:44 /usr/lib/helix/hx . <- the offending one

Edit 2:
I checked the environment variables of Helix when it produced the error and HELIX_RUNTIME is missing (also SHLVL is set to 1 but my config is actually 2).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

2 participants