As mentioned in https://github.com/microsoft/vscode/wiki/Semantic-Highlighting-Overview#semantic-highlighting, the goal is to improve the first impression of semantic highlighting as well allow themes to opt-in to semantic highlighting.
give themes a way to opt-in to semantic highlighting
I like this feature. I think an individual config is better than a global one because it will allow us to use non-maintained themes that have semantic highlighting disabled and themes that have it enabled, without having to set the global config every time we change from a theme that uses it to one that doesn't
enable semantic coloring by default only the built-in themes
It's a good default setting
no longer show semantic color in imports
What are the reasons? It would be nice to know what most theme creators think, not just a few. Maybe some of us would like to use it
A configuration could be added to enable or disable that feature:
"editor.semanticHighlighting.imports": true
Changes pushed.
To verify:
function foo() { const x = () => {}; const y = x; }. foo, x and y all get the function colorAtom One Dark), semantic color should be disabled. "editor.tokenColorCustomizations": {
"[Atom One Dark]": {
"semanticHighlighting": true
}
}
and
"editor.tokenColorCustomizations": {
semanticHighlighting": true
}
semantic highlighting should be enabled
var fs = require('fs'); // require shown as function
require.resolve('fpop/bat'); // require shown as variable
Promise.resolve(null) // Promise shown as class
~Now that semantic highlighting is opt-in on a per theme basis, is there any way for a user to override that? I use Monokai Pro, which hasn't been updated in quite some time, and the developer seems fairly inactive now. The semantic highlighting was working great on 1.43, and I'd like to get it back now that it's been disabled in 1.43.1.~
~I tried adding~
"editor.tokenColorCustomizations": {
"[Monokai Pro]": {
"semanticHighlighting": true
}
}
~to my user config, but that didn't work.~
Edit: The above actually did work, except that semantic highlighting doesn't work on imports. I see now that this is the intended behavior. But why is semantic highlighting no longer available for import statements?
Make sure to also remove "editor.semanticHighlighing": false
Sorry, I was able to get semantic highlighting working by setting the config in my previous reply. But I'm wondering if it's possible to re-enable semantic highlighting on imports. On 1.43, variable names in import statements in Javascript would be highlighted based on their type. But on 1.43.1 with semantic highlighting enabled, import lines are no longer highlighted, as noted in your original message.
@DanielPower #93017
Most helpful comment
What are the reasons? It would be nice to know what most theme creators think, not just a few. Maybe some of us would like to use it
A configuration could be added to enable or disable that feature: