-
Notifications
You must be signed in to change notification settings - Fork 0
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
Also see JSON(5) rewrite in core #1
Comments
Oh wow, I had no idea this was out there, thanks for the heads up! I would much rather have it be managed in the official repo, so I'll be checking that out soon. |
The test repo for that PR is at https://github.com/jrappen/sublime-json , where I'm currently breaking stuff and trying out a few things. I will delete the test repo though, as soon as that PR moves from "draft" status to "in review". Trying to get a solid base that works with a few JSON flavors. If you have any feedback, I'll take it. Thanks. |
Thanks, @jrappen ! I'll test out the JSON5 parts now. |
@jrappen actually one immediate question since I'm not very familiar with sublime package development - how do I test this properly? Can I clone the test repo somewhere and point sublime to it, or is it more involved than that? |
Clone it somewhere and symlink |
I assume you were confused by the Readme reference, Michael meant the Readme in the packages repo: https://github.com/sublimehq/Packages which has a few (more) instructions (for ST3, just remove |
@jrappen thank you! I was able to get it working. I haven't done a rigorous test yet, but one thing I noticed was all the object keys are highlighted yellow in the Monokai theme (I'll get a screenshot when I'm back on my desktop). Previously I was using an Hjson syntax to highlight JSON5 and it made the object keys blue when they were unquoted which seems a bit nicer, though I realize this is really a matter of opinion. What do you think? |
You can always add a color scheme override (ST4 has a new Command Palette shortcut for this) to tweak the keys to what you want. I think keeping standard scope patterns is more important than a particular color scheme's choice of blue v. yellow. For instance, I use Mariana, but would like my keys to be white. So I have this JSON in an override to Mariana.sublime-color-scheme: {
//...
"rules": [
//...
{
"name": "JSON Keys",
"scope": "meta.mapping.key.json string",
"foreground": "var(white3)",
},
//...
]
} |
@michaelblyons ahhh thank you! That's definitely the more proper way to go about that. I haven't done any sublime package dev before and am very much a user of the "standard issue" stuff in sublime, sorry for the amateurish questions. I'll keep using the current JSON5 syntax for a few days and see if I run into any issues. |
In case you missed it, there's a JSON/JSONC/JSON5 effort ongoing at sublimehq/Packages#3097
That doesn't mean you should necessarily stop working on this. But if you have some JSON5 familiarity, you could test the proposed changes.
The text was updated successfully, but these errors were encountered: