Closed trongthanh closed 4 years ago
The same change has been merged into the core JavaScript syntax (https://github.com/sublimehq/Packages/pull/2020), but it has not yet been released into a stable build. JS Custom merges upstream changes eagerly.
The change is deliberate; meta.mapping
is used across many syntax definitions, whereas meta.object-literal
was only used in the JavaScript syntax definition. Going forward, color schemes should target meta.mapping
. If you're using a tweaked syntax definition, I'd recommend updating it to support both scopes for the time being.
As it happens, I am also using a tweaked version of Mariana that targets JS object literal keys, and I had exactly the same issue before I remembered that I'd changed the scopes.
Understood and sound reasonable. I guess I have to update my custom scheme for this. Thanks for the explanation.
I just noticed that in recent release, the scope name of object's keys provided by this plugin is different from ST3's default JavaScript syntax. For example, with below snippet:
With JS Custom - Default syntax, the scope names of the object key (1) and the renamed key in destructuring (2) are respectively:
source.js.default meta.mapping.js meta.mapping.key.js
source.js.default meta.binding.destructuring.mapping.js meta.mapping.key.js
Meanwhile, with default JavaScript syntax, we've got:
source.js meta.object-literal.js meta.object-literal.key.js
source.js meta.binding.destructuring.mapping.js meta.object-literal.key.js
The reason I noticed and raised this issue is that I have a custom Mariana color scheme that highlight object keys and renamed keys in destructuring (that I posted earlier in another issue #80).
I'd like to know whether this is a bug of JS Custom or it is a feature? If it's intended, any reason behind? Because of this change, my tweak to the theme doesn't work any more with JS Custom but it still work with default JavaScript syntax.