No Semantic Tokens are Being Generated, while the IntegratedTerminal is working
See original GitHub issuePrerequisites
- I have written a descriptive issue title.
- I have searched all issues to ensure it has not already been reported.
- I have read the troubleshooting guide.
- I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
- I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
Summary
There are no semantic tokens being used by the editor.
( I was debugging why semantic colors for the powershell
language was ignoring all semantic configurations. )
It’s supposed to look like this:
PowerShell Version
🐒> $PSVersionTable
Name Value
---- -----
PSVersion 7.2.0
PSEdition Core
GitCommitId 7.2.0
OS Microsoft Windows 10.0.19043
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visual Studio Code Version
1.63.0
7db1a2b88f7557e0a43fec75b6ba7e50b3e9f77e
x64
code.cmd --list-extensions --show-versions | select-string powershell
Extension Version
ms-vscode.powershell@2021.10.2
Steps to Reproduce
- Enable semantic in your
settings.json
- Open any
*.ps1
file .1 Use token inspector, and you get no info.
semantic config
I have every possible semantic config enabled.
Visuals
I think the Language Server is running
This screen shows that these are all running
- autocomplete
1 reference
- ScriptAnalyzer warnings
Logs
{
"csharp.semanticHighlighting.enabled": true, // default is false?
"editor.semanticHighlighting.enabled": true, // // <true | false | ConfiguredbByTheme>
"editor.semanticTokenColorCustomizations": {
"csharp.semanticHighlighting.enabled": true, // default is false?
"editor.semanticHighlighting.enabled": "true",
"editor.semanticTokenColorCustomizations": {
// per-theme
"enabled": true,
"rules": {
"parameter": {
"foreground": "#ea00ff",
"underline": true,
"bold": true,
"italic": true,
"fontStyle": "italic bold underline"
},
},
"[Default Dark+]": {
"enabled": true,
"rules": {
// single value
// vs many
"*.abstract": {
"foreground": "#0000ff",
"underline": true,
"fontStyle": "bold underline"
},
"parameter": {
"foreground": "#ea00ff",
"underline": true,
"bold": true,
"italic": true,
"fontStyle": "italic bold underline"
},
}
},
},
}
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
January 2021 (version 1.53) - Visual Studio Code
Learn what is new in the Visual Studio Code January 2021 Release (1.53)
Read more >STViT: Semantic Tokens for Efficient Global and Local Vision ...
In this work, we propose a novel Semantic Token ViT (STViT), for efficient global and local vision transformers, which can also be revised ......
Read more >Monaco editor custom token provider behaviour - Stack Overflow
I have a vague prototype working with decorations, but for my usecase there's just no way of using decorations or semantic tokens, ...
Read more >Semantic token highlighting - SourceKit-LSP - Swift Forums
I'm going to use now response captured in handleDocumentUpdate to extract semantic tokens, but the issue is that textDocument/semanticTokens ...
Read more >Enhanced colorization - vscode-docs-arc
We've created a set of VS Code themes that closely resemble the default Light and Dark themes in Visual Studio, and include colors...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Working
Failed
Since
code
is failing butpowershell-preview
andpowershell
both work correctly oncode-insiders
, I’ll close this as resolved.Oh awesome, thanks so much @ninmonkey!