Skip to content
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

Migrate configuration file from SharedPreferences package to YAML #20

Closed
brainwo opened this issue Apr 24, 2024 · 2 comments · Fixed by #36
Closed

Migrate configuration file from SharedPreferences package to YAML #20

brainwo opened this issue Apr 24, 2024 · 2 comments · Fixed by #36
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@brainwo
Copy link
Owner

brainwo commented Apr 24, 2024

I have done a small research that led the decision to pick YAML.

The criteria I was looking for is that the configuration is language is that it must has a Dart library, not difficult to write, and is self-documented. The self documented part is basically what schema is for.

As someone whose edit their configuration file everyday, I find it's often annoying to go back and forth to check a manual for some program just to change a value in the configuration file, hence why I need it to be self-documented.

Alacritty seems to be the only program I use to support schema out of the box, their schema is listed on https://www.schemastore.org/json/ which picked up by my extension. I might consider adding my schema there if there is a possibility.

Here is comparison of popular configuration languages based on my limited time of researching them:

Name LSP support Schema Additional features
YAML Yes Yes Compatible with JSON
JSON Yes Yes -
TOML Yes(?) Limited* -
Pkl Not ready - -
RON - - -

* IntelliJ TOML plugin doesn't seems to support JSON Schema. However there are schema support for VS Code and coc.nvim.

While JSON comes for free in Dart. I find YAML is better suited since it's also compatible with JSON. Opening the possibility to use YAML/JSON based on user's preferences.

If there is any suggestion for a better language, leave a comment so I might consider it. Do keep in mind I will only keep one language at a time to be supported.

@brainwo brainwo added the enhancement New feature or request label Apr 24, 2024
@brainwo brainwo added this to the Release 1.0 milestone Apr 24, 2024
@brainwo brainwo self-assigned this Apr 24, 2024
@brainwo brainwo pinned this issue Apr 25, 2024
@brainwo brainwo modified the milestones: Release 1.0, Release 0.1 Apr 26, 2024
@brainwo
Copy link
Owner Author

brainwo commented Apr 26, 2024

Looks like I need to use this https://pub.dev/packages/xdg_directories

@brainwo
Copy link
Owner Author

brainwo commented Oct 1, 2024

Looks like Apple is doing official support for PKL Language Server now:
https://github.com/apple/pkl-lsp

There are still missing features, but might be good to keep an eye on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant