-
-
Notifications
You must be signed in to change notification settings - Fork 742
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
Define configuration format #434
Comments
That would mean breaking the compatibility with all installs of waybar. The user-base might be small, but this still would cause a lot of troubles. |
@cafehaine Not necessarily, the old config could remain, but be removed from wiki/readme and left alongside the TOML one for some time. If you load the old config format it works with a deprecation warning. A breaking change nonetheless, but with a nice adaption period. |
The great thing about yaml is that you can actually use a yaml parser to parse json. So that would kind of ensure backwards compatibility with older configs, the only problem being the A dirty way to convert old config to yaml:
(this won't work if you have |
+10 i'm really confused about that choice... |
Toml is a bad choice too : https://hitchdev.com/strictyaml/why-not/toml/ |
@eoli3n Agree to disagree and I'll avoid bikeshedding this 😆 |
FWIW, current format is just "a JSON variation", it's called |
Any news ? |
I was only able to find that VS Code uses this format for configuration. What other tools were you talking about here? |
Off the top of my head, I'm sure I've seen other applications, but my memory is bad. Most of these tools use the I don't think popularity is that important though; it's very easy to explain that That said, I don't disagree with the initial criticism of JSON. But there's also a lot of valid criticism for YAML (e.g.: type handling). TOML is bad for highly nested structures, or when you have a large set of files that share a schema. For a configuration format like waybars, it's actually not a bad candidate. Ultimately though, I think this falls into bikeshedding a bit. A PR showing pros and cons of a change is probably best at this point. |
I think it is unnecessary to criticize json or jsonc now, but it is necessary to add support for yaml files, and the format of yaml is obviously more beautiful |
It boggles my mind that I can't get syntax highlighting... |
May I ask which editor you use? For vim you can use the jsonc syntax highliting by installing vim-polyglot. |
+1 for yaml configuration |
Did you read this issue thread at all? |
I just wanted to ask if we can have a defined schema too, especially in the current JSON config. The schema can be included in with the |
Right now the configuration file's format is a weird JSON variation with
//
comments, at least as I understand it.It'd be nice if we, instead, used a more config-friendly format (such as TOML or even YAML) that allowed for things like comments. Moreover, it'd be useful if the file was called
config.json
orconfig.toml
so that editors can pick-up the filetype automatically.I'll leave a link to an article I enjoy on why JSON is a poor choice for a configuration language: https://www.lucidchart.com/techblog/2018/07/16/why-json-isnt-a-good-configuration-language/
The text was updated successfully, but these errors were encountered: