Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upPreferences: Migrate from JSON to some more user-friendly config format #223
Comments
yanex
added
the
feature
label
Jan 6, 2018
This comment has been minimized.
This comment has been minimized.
ghost
commented
Jan 6, 2018
Not a huge issue IMO |
This comment has been minimized.
This comment has been minimized.
ghost
commented
Jan 6, 2018
what micro does they just have no comments and sort the json data alphabetically because plugins insert their settings into the same json Maybe marta could auto format the user settings (assuming the default settings are automatically generated) and eliminate any comments in the user config. I'd actually appreciate my user config to 100% mirror the default options (not the settings true/false, but the options |
This comment has been minimized.
This comment has been minimized.
warpkanal
commented
Jan 7, 2018
I personally favor json + comments (and I think it's a huge mistake to not have included comments in the json standard for the reason you mentioned: most parsers don't like it, but that's a long story...). My take: editing json files is not too much user friendly but definitely OK for a power-tool like marta. |
This comment has been minimized.
This comment has been minimized.
I personally prefer HOCON. It's similar (and backwards-compatible) with JSON, but much more user-friendly. I think, though, that it would be better to support only a subset of HOCON, omitting features like concatenations, path expressions or substitutions. YAML – no way :) |
This comment has been minimized.
This comment has been minimized.
warpkanal
commented
Jan 7, 2018
Thanks for that HOCON hint, never heard about it, but definitely sounds like everything I ever wished from a config approach (i.e. too often implemented overriding by java system properties on my own |
This comment has been minimized.
This comment has been minimized.
@warpkanal Yes, it will be the new implementation because:
But I agree, this is not a high-priority task (at least for now), and it will take quite a lot of time to be done properly. |
This comment has been minimized.
This comment has been minimized.
ghost
commented
Jan 7, 2018
•
To me this sounds more like If you write your own parser and generator you might probably as well create some UI check-boxes and make it entirely user friendly/ non geeky. I mean who want's to learn a new format just to config something? (and if one does not learn it one could just as well stay with good old json) |
This comment has been minimized.
This comment has been minimized.
@monouser7dig No, it's very unlikely Marta will have a complete Preferences dialog. However, there are some particular preferences that I might be want to configure using the UI. The good example I already said about is a theme changer. An another one is a key binding mapper. Imagine you can add bindings just from the Action panel without even knowing the particular action id. I spent some time reading about different configuration formats in the past several months, and I found nothing really good. JSON is so-so, the main problem is that it's too strict, and I always feel I want to have something similar, but with a simpler syntax. I also don't think that learning new configuration format will take much time if the format itself is good enough (and close to JSON). |
This comment has been minimized.
This comment has been minimized.
gildor
commented
Jul 30, 2018
+1 for HOCON. Sound like the best option for human readable and writable format. Hope some Swift parser will be available at some point |
yanex commentedJan 6, 2018
Pros:
Cons:
Goal: support editing
conf.json
usingGlobalContext.set()
. This will allow changing configuration values (for example, themes) directly from Marta.