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
Alacritty moving towards configuration with TOML format #3696
Comments
Thanks for the heads-up. It looks like upstream will continue supporting YAML for some time so we can have a graceful transition. Should be as simple as changing |
Tangentially related: Alacritty has already introduced a non-standard YAML The reason I mention this: the current approach of converting the YAML-based configuration to JSON fails when including an |
It's a simple array of strings which is called foo:
- "./foo1.yml"
- "./foo2.yml" |
btw. when you enable alacritty via home manager, then it generates json for alacritty.yml. I do not believe this is valid. ;-) |
@tobiasbaehr YAML is a superset of JSON so any valid JSON is also valid YAML so we have historically used Nix's builtin toJSON function also for YAML output. |
@ncfavier we've updated the config to use toml, though. While there's no release with it, I wonder how to handle escaping (given how obscure nix docs are). For yml there was a conversion to string, but there's no |
I think the easiest would be something like pkgs.runCommand "alacritty-unescaped.toml" {} ''
sed -E 's/\\(\\[uU])/\1/g' ${toml.generate "alacritty.toml" settings} > "$out"
'' Though maybe alacritty could take care of interpreting backslash sequences itself in the relevant options? (Does it ever make sense to have a literal backslash in keybindings?) |
It's not about just keybindings, you can define arbitrary regexes to search, so user can type whatever they want, it's just an issue that you can't generate toml with |
Besides, you'd need a sed -E 's/\\\\/\\/g' Otherwise other |
Maybe we can make an option of format? Because TOML theme not capable with YAML format config. |
The TOML change has not been released yet. If you're using alacritty master, feel free to open a PR and use it and we'll merge it when the release hits nixpkgs. |
That can be implemented in Nix. I created a PR in nixpkgs: NixOS/nixpkgs#243390 |
Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting. If you are the original author of the issue
If you are not the original author of the issue
Memorandum on closing issuesDon't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort. |
As of Alacritty Version 0.13.0, the configuration file format is now TOML.
|
I upgraded this morning and when I tried to run I'm not an expert but am trying to learn. Therefore, I'm obviously missing something but am unsure how to proceed. Googling hasn't help. Nor did ChatGPT! :-) |
it means that the old config was not valid in the first place, as in wrong section alignments, etc. |
Yeah, I figured something like that but I don't believe I ever changed it. Is there a standard file I can use? |
|
gee, thanks for helping a noob |
Fixed by #4817 |
@rycee @ncfavier -- could this be considered for backporting to 23.11? As it has the version check built-in I think it should be compatible. I'm happy to test, though I'm not entirely sure how -- actually it looks like I should be able to use (I am pinned to release-23.11 for my system as a whole but use a handful of unstable packages for development, including alacritty.) |
I can confirm that the updated Can a backport be considered? For other readers, this I have a
|
Are you following the right branch?
Is there an existing issue for this?
Issue description
This isn't a "bug" exactly, but it looks like the Alacritty project is looking at migrating away from using YAML as their configuration language to TOML, which will break
programs.alacritty.settings
.I don't think
nixpkgs
has abuiltin.toTOML
, but it's easy enough for me to get around this by usingnushell
'sfrom yaml | to toml
functionality. Probably there are better ways to fix this though.See alacritty/alacritty#6673 for where this work is happening.
Maintainer CC
@timhae @rycee @berbiche @ncfavier
System information
The text was updated successfully, but these errors were encountered: