<p></p>
<p>For what it's worth, I've now seen JSONC files (with comments) stored in <code>.json</code> 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.</p>
<p>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 <code>.json</code> 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.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/2454#issuecomment-712703230">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ2NHSBFCZKQAZDEWQLSLVGQNANCNFSM4LN4L75A">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAIOWJ37NZ5WGSASAVMWPX3SLVGQNA5CNFSM4LN4L75KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFJ5PZ7Q.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/2454#issuecomment-712703230",
"url": "https://github.com/geany/geany/pull/2454#issuecomment-712703230",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>