microsoft / TypeScript-TmLanguage

TextMate grammar files for TypeScript for VS Code, Sublime Text, and Atom.
MIT License
398 stars 125 forks source link

`from` var name is highlighted like `from` statement in JS #920

Closed Rudxain closed 1 year ago

Rudxain commented 2 years ago

Does this issue occur when all extensions are disabled?: Yes

Steps to Reproduce:

  1. Create a new Javascript source-code file, or a Markdown file with a js code block.
  2. Type the following text:
    import from from 'from'
  3. Both froms will be colored the same. It happens with dark & light themes. The module path string can have any value, I just used "from" for emphasis. This doesn't happen when declaring a var named from, the var is colored like any other var, regardless of declaration keyword (var, let, const).

Screenshot:

sheetalkamat commented 1 year ago

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.

sheetalkamat commented 1 year ago

Duplicate of #891