You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What would be your thoughts on the ability the partially load the config?
Since the goal of this project is to avoid Scheme, what do you plan to use instead for the config? Is the plan to keep TOML or switch to a real programming language?
Here's the text from the original issue:
It would be nice if the config could ignore the errors and continue loading the settings that work.
For instance, if I write heme instead of theme, helix will show the following error:
Bad config: unknown field `heme`, expected one of `theme`, `lsp`, `keys`, `editor` at line 1 column 1
Press <ENTER> to continue with default config
but it won't continue loading the other settings, which is inconvenient because you lose your key bindings for instance.
The text was updated successfully, but these errors were encountered:
Thank you, these are good questions and a great improvement suggestion.
Since the goal of this project is to avoid Scheme, what do you plan to use instead for the config? Is the plan to keep TOML or switch to a real programming language?
As you noted correctly, the rough plan is to keep TOML, or, if it makes sense, switch to something at least as simple and declarative as the current TOML solution. I can't say exactly what the solution will look like once Helix drops TOML support, because that depends on the final plugin system implementation in Helix, and it isn't clear enough yet how it'll be implemented.
One solution would be for this project to simply restore and keep maintaining the TOML deserialization layer, whose strength is its simplicity - IMO. However, if the Helix API changes too considerably, this might cause too much maintenance effort as time goes by.
A more sustainable alternative in this case would be to actually use the new system, but introduce a TOML deserialization layer between this new plugin system and the actual config file. A first very rough prototype PR in Helix seeked to make this possible. This would probably be the best way to go, but also cause some more initial effort.
What would be your thoughts on the ability the partially load the config?
It makes sense and it's something that should be supported as long as we support TOML.
I'll have to have a closer look at how this could be implemented, but I could imagine catching the errors and storing them, then log out all config errors in the log, and maybe show a message under the statusline like "Hey, something's wrong with your config, check logs for more details". (I'm open for PRs of course!)
Ok, thanks for the explanation.
I guess you could take a look at the PR I linked above so that you can tell whether this will cause friction while keeping this project in sync with helix.
That's an issue I opened in the original helix repo, but was closed since they didn't want to add more complexity to the current TOML config since it's going to be replaced by a Scheme-based config in the future.
What would be your thoughts on the ability the partially load the config?
Since the goal of this project is to avoid Scheme, what do you plan to use instead for the config? Is the plan to keep TOML or switch to a real programming language?
Here's the text from the original issue:
It would be nice if the config could ignore the errors and continue loading the settings that work.
For instance, if I write
heme
instead oftheme
, helix will show the following error:but it won't continue loading the other settings, which is inconvenient because you lose your key bindings for instance.
The text was updated successfully, but these errors were encountered: