For what it's worth, I've now seen JSONC files (with comments) stored in .json multiple times, e.g. the launch settings in any VS Code project. So while technically a different file type, I do wonder how you'd want to detect it based on the file ending, making the idea of two different parsers for this IMHO quite impractical.

The thing is, I want the syntax highlighting to mostly make my file readable, not to teach me how "wrong" it is when it is actually correct given the actual file type, and I would assume that applies to many users. And it seems like there is no way to safely detect here if a comment in a .json file is an actual mistake, or just a quirk of whatever tool wrote/reads that file. So I don't think it makes sense to attempt it, or to mark it as "mistake" by default.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.