Skip to content

Prefer ranking higher the language for which the syntax is syntactically correct #30

@vfonic

Description

@vfonic

JSON and JavaScript (and TypeScript) are quite similar. When I paste JSON in an untitled file, many times it gets recognized as JavaScript or TypeScript and shows all the syntax errors, because pure JSON is not syntactically correct JavaScript.
It would be great if editor could detect this somehow (I understand this is complicated to do for every language out there), and try next detected language in the list. In this case, the next language would probably be JSON (let's disregard TypeScript for now). The plugin could then check for syntax errors. If there are none, then it's more likely that the actual untitled document content is JSON, not JavaScript and that should be the language selected instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions