microsoft / TypeScript-TmLanguage

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

Does not provide different scopes for [ ] #630

Open psxcode opened 6 years ago

psxcode commented 6 years ago

TS and JS Grammar Extension version: 0.0.41 / latest

Code For this case vscode provides special scope 'punctuation.definition.binding-pattern.array'

const [value] = 'string'

For all these cases vscode provides single scope 'meta.array.literal meta.brace.square'

// array literal
const a = [1, 2, 3]

// array access by index
const b = a[1]

// object property access by name
const c = Math['min']

// object literal computed keys
const d = {
  [`key`]: 'computed'
}

Can you add different scopes for each case?

sheetalkamat commented 6 years ago

Will defer this till we have enough votes.