Skip to content

Broken syntax highlighting when the default import is named "from" #891

Open

Description

TS and JS Grammar Extension version: latest

Code

import from from './from';

Visual output

Screen Shot 2021-11-05 at 15 18 51

If the name assigned to the default export is "from" then it gets highlighted improperly.

Activity

  1. orta commented on Nov 5, 2021

    @orta
    Contributor

    Confirmed, they both get:

    keyword.control.from.tsx
    meta.import.tsx
    source.tsx
    

    I think we only want that on the first one

  2. sheetalkamat commented on Aug 17, 2022

    @sheetalkamat
    Member

    Given how tmlanguage grammar works and how we have things set up the effort to fix this is too much compared to how many people are running into this.

  3. added
    limitationIssue is result of tmLanguage limitation where in the lookup does not go beyond current line
    and removed on Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Effort: DifficultGood luck.limitationIssue is result of tmLanguage limitation where in the lookup does not go beyond current line

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions