Thom1729 / Sublime-JS-Custom

Customizable JavaScript syntax highlighting for Sublime Text.
MIT License
137 stars 9 forks source link

Broken syntax highlighting with nested Flow generics and JSX #118

Closed mischnic closed 2 years ago

mischnic commented 3 years ago

The nested generics in this example

class X {
  foo(): void {
    let errors = new Map<NodeId, Array<Thing>>();
    let dirtyDeps = new Set<NodeId>();
  }
}

seem to confuse the syntax highlighting (i.e. the second let isn't recognized)

Bildschirmfoto 2021-05-30 um 14 59 51

Version: 4.0.6 Sublime Text 4, Build 4107 config:

{
    "configurations": {
        "Default": {}
    },
    "defaults": {
        "flow_types": true,
        "jsx": true,
        "string_object_keys": true
    }
}
Thom1729 commented 3 years ago

It turns out the Flow extension didn't actually support function type arguments, probably because that's really difficult to implement without branching. I've added that in the current 4.1 beta.

Thom1729 commented 2 years ago

Fixed in v4.1.0.