Vscode: [semantic][typescript] Semantic highlighting for imports should be optional

Created on 19 Mar 2020  路  9Comments  路  Source: microsoft/vscode

In 1.43.1, it was decided that imports should no longer have semantic highlighting, but in #92740 there is an answer that shows that I'm not the only one who actually liked that feature and find it useful. I hope you consider for next upgrade to at least make it optional. Thanks in advance.

feature-request semantic-tokens typescript

Most helpful comment

Thanks for this issue. I actually spent a while debugging this, and even reported it, not checking whether it might be a feature.

Needless to say I second this proposal. Semantic highlighting in imports help me to quickly identify the type of whatever I am importing into the component.

All 9 comments

Thanks for this issue. I actually spent a while debugging this, and even reported it, not checking whether it might be a feature.

Needless to say I second this proposal. Semantic highlighting in imports help me to quickly identify the type of whatever I am importing into the component.

I also like this feature and hope it will be available next releases

I'm running VSCode version 1.42 for this feature alone so I also second this 馃槃

Hi, @aeschli. Are there any news about this feature? All I've seen is this has been delayed twice. Many people still using 1.42 because of this, including me. Is this ever going to be done? If not, I think you should say something, so we can go use some other editor/IDE that gives us what we want/need without having to stop updates.

It's still on my list, but there's always other things coming up.
Anyone want to give a try, I can give some infos where to begin.

Anyone want to give a try, I can give some infos where to begin.

@aeschli I'd be glad to give it a try. Hope I have what's needed. Please, give me the info I need and I'll give this as much time as I can spare.

Semantic highlighting is implemented in a TypeScipt server plugin: https://github.com/aeschli/typescript-vscode-sh-plugin
The client part for semantic highlighting is here https://github.com/microsoft/vscode/blob/master/extensions/typescript-language-features/src/features/semanticTokens.ts

To send settings from the typescipt client to the plugin on the server, there's an API: https://github.com/microsoft/vscode/blob/856dea7e718a54e6799c7cac96dbd80acd3b5889/extensions/typescript-language-features/src/utils/plugins.ts#L60

  • define a new setting for the typesccript extension
  • in /semanticTokens.ts, read and observe the setting and send it to the plugin
  • in the plugin use the setting

The typescript team is working on adopting our semantic highlighting code to the ts server, see https://github.com/microsoft/TypeScript/pull/39119.
One done, we will move this issue in the TypeScript repo.

The typescript team is working on adopting our semantic highlighting code to the ts server, see microsoft/TypeScript#39119.
One done, we will move this issue in the TypeScript repo.

Is there any news about this?

Was this page helpful?
0 / 5 - 0 ratings