docs: mention advanced semantic token options
They are:
"ui.noSemanticNumber": true,
"ui.noSemanticString": true
Updates golang/vscode-go#2682
Change-Id: I942b735af16ed7d070615baad231df4cdcba5d73
GitHub-Last-Rev: 9ac0a3eeb8
GitHub-Pull-Request: golang/vscode-go#2684
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/471280
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Peter Weinberger <pjw@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Auto-Submit: Hyang-Ah Hana Kim <hyangah@gmail.com>
This commit is contained in:
Родитель
72249dc940
Коммит
5ffadd31d5
|
@ -112,7 +112,18 @@ Quickly toggle between a file and its corresponding test file by using the [`Go:
|
|||
|
||||
The default syntax highlighting for Go files is implemented in Visual Studio Code using TextMate grammar, not by this extension.
|
||||
|
||||
If you are using `gopls`, you can enable [Semantic Highlighting](https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide) for more accurate syntax highlighting based on semantic tokenization using `"gopls": { "ui.semanticTokens": true }`.
|
||||
If you are using `gopls`, you can enable [Semantic Highlighting](https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide) for more accurate syntax highlighting based on semantic tokenization using this setting:
|
||||
|
||||
```
|
||||
"gopls": {
|
||||
"ui.semanticTokens": true,
|
||||
|
||||
// you can optionally turn on these features for more colors
|
||||
// see https://go.dev/issue/45753 and https://go.dev/issue/45792
|
||||
"ui.noSemanticString": true, // delegates string syntax highlighting to vscode
|
||||
"ui.noSemanticNumber": true, // delegates number syntax highlighting to vscode
|
||||
}
|
||||
```
|
||||
|
||||
### Go template syntax highlighting
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче