Helix editor with truecolor over SSH and in GNU screen

I recently switched to Helix for a lot of my editing alongside VS Code.

Helix is a wonderful alternative to vim/neovim/emacs that doesn't require a bespoke handcrafted and well maintained config to be useful, but instead ships with a lot of sane defaults. It has built in support for LSP and uses vim-like (though not exactly the same) keyboard controls and modal input.

One downside is that Helix uses true color terminal output for most of the standard themes, and looks quite bad on terminals that don't support this.

You know, like the default OpenSSH session or GNU Screen.

But we can fix this!

On the SSH server, create a file /etc/ssh/sshd_config.d/truecolor.conf with the following contents:

AcceptEnv LANG LC_* TERM COLORTERM

On the SSH client, add the following line to ~/.ssh/config:

SendEnv TERM COLORTERM LANG LC_* 

For GNU screen, add the following ling to ``~/.screenrc`:

truecolor on

That should fix it.