<p></p>
<blockquote>
<p><a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/ell1e/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ell1e">@ell1e</a> I still think a dedicated JSON filetype should (at least by default) not allow comments.<br>
But we don't even need to make a hard decision here as the Scintilla JSON lexer has a property to toggle highlighting of comments: lexer.json.allow.comments...</p>
</blockquote>
<p>+1</p>
<blockquote>
<p>The JSON lexer setting is global for the filetype, so there would need to be two filetypes to handle both commentable JSON and uncommentable JSON.</p>
</blockquote>
<p>This seems OK. We could ship the proper JSON filetype and any users who want to derive some customized version of the language, could simply define a custom filetype inheriting from the real JSON filetype but with their overrides (such as the property <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/eht16/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/eht16">@eht16</a> mentioned).</p>
<p>It's easy enough to switch filetypes at runtime, or add a new mapping for the custom JSON-like filetype to <code>filetype_mappings.conf</code> to have it auto-detected.</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-629678832">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ2F5Y4GVSS4JTFVNZLRR3DD7ANCNFSM4LN4L75A">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAIOWJ6UILN6AED3VHOL5DDRR3DD7A5CNFSM4LN4L75KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEWECF4A.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-629678832",
"url": "https://github.com/geany/geany/pull/2454#issuecomment-629678832",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>