Skip to content

Commit

Permalink
Switch to Semantic Tokens API (#5401)
Browse files Browse the repository at this point in the history
  • Loading branch information
Colengms authored Jul 1, 2020
1 parent 832165f commit f7165ba
Show file tree
Hide file tree
Showing 10 changed files with 370 additions and 896 deletions.
102 changes: 97 additions & 5 deletions Extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"license": "SEE LICENSE IN LICENSE.txt",
"engines": {
"vscode": "^1.43.0"
"vscode": "^1.44.0"
},
"bugs": {
"url": "https://github.com/Microsoft/vscode-cpptools/issues",
Expand Down Expand Up @@ -1539,16 +1539,108 @@
"configurationDefaults": {
"[cpp]": {
"editor.wordBasedSuggestions": false,
"editor.suggest.insertMode": "replace"
"editor.suggest.insertMode": "replace",
"editor.semanticHighlighting.enabled": true
},
"[c]": {
"editor.wordBasedSuggestions": false,
"editor.suggest.insertMode": "replace"
"editor.suggest.insertMode": "replace",
"editor.semanticHighlighting.enabled": true
},
"[Log]": {
"editor.wordWrap": "off"
}
}
},
"semanticTokenTypes": [
{
"id": "referenceType",
"superType": "class",
"description": "A C++/CLI reference type."
},
{
"id": "cliProperty",
"superType": "property",
"description": "A C++/CLI property."
},
{
"id": "genericType",
"superType": "class",
"description": "A C++/CLI generic type."
},
{
"id": "valueType",
"superType": "class",
"description": "A C++/CLI value type."
},
{
"id": "templateFunction",
"superType": "function",
"description": "A template function."
},
{
"id": "templateType",
"superType": "class",
"description": "A template type."
},
{
"id": "operatorOverload",
"superType": "operator",
"description": "An overloaded operator."
},
{
"id": "memberOperatorOverload",
"superType": "operator",
"description": "An overloaded operator member function."
},
{
"id": "newOperator",
"superType": "operator",
"description": "A C++ new or delete operator."
},
{
"id": "customLiteral",
"superType": "number",
"description": "A user-defined literal."
},
{
"id": "numberLiteral",
"superType": "number",
"description": "A user-defined literal number."
},
{
"id": "stringLiteral",
"superType": "string",
"description": "A user-defined literal string."
}
],
"semanticTokenModifiers": [
{
"id": "global",
"description": "Annotates a symbol that is declared in global scope."
},
{
"id": "local",
"description": "Annotates a symbol that is declared in local scope."
}
],
"semanticTokenScopes": [
{
"scopes": {
"referenceType": [ "entity.name.type.class.reference" ],
"cliProperty": [ "variable.other.property.cli" ],
"genericType": [ "entity.name.type.class.generic" ],
"valueType": [ "entity.name.type.class.value" ],
"templateFunction": [ "entity.name.function.templated" ],
"templateType": [ "entity.name.type.class.templated" ],
"operatorOverload": [ "entity.name.function.operator" ],
"memberOperatorOverload": [ "entity.name.function.operator.member" ],
"newOperator": [ "keyword.operator.new" ],
"numberLiteral": [ "entity.name.operator.custom-literal.number" ],
"customLiteral": [ "entity.name.operator.custom-literal" ],
"stringLiteral": [ "entity.name.operator.custom-literal.string" ]
}
}
]
},
"scripts": {
"vscode:prepublish": "yarn run compile",
Expand Down Expand Up @@ -1579,7 +1671,7 @@
"@types/plist": "^3.0.2",
"@types/semver": "^7.1.0",
"@types/tmp": "^0.1.0",
"@types/vscode": "1.43.0",
"@types/vscode": "1.44.0",
"@types/webpack": "^4.39.0",
"@types/which": "^1.3.2",
"@types/yauzl": "^2.9.1",
Expand Down
2 changes: 1 addition & 1 deletion Extension/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"c_cpp.configuration.updateChannel.description": "Set to \"Insiders\" to automatically download and install the latest Insiders builds of the extension, which include upcoming features and bug fixes.",
"c_cpp.configuration.experimentalFeatures.description": "Controls whether \"experimental\" features are usable.",
"c_cpp.configuration.suggestSnippets.description": "If true, snippets are provided by the language server.",
"c_cpp.configuration.enhancedColorization.description": "If enabled, code is colorized based on IntelliSense. This setting has no effect if IntelliSense is disabled or if using the Default High Contrast theme.",
"c_cpp.configuration.enhancedColorization.description": "If enabled, code is colorized based on IntelliSense. This setting only applies if intelliSenseEngine is set to \"Default\".",
"c_cpp.configuration.codeFolding.description": "If enabled, code folding ranges are provided by the language server.",
"c_cpp.configuration.vcpkg.enabled.markdownDescription": "Enable integration services for the [vcpkg dependency manager](https://aka.ms/vcpkg/).",
"c_cpp.configuration.renameRequiresIdentifier.description": "If true, 'Rename Symbol' will require a valid C/C++ identifier.",
Expand Down
Loading

0 comments on commit f7165ba

Please sign in to comment.