Skip to content
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

Use Scintilla's JSON lexer for JSON instead of the JavaScript/C++ lexer #2454

Closed
wants to merge 1 commit into from
Closed

Commits on Mar 17, 2020

  1. Use Scintilla's JSON lexer for JSON instead of the JavaScript/C++ lexer

    This commit changes JSON from a custom filetype to one with its own lexer, as requested in
    #384 (comment). The lexer is taken from Scintilla's upstream
    (version 3.10.4).
    
    This has the following effects:
     - JavaScript comments (//, /* */) are no longer highlighted as comments, since JSON doesn't allow them
     - Text outside of quotes, except keywords and numbers, is now considered an error, and highlighted as such (in red)
    
    It should also allow keys and string values to be highlighted in different colours, as in many other editors, but I couldn't get that to work.
    
    Stopping comments from being highlighted is the main motivation for this - highlighting them misleads the user into thinking that JSON allows them.
    d5l6 committed Mar 17, 2020
    Copy the full SHA
    b22b5b8 View commit details
    Browse the repository at this point in the history