Open shellscape opened 2 years ago
This is a TypeScript grammar / semantic highlighing issue Note: we decided against semantic highlighting on imports. https://github.com/microsoft/vscode/issues/93017 is the request to add this back again.
@aeschli it looks like your last reply https://github.com/microsoft/vscode/issues/93017#issuecomment-949913282 was a direction to open an issue with the TS project - I'm not sure that anyone without intimate knowledge of the interaction between the TS language server and vscode is going to know what to put in an issue. I certainly wouldn't.
In giving this some more thought - wouldn't this also apply to ESM imports? When looking at a .mjs
file for example, the scopes become:
variable.other.readwrite.alias.js
meta.import.js
source.js
and
variable.other.readwrite.alias.js
meta.block.js
meta.import.js
source.js
In Atom, we can theme imports based on the type of thing being imported. As you can see below, import aliases/names are styled differently than the class
Knex
being imported. This has always been immensely handy for at a glance differentiation and validation of imports as well as for organizing imports.Below is the same theme applied to VS Code, but without the ability to differentiate.
I believe this comes down to a lack of TextMate scope. Here are the available scopes for
makeContext
:And the available scopes for
Knex
:My ignorant suggestion: it would probably be enough to catch capital-cased aliases for adding an additional scope.