Packages icon indicating copy to clipboard operation
Packages copied to clipboard

[Rust] More small tweaks to type matching

Open FichteFoll opened this issue 2 years ago • 3 comments

  • Fixes highlighting of unknown generic types
  • Adds stacking of storage.type under support.type

FichteFoll avatar Nov 23 '22 21:11 FichteFoll

Why stacking two type scopes?

With a closer and careful look at original TextMate scope naming guidelines storage.type is meant for any basic builtin data type, such as int, class, ..., while support.type is meant for any kind of library, 3rd-party or user defined data type.

We already abused that a bit by introducing keyword.declaration and limiting support scope to standard library like types.

I wouldn't start stacking those different kinds of data type scopes.

deathaxe avatar Nov 24 '22 15:11 deathaxe

I was wondering the same thing myself :)

keith-hall avatar Nov 24 '22 15:11 keith-hall

Stacking was primarily inspired from the discussion at https://github.com/sublimehq/Packages/issues/1842#issuecomment-477158241. The discussion never reached a conclusion though and I also see that this sort of stacking is not used elsewhere, so I will drop the commit.

FichteFoll avatar Nov 28 '22 10:11 FichteFoll