[Github-comments] [geany/geany] Use Scintilla's JSON lexer for JSON instead of the JavaScript/C++ lexer (#2454)

Matthew Brush notifications at xxxxx
Sat May 16 17:17:51 UTC 2020


> @ell1e I still think a dedicated JSON filetype should (at least by default) not allow comments.
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...

+1

> 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.

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 @eht16 mentioned).

It's easy enough to switch filetypes at runtime, or add a new mapping for the custom JSON-like filetype to `filetype_mappings.conf` to have it auto-detected.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2454#issuecomment-629678832
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20200516/035fd624/attachment-0001.htm>


More information about the Github-comments mailing list