Gopher Robot submitted this change.
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: 9ac0a3eeb8778abbe4ef02d646b7d40344d21ecc
GitHub-Pull-Request: golang/vscode-go#2684
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/471280
Run-TryBot: Hyang-Ah Hana Kim <hya...@gmail.com>
TryBot-Result: kokoro <noreply...@google.com>
Reviewed-by: Peter Weinberger <p...@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hya...@gmail.com>
Auto-Submit: Hyang-Ah Hana Kim <hya...@gmail.com>
---
M docs/features.md
1 file changed, 36 insertions(+), 1 deletion(-)
diff --git a/docs/features.md b/docs/features.md
index 2292e90..a969315 100644
--- a/docs/features.md
+++ b/docs/features.md
@@ -112,7 +112,18 @@
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
To view, visit change 471280. To unsubscribe, or for help writing mail filters, visit settings.