Skip to content

Support devbox.jsonc for better editor & diff highlighting #2602

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

Open
gjoseph92 opened this issue Apr 28, 2025 · 2 comments
Open

Support devbox.jsonc for better editor & diff highlighting #2602

gjoseph92 opened this issue Apr 28, 2025 · 2 comments
Labels
feature New feature or request triage Issue needs triage

Comments

@gjoseph92
Copy link

What problem are you trying to solve?

devbox.json supports comments, which is quite helpful. By default though, IDEs and GitHub diffs don't expect .json files to have comments, and highlight them as errors.

What solution would you like?

If devbox supported searching for devbox.jsonc files as well as .json, I could just name them accurately and most syntax highlighters would just work.

Alternatives you've considered

In VSCode, I've added this to my settings.json, which at least helps in the IDE:

    "files.associations": {
      "devbox.json": "jsonc"
    }

However, even with devbox.json linguist-language=JSON-with-Comments in .gitattributes, I can't get GitHub diffs to not highlight comments in red in diffs of the devbox.json, which makes PR review annoying.

@gjoseph92 gjoseph92 added feature New feature or request triage Issue needs triage labels Apr 28, 2025
@glennpratt
Copy link

Yes, this would be one less rough spot for new users. I'd also vote for just using YAML.

@drewgingerich
Copy link

I think YAML would be great for another reason: YAML has powerful multi-line strings that I think are really nice when writing shell scripts. Coming from writing shells scripts in YAML for GitLab CI, it feels a bit painful to write scripts in devbox.json. I do appreciate that Devbox uses an array of strings for each script, that already makes it a lot nicer than a single string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request triage Issue needs triage
Development

No branches or pull requests

3 participants