Switch from unergonomic json for configuration #40382
eugenesvk
started this conversation in
Config, Settings and Keymaps
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
JSON is human-configuration-unfriendly
So of course in real configuration people relax those restrictions, Zed included. But then it's still technically JSON, so other tools are not so relaxed, so editing Zed config in Zed generates these useless warning hints
so you now have to see how to disable those... All for fixes to format flaws instead of using a better one that is more suitable for direct human editing to begin with
One of the better modern config formats I know of is KDL https://kdl.dev, but maybe even a simpler alternative like some json-lookalike that just fixes the issues listed above "internally" could also work
An example of the VIM JSON config turned from this {"needless" : ["punctuation-heavy", "soup"],}...

...into this pure unadultaretad keybinding content: clean list without almost any syntax overhead, and with some unicode magic even syntactically illegal chars can visually represented without quoting!
And you could do proper semantic separation via syntax highlighted types instead of
::
string splits▲ (vim)Up
And then nested commands become
instead of
And you could be even DRYer and fit all keys into a single line
(the full 1-key/line config example from Vim+Helix)
Beta Was this translation helpful? Give feedback.
All reactions