microsoft / TypeScript-TmLanguage

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

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

Open fabiospampinato opened 2 years ago

fabiospampinato commented 2 years ago

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.

orta commented 2 years ago

Confirmed, they both get:

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

I think we only want that on the first one

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.