diff --git a/Extension/package.json b/Extension/package.json index b1512f85d3..b7dfb45fbb 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -88,11 +88,29 @@ "id": "awaiting.activation.windows", "title": "%c_cpp.walkthrough.set.up.title%", "description": "%c_cpp.walkthrough.activating.description%", - "when": "workspacePlatform == windows && cpptools.scanForCompilersDone == false", + "when": "workspacePlatform == windows && cpptools.scanForCompilersDone == false && cpptools.windowsVersion != 10 && cpptools.windowsVersion != 11", "media": { "markdown": "dist/walkthrough/installcompiler/install-compiler-windows.md" } }, + { + "id": "awaiting.activation.windows10", + "title": "%c_cpp.walkthrough.set.up.title%", + "description": "%c_cpp.walkthrough.activating.description%", + "when": "workspacePlatform == windows && cpptools.scanForCompilersDone == false && cpptools.windowsVersion == 10", + "media": { + "markdown": "dist/walkthrough/installcompiler/install-compiler-windows10.md" + } + }, + { + "id": "awaiting.activation.windows11", + "title": "%c_cpp.walkthrough.set.up.title%", + "description": "%c_cpp.walkthrough.activating.description%", + "when": "workspacePlatform == windows && cpptools.scanForCompilersDone == false && cpptools.windowsVersion == 11", + "media": { + "markdown": "dist/walkthrough/installcompiler/install-compiler-windows11.md" + } + }, { "id": "no.compilers.found.mac", "title": "%c_cpp.walkthrough.set.up.title%", @@ -114,12 +132,30 @@ { "id": "no.compilers.found.windows", "title": "%c_cpp.walkthrough.set.up.title%", - "description": "%c_cpp.walkthrough.no.compilers.description%", - "when": "workspacePlatform == windows && cpptools.scanForCompilersDone == true && cpptools.scanForCompilersEmpty == true", + "description": "%c_cpp.walkthrough.no.compilers.windows.description%", + "when": "workspacePlatform == windows && cpptools.scanForCompilersDone == true && cpptools.scanForCompilersEmpty == true && cpptools.windowsVersion != 10 && cpptools.windowsVersion != 11", "media": { "markdown": "dist/walkthrough/installcompiler/install-compiler-windows.md" } }, + { + "id": "no.compilers.found.windows10", + "title": "%c_cpp.walkthrough.set.up.title%", + "description": "%c_cpp.walkthrough.no.compilers.windows.description%", + "when": "workspacePlatform == windows && cpptools.scanForCompilersDone == true && cpptools.scanForCompilersEmpty == true && cpptools.windowsVersion == 10", + "media": { + "markdown": "dist/walkthrough/installcompiler/install-compiler-windows10.md" + } + }, + { + "id": "no.compilers.found.windows11", + "title": "%c_cpp.walkthrough.set.up.title%", + "description": "%c_cpp.walkthrough.no.compilers.windows.description%", + "when": "workspacePlatform == windows && cpptools.scanForCompilersDone == true && cpptools.scanForCompilersEmpty == true && cpptools.windowsVersion == 11", + "media": { + "markdown": "dist/walkthrough/installcompiler/install-compiler-windows11.md" + } + }, { "id": "verify.compiler.mac", "title": "%c_cpp.walkthrough.set.up.title%", @@ -148,7 +184,7 @@ "id": "verify.compiler.windows", "title": "%c_cpp.walkthrough.set.up.title%", "description": "%c_cpp.walkthrough.compilers.found.description%", - "when": "workspacePlatform == windows && cpptools.scanForCompilersDone == true && cpptools.scanForCompilersEmpty == false", + "when": "workspacePlatform == windows && cpptools.scanForCompilersDone == true && cpptools.scanForCompilersEmpty == false && cpptools.windowsVersion != 10 && cpptools.windowsVersion != 11", "media": { "markdown": "dist/walkthrough/installcompiler/install-compiler-windows.md" }, @@ -156,6 +192,30 @@ "onContext:cpptools.trustedCompilerFound" ] }, + { + "id": "verify.compiler.windows10", + "title": "%c_cpp.walkthrough.set.up.title%", + "description": "%c_cpp.walkthrough.compilers.found.description%", + "when": "workspacePlatform == windows && cpptools.scanForCompilersDone == true && cpptools.scanForCompilersEmpty == false && cpptools.windowsVersion == 10", + "media": { + "markdown": "dist/walkthrough/installcompiler/install-compiler-windows10.md" + }, + "completionEvents": [ + "onContext:cpptools.trustedCompilerFound" + ] + }, + { + "id": "verify.compiler.windows11", + "title": "%c_cpp.walkthrough.set.up.title%", + "description": "%c_cpp.walkthrough.compilers.found.description%", + "when": "workspacePlatform == windows && cpptools.scanForCompilersDone == true && cpptools.scanForCompilersEmpty == false && cpptools.windowsVersion == 11", + "media": { + "markdown": "dist/walkthrough/installcompiler/install-compiler-windows11.md" + }, + "completionEvents": [ + "onContext:cpptools.trustedCompilerFound" + ] + }, { "id": "create.cpp.file", "title": "%c_cpp.walkthrough.create.cpp.file.title%", @@ -3025,6 +3085,11 @@ "title": "%c_cpp.command.selectIntelliSenseConfiguration.title%", "category": "C/C++" }, + { + "command": "C_Cpp.InstallCompiler", + "title": "%c_cpp.command.installCompiler.title%", + "category": "C/C++" + }, { "command": "C_Cpp.RescanCompilers", "title": "%c_cpp.command.rescanCompilers.title%", @@ -3222,6 +3287,15 @@ "command": "C_Cpp.SwitchHeaderSource", "key": "Alt+O", "when": "editorLangId =~ /^(c|(cuda-)?cpp)$/ && editorTextFocus && !(config.C_Cpp.intelliSenseEngine =~ /^[dD]isabled$/)" + }, + { + "command": "editor.action.codeAction", + "key": "ctrl+shift+r ctrl+i", + "args": { + "kind": "refactor.inline.macro", + "apply": "first" + }, + "when": "editorLangId =~ /^(c|(cuda-)?cpp)$/ && editorTextFocus && !(config.C_Cpp.intelliSenseEngine =~ /^[dD]isabled$/)" } ], "debuggers": [ @@ -5637,6 +5711,10 @@ "command": "C_Cpp.SelectDefaultCompiler", "when": "never" }, + { + "command": "C_Cpp.InstallCompiler", + "when": "never" + }, { "command": "C_Cpp.RescanCompilers", "when": "never" @@ -6115,6 +6193,20 @@ ] } } + ], + "codeActions": [ + { + "languages": [ + "c", + "cpp", + "cude-cpp" + ], + "actions": { + "kind": "refactor.inline.macro", + "title": "%c_cpp.codeActions.refactor.inline.macro.title%", + "description": "%c_cpp.codeActions.refactor.inline.macro.description%" + } + } ] }, "scripts": { diff --git a/Extension/package.nls.json b/Extension/package.nls.json index 9dd2655da0..6d83f1df0e 100644 --- a/Extension/package.nls.json +++ b/Extension/package.nls.json @@ -1,11 +1,11 @@ { - "c_cpp.subheaders.intelliSense.title" : "IntelliSense", - "c_cpp.subheaders.formatting.title" : "Formatting", - "c_cpp.subheaders.codeDocumentation.title" : "Code Documentation", - "c_cpp.subheaders.codeAnalysis.title" : "Code Analysis", - "c_cpp.subheaders.debugging.title" : "Debugging", - "c_cpp.subheaders.resourceManagement.title" : "Resource Management", - "c_cpp.subheaders.miscellaneous.title" : "Miscellaneous", + "c_cpp.subheaders.intelliSense.title": "IntelliSense", + "c_cpp.subheaders.formatting.title": "Formatting", + "c_cpp.subheaders.codeDocumentation.title": "Code Documentation", + "c_cpp.subheaders.codeAnalysis.title": "Code Analysis", + "c_cpp.subheaders.debugging.title": "Debugging", + "c_cpp.subheaders.resourceManagement.title": "Resource Management", + "c_cpp.subheaders.miscellaneous.title": "Miscellaneous", "c_cpp.capabilities.untrustedWorkspaces.description": "Multiple settings can cause processes local to the workspace to be executed, e.g. C_Cpp.clang_format_path, C_Cpp.codeAnalysis.clangTidy.path, C_Cpp.addNodeAddonIncludePaths, C_Cpp.default.compilerPath, C_Cpp.default.configurationProvider, and C_Cpp.default.compileCommands, and the equivalent properties in c_cpp_properties.json.", "c_cpp.command.configurationSelect.title": "Select a Configuration...", "c_cpp.command.configurationProviderSelect.title": "Change Configuration Provider...", @@ -13,6 +13,7 @@ "c_cpp.command.configurationEditUI.title": "Edit Configurations (UI)", "c_cpp.command.selectDefaultCompiler.title": "Select Default Compiler...", "c_cpp.command.selectIntelliSenseConfiguration.title": "Select IntelliSense Configuration...", + "c_cpp.command.installCompiler.title": "Install a C++ Compiler", "c_cpp.command.rescanCompilers.title": "Rescan for Compilers", "c_cpp.command.switchHeaderSource.title": "Switch Header/Source", "c_cpp.command.enableErrorSquiggles.title": "Enable Error Squiggles", @@ -48,66 +49,301 @@ "c_cpp.command.activeSshTarget.title": "Get the active SSH target", "c_cpp.command.refreshCppSshTargetsView.title": "Refresh", "c_cpp.command.sshTerminal.title": "Connect to this SSH target in a new terminal", - "c_cpp.configuration.maxConcurrentThreads.markdownDescription": { "message": "The maximum number of concurrent threads to use for language service processing. The value is a hint and may not always be used. The default of `null` (empty) uses the number of logical processors available.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.maxCachedProcesses.markdownDescription": { "message": "The maximum number of cached processes to use for language service processing. The default of `null` (empty) uses twice the number of logical processors available.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.maxMemory.markdownDescription": { "message": "The maximum memory (in MB) available for language service processing. Fewer processes will be cached and run concurrently after this memory usage is exceeded. The default of `null` (empty) uses the system's free memory.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.intelliSense.maxCachedProcesses.markdownDescription": { "message": "The maximum number of IntelliSense processes to keep running. The default of `null` (empty) uses value inherited from `#C_Cpp.maxCachedProcesses#`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.intelliSense.maxMemory.markdownDescription": { "message": "Older IntelliSense processes will shut down before new processes are created after this memory usage (in MB) is exceeded. The default of `null` (empty) uses the value inherited from `#C_Cpp.maxMemory#`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.references.maxConcurrentThreads.markdownDescription": { "message": "The maximum number of concurrent threads to use for 'Find All References' and 'Rename'. The default of `null` (empty) uses the value inherited from `#C_Cpp.maxConcurrentThreads#`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.references.maxCachedProcesses.markdownDescription": { "message": "The maximum number of processes to keep in memory for 'Find All References' and 'Rename'. The default of `0` disables this feature. The value of `null` (empty) uses the value inherited from `#C_Cpp.maxCachedProcesses#`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.references.maxMemory.markdownDescription": { "message": "Fewer 'Find All References' and 'Rename' processes will be cached and run concurrently after this memory usage (in MB) is exceeded. The default of `null` (empty) uses the value inherited from `#C_Cpp.maxMemory#`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.codeAnalysis.maxConcurrentThreads.markdownDescription": { "message": "The maximum number of concurrent threads to use for code analysis. The default of `null` (empty) uses half the value inherited from `#C_Cpp.maxConcurrentThreads#`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.codeAnalysis.maxMemory.markdownDescription": { "message": "Fewer code analysis processes will run concurrently after this memory usage (in MB) is exceeded. The default of `null` (empty) uses the value inherited from `#C_Cpp.maxMemory#`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.codeAnalysis.updateDelay.markdownDescription": { "message": "Controls the delay in milliseconds before code analysis starts processing after a save is triggered from an edit when `#files.autoSave#` is `afterDelay` and `#C_Cpp.codeAnalysis.runAutomatically#` is `true`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.codeAnalysis.exclude.markdownDescription": { "message": "Configure glob patterns for excluding folders and files for code analysis. Files not under the workspace folder are always excluded. Inherits values from `#files.exclude#` and `#C_Cpp.files.exclude#`. Read more about glob patterns [here](https://code.visualstudio.com/docs/editor/codebasics#_advanced-search-options).", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.codeAnalysis.excludeBoolean.markdownDescription": { "message": "The glob pattern to match file paths against. Set to `true` or `false` to enable or disable the pattern.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.codeAnalysis.excludeWhen.markdownDescription": { "message": "Additional check on the siblings of a matching file. Use `$(basename)` as variable for the matching file name.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.codeAnalysis.runAutomatically.markdownDescription": { "message": "If `true`, code analysis will run automatically on a file after it is opened or saved.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.codeAnalysis.clangTidy.codeAction.showDisable.markdownDescription": { "message": "If `true`, the 'Disable' code action will be shown when available (the next time code analysis is run). When the 'Disable' code action is used, it adds the warning code to the `C_Cpp.codeAnalysis.clangTidy.checks.disabled` setting.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.codeAnalysis.clangTidy.codeAction.showDocumentation.markdownDescription": { "message": "If `true`, the 'Show Documentation for' code action will be shown when available (the next time code analysis is run).", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, + "c_cpp.configuration.maxConcurrentThreads.markdownDescription": { + "message": "The maximum number of concurrent threads to use for language service processing. The value is a hint and may not always be used. The default of `null` (empty) uses the number of logical processors available.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.maxCachedProcesses.markdownDescription": { + "message": "The maximum number of cached processes to use for language service processing. The default of `null` (empty) uses twice the number of logical processors available.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.maxMemory.markdownDescription": { + "message": "The maximum memory (in MB) available for language service processing. Fewer processes will be cached and run concurrently after this memory usage is exceeded. The default of `null` (empty) uses the system's free memory.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.intelliSense.maxCachedProcesses.markdownDescription": { + "message": "The maximum number of IntelliSense processes to keep running. The default of `null` (empty) uses value inherited from `#C_Cpp.maxCachedProcesses#`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.intelliSense.maxMemory.markdownDescription": { + "message": "Older IntelliSense processes will shut down before new processes are created after this memory usage (in MB) is exceeded. The default of `null` (empty) uses the value inherited from `#C_Cpp.maxMemory#`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.references.maxConcurrentThreads.markdownDescription": { + "message": "The maximum number of concurrent threads to use for 'Find All References' and 'Rename'. The default of `null` (empty) uses the value inherited from `#C_Cpp.maxConcurrentThreads#`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.references.maxCachedProcesses.markdownDescription": { + "message": "The maximum number of processes to keep in memory for 'Find All References' and 'Rename'. The default of `0` disables this feature. The value of `null` (empty) uses the value inherited from `#C_Cpp.maxCachedProcesses#`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.references.maxMemory.markdownDescription": { + "message": "Fewer 'Find All References' and 'Rename' processes will be cached and run concurrently after this memory usage (in MB) is exceeded. The default of `null` (empty) uses the value inherited from `#C_Cpp.maxMemory#`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.codeAnalysis.maxConcurrentThreads.markdownDescription": { + "message": "The maximum number of concurrent threads to use for code analysis. The default of `null` (empty) uses half the value inherited from `#C_Cpp.maxConcurrentThreads#`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.codeAnalysis.maxMemory.markdownDescription": { + "message": "Fewer code analysis processes will run concurrently after this memory usage (in MB) is exceeded. The default of `null` (empty) uses the value inherited from `#C_Cpp.maxMemory#`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.codeAnalysis.updateDelay.markdownDescription": { + "message": "Controls the delay in milliseconds before code analysis starts processing after a save is triggered from an edit when `#files.autoSave#` is `afterDelay` and `#C_Cpp.codeAnalysis.runAutomatically#` is `true`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.codeAnalysis.exclude.markdownDescription": { + "message": "Configure glob patterns for excluding folders and files for code analysis. Files not under the workspace folder are always excluded. Inherits values from `#files.exclude#` and `#C_Cpp.files.exclude#`. Read more about glob patterns [here](https://code.visualstudio.com/docs/editor/codebasics#_advanced-search-options).", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.codeAnalysis.excludeBoolean.markdownDescription": { + "message": "The glob pattern to match file paths against. Set to `true` or `false` to enable or disable the pattern.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.codeAnalysis.excludeWhen.markdownDescription": { + "message": "Additional check on the siblings of a matching file. Use `$(basename)` as variable for the matching file name.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.codeAnalysis.runAutomatically.markdownDescription": { + "message": "If `true`, code analysis will run automatically on a file after it is opened or saved.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.codeAnalysis.clangTidy.codeAction.showDisable.markdownDescription": { + "message": "If `true`, the 'Disable' code action will be shown when available (the next time code analysis is run). When the 'Disable' code action is used, it adds the warning code to the `C_Cpp.codeAnalysis.clangTidy.checks.disabled` setting.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.codeAnalysis.clangTidy.codeAction.showDocumentation.markdownDescription": { + "message": "If `true`, the 'Show Documentation for' code action will be shown when available (the next time code analysis is run).", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, "c_cpp.configuration.codeAnalysis.clangTidy.codeAction.showClear.description": "Controls which 'Clear' code analysis problem code action options are available. Changing the setting to show more options may require re-running code analysis.", "c_cpp.configuration.codeAnalysis.clangTidy.codeAction.showClear.None.description": "Show no 'Clear' code actions.", "c_cpp.configuration.codeAnalysis.clangTidy.codeAction.showClear.AllOnly.description": "Show only the 'Clear all' code action (or 'Clear all ' if there is only one type or 'Clear this' if there is only one problem).", "c_cpp.configuration.codeAnalysis.clangTidy.codeAction.showClear.AllAndAllType.description": "Show the 'Clear all' code action (if there are multiple problem types) and the 'Clear all ' code action (or 'Clear this' if there is only one problem for the )", "c_cpp.configuration.codeAnalysis.clangTidy.codeAction.showClear.AllAndAllTypeAndThis.description": "Show the 'Clear all' (if there are multiple problem types), 'Clear all ' (if there are multiple problems for the ), and 'Clear this' code actions", - "c_cpp.configuration.codeAnalysis.clangTidy.codeAction.formatFixes.markdownDescription": { "message": "If `true`, formatting will be run on the lines changed by 'Fix' code actions.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.codeAnalysis.clangTidy.enabled.markdownDescription": { "message": "If `true`, code analysis using `clang-tidy` will be enabled and will run after a file is opened or saved if `#C_Cpp.codeAnalysis.runAutomatically#` is `true` (the default).", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.codeAnalysis.clangTidy.path.markdownDescription": { "message": "The full path of the `clang-tidy` executable. If not specified, and `clang-tidy` is available in the environment path, that is used. If not found in the environment path, the `clang-tidy` bundled with the extension will be used.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.codeAnalysis.clangTidy.config.markdownDescription": { "message": "Specifies a `clang-tidy` configuration in YAML/JSON format: `{Checks: '-*,clang-analyzer-*', CheckOptions: [{key: x, value: y}]}`. When the value is empty, `clang-tidy` will attempt to find a file named `.clang-tidy` for each source file in its parent directories.", "comment": [ "Words 'key' and 'value' in '{key: value, ...}' should be translated, but all other markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.codeAnalysis.clangTidy.fallbackConfig.markdownDescription": { "message": "Specifies a `clang-tidy` configuration in YAML/JSON format to be used as a fallback when `#C_Cpp.codeAnalysis.clangTidy.config#` is not set and no `.clang-tidy` file is found: `{Checks: '-*,clang-analyzer-*', CheckOptions: [{key: x, value: y}]}`.", "comment": [ "Words 'key' and 'value' in '{key: value, ...}' should be translated, but all other markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.codeAnalysis.clangTidy.headerFilter.markdownDescription": { "message": "A POSIX extended regular expression (ERE) matching the names of the headers to output diagnostics from. Diagnostics from the main file of each translation unit are always displayed. The `${workspaceFolder}` variable is supported (and is used as the default fallback value if no `.clang-tidy` file exists). If this option is not `null` (empty), it overrides the `HeaderFilterRegex` option in a `.clang-tidy` file, if any.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.codeAnalysis.clangTidy.args.markdownDescription": { "message": "Additional command line arguments to pass to `clang-tidy`. These take precedence over the equivalent `C_Cpp.codeAnalysis.clangTidy.*` settings.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.codeAnalysis.clangTidy.useBuildPath.markdownDescription": { "message": "If `true` and `compileCommands` is set, the `-p=` argument is passed to `clang-tidy` instead of build arguments being passed after `--`. This may not work if environment variables aren't set so that system includes can be found.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.codeAnalysis.clangTidy.checks.enabled.markdownDescription": { "message": "List of enabled `clang-tidy` checks. The values are appended to the `Checks` in a `.clang-tidy` file or `#C_Cpp.codeAnalysis.clangTidy.config#`, if any. The default check `clang-analyzer-*` is always used unless it is explicitly disabled.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.codeAnalysis.clangTidy.checks.disabled.markdownDescription": { "message": "List of disabled `clang-tidy` checks. The values are appended to the `Checks` in a `.clang-tidy` file or `#C_Cpp.codeAnalysis.clangTidy.config#`, if any.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, + "c_cpp.configuration.codeAnalysis.clangTidy.codeAction.formatFixes.markdownDescription": { + "message": "If `true`, formatting will be run on the lines changed by 'Fix' code actions.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.codeAnalysis.clangTidy.enabled.markdownDescription": { + "message": "If `true`, code analysis using `clang-tidy` will be enabled and will run after a file is opened or saved if `#C_Cpp.codeAnalysis.runAutomatically#` is `true` (the default).", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.codeAnalysis.clangTidy.path.markdownDescription": { + "message": "The full path of the `clang-tidy` executable. If not specified, and `clang-tidy` is available in the environment path, that is used. If not found in the environment path, the `clang-tidy` bundled with the extension will be used.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.codeAnalysis.clangTidy.config.markdownDescription": { + "message": "Specifies a `clang-tidy` configuration in YAML/JSON format: `{Checks: '-*,clang-analyzer-*', CheckOptions: [{key: x, value: y}]}`. When the value is empty, `clang-tidy` will attempt to find a file named `.clang-tidy` for each source file in its parent directories.", + "comment": [ + "Words 'key' and 'value' in '{key: value, ...}' should be translated, but all other markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.codeAnalysis.clangTidy.fallbackConfig.markdownDescription": { + "message": "Specifies a `clang-tidy` configuration in YAML/JSON format to be used as a fallback when `#C_Cpp.codeAnalysis.clangTidy.config#` is not set and no `.clang-tidy` file is found: `{Checks: '-*,clang-analyzer-*', CheckOptions: [{key: x, value: y}]}`.", + "comment": [ + "Words 'key' and 'value' in '{key: value, ...}' should be translated, but all other markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.codeAnalysis.clangTidy.headerFilter.markdownDescription": { + "message": "A POSIX extended regular expression (ERE) matching the names of the headers to output diagnostics from. Diagnostics from the main file of each translation unit are always displayed. The `${workspaceFolder}` variable is supported (and is used as the default fallback value if no `.clang-tidy` file exists). If this option is not `null` (empty), it overrides the `HeaderFilterRegex` option in a `.clang-tidy` file, if any.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.codeAnalysis.clangTidy.args.markdownDescription": { + "message": "Additional command line arguments to pass to `clang-tidy`. These take precedence over the equivalent `C_Cpp.codeAnalysis.clangTidy.*` settings.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.codeAnalysis.clangTidy.useBuildPath.markdownDescription": { + "message": "If `true` and `compileCommands` is set, the `-p=` argument is passed to `clang-tidy` instead of build arguments being passed after `--`. This may not work if environment variables aren't set so that system includes can be found.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.codeAnalysis.clangTidy.checks.enabled.markdownDescription": { + "message": "List of enabled `clang-tidy` checks. The values are appended to the `Checks` in a `.clang-tidy` file or `#C_Cpp.codeAnalysis.clangTidy.config#`, if any. The default check `clang-analyzer-*` is always used unless it is explicitly disabled.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.codeAnalysis.clangTidy.checks.disabled.markdownDescription": { + "message": "List of disabled `clang-tidy` checks. The values are appended to the `Checks` in a `.clang-tidy` file or `#C_Cpp.codeAnalysis.clangTidy.config#`, if any.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, "c_cpp.configuration.formatting.description": "Configures the formatting engine.", - "c_cpp.configuration.formatting.clangFormat.markdownDescription": { "message": "`clang-format` will be used to format code.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.formatting.vcFormat.markdownDescription": { "message": "The Visual C++ formatting engine will be used to format code.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.formatting.Default.markdownDescription": { "message": "By default, `clang-format` will be used to format the code. However, the Visual C++ formatting engine will be used if an `.editorconfig` file with relevant settings is found nearer to the code being formatted and `#C_Cpp.clang_format_style#` is the default value: `file`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.formatting.Disabled.markdownDescription": { "message": "Code formatting will be disabled.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.vcFormat.indent.braces.markdownDescription": { "message": "Braces are indented by the amount specified in the `#editor.tabSize#` setting.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, + "c_cpp.configuration.formatting.clangFormat.markdownDescription": { + "message": "`clang-format` will be used to format code.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.formatting.vcFormat.markdownDescription": { + "message": "The Visual C++ formatting engine will be used to format code.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.formatting.Default.markdownDescription": { + "message": "By default, `clang-format` will be used to format the code. However, the Visual C++ formatting engine will be used if an `.editorconfig` file with relevant settings is found nearer to the code being formatted and `#C_Cpp.clang_format_style#` is the default value: `file`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.formatting.Disabled.markdownDescription": { + "message": "Code formatting will be disabled.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.vcFormat.indent.braces.markdownDescription": { + "message": "Braces are indented by the amount specified in the `#editor.tabSize#` setting.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, "c_cpp.configuration.vcFormat.indent.multiLineRelativeTo.description": "Determines what new line indentation is relative to.", "c_cpp.configuration.vcFormat.indent.multiLineRelativeTo.outermostParenthesis.description": "Indent new line relative to the outermost open parenthesis.", "c_cpp.configuration.vcFormat.indent.multiLineRelativeTo.innermostParenthesis.description": "Indent new line relative to the innermost open parenthesis.", "c_cpp.configuration.vcFormat.indent.multiLineRelativeTo.statementBegin.description": "Indent new line relative to the beginning of the current statement.", - "c_cpp.configuration.vcFormat.indent.withinParentheses.markdownDescription": { "message": "When a new line is typed, it is aligned under the opening parenthesis or based on `#C_Cpp.vcFormat.indent.multiLineRelativeTo#`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.vcFormat.indent.withinParentheses.alignToParenthesis.markdownDescription": { "message": "New line is aligned under the opening parenthesis.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.vcFormat.indent.withinParentheses.indent.markdownDescription": { "message": "New line is indented based on `#C_Cpp.vcFormat.indent.multiLineRelativeTo#`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, + "c_cpp.configuration.vcFormat.indent.withinParentheses.markdownDescription": { + "message": "When a new line is typed, it is aligned under the opening parenthesis or based on `#C_Cpp.vcFormat.indent.multiLineRelativeTo#`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.vcFormat.indent.withinParentheses.alignToParenthesis.markdownDescription": { + "message": "New line is aligned under the opening parenthesis.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.vcFormat.indent.withinParentheses.indent.markdownDescription": { + "message": "New line is indented based on `#C_Cpp.vcFormat.indent.multiLineRelativeTo#`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, "c_cpp.configuration.vcFormat.indent.preserveWithinParentheses.description": "In existing code, preserve the existing indent alignment of new lines within parentheses.", - "c_cpp.configuration.vcFormat.indent.caseLabels.markdownDescription": { "message": "Labels are indented relative to switch statements by the amount specified in the `#editor.tabSize#` setting.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.vcFormat.indent.caseContents.markdownDescription": { "message": "Code inside a `case` block is indented relative to its label by the amount specified in the `#editor.tabSize#` setting.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.vcFormat.indent.caseContentsWhenBlock.markdownDescription": { "message": "Indent braces following a case statement by the amount specified in the `#editor.tabSize#` setting.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.vcFormat.indent.lambdaBracesWhenParameter.markdownDescription": { "message": "Indent braces of lambdas used as function parameters relative to the start of the statement by the amount specified in the `#editor.tabSize#` setting.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, + "c_cpp.configuration.vcFormat.indent.caseLabels.markdownDescription": { + "message": "Labels are indented relative to switch statements by the amount specified in the `#editor.tabSize#` setting.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.vcFormat.indent.caseContents.markdownDescription": { + "message": "Code inside a `case` block is indented relative to its label by the amount specified in the `#editor.tabSize#` setting.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.vcFormat.indent.caseContentsWhenBlock.markdownDescription": { + "message": "Indent braces following a case statement by the amount specified in the `#editor.tabSize#` setting.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.vcFormat.indent.lambdaBracesWhenParameter.markdownDescription": { + "message": "Indent braces of lambdas used as function parameters relative to the start of the statement by the amount specified in the `#editor.tabSize#` setting.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, "c_cpp.configuration.vcFormat.indent.gotoLabels.description": "The position of goto labels.", - "c_cpp.configuration.vcFormat.indent.gotoLabels.oneLeft.markdownDescription": { "message": "Position goto labels to the left of the current code indentation, by the amount specified in the `#editor.tabSize#` setting.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.vcFormat.indent.gotoLabels.leftmostColumn.markdownDescription": { "message": "Position goto labels at the leftmost edge of the code.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.vcFormat.indent.gotoLabels.none.markdownDescription": { "message": "Goto labels will not be formatted.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, + "c_cpp.configuration.vcFormat.indent.gotoLabels.oneLeft.markdownDescription": { + "message": "Position goto labels to the left of the current code indentation, by the amount specified in the `#editor.tabSize#` setting.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.vcFormat.indent.gotoLabels.leftmostColumn.markdownDescription": { + "message": "Position goto labels at the leftmost edge of the code.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.vcFormat.indent.gotoLabels.none.markdownDescription": { + "message": "Goto labels will not be formatted.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, "c_cpp.configuration.vcFormat.indent.preprocessor.description": "The position of preprocessor directives.", - "c_cpp.configuration.vcFormat.indent.preprocessor.oneLeft.markdownDescription": { "message": "Preprocessor directives are positioned to the left of the current code indentation, by the amount specified in the `#editor.tabSize#` setting.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.vcFormat.indent.preprocessor.leftmostColumn.markdownDescription": { "message": "Preprocessor directives are positioned at the leftmost edge of the code.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.vcFormat.indent.preprocessor.none.markdownDescription": { "message": "Preprocessor directives will not be formatted.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.vcFormat.indent.accessSpecifiers.markdownDescription": { "message": "Access specifiers are indented relative to class or struct definitions by the amount specified in the `#editor.tabSize#` setting.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.vcFormat.indent.namespaceContents.markdownDescription": { "message": "Code is indented relative to its enclosing namespace by the amount specified in the `#editor.tabSize#` setting.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, + "c_cpp.configuration.vcFormat.indent.preprocessor.oneLeft.markdownDescription": { + "message": "Preprocessor directives are positioned to the left of the current code indentation, by the amount specified in the `#editor.tabSize#` setting.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.vcFormat.indent.preprocessor.leftmostColumn.markdownDescription": { + "message": "Preprocessor directives are positioned at the leftmost edge of the code.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.vcFormat.indent.preprocessor.none.markdownDescription": { + "message": "Preprocessor directives will not be formatted.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.vcFormat.indent.accessSpecifiers.markdownDescription": { + "message": "Access specifiers are indented relative to class or struct definitions by the amount specified in the `#editor.tabSize#` setting.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.vcFormat.indent.namespaceContents.markdownDescription": { + "message": "Code is indented relative to its enclosing namespace by the amount specified in the `#editor.tabSize#` setting.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, "c_cpp.configuration.vcFormat.indent.preserveComments.description": "Indentation of comments is not changed during formatting operations.", "c_cpp.configuration.vcFormat.newLine.beforeOpenBrace.namespace.description": "The position of opening braces for namespaces.", "c_cpp.configuration.vcFormat.newLine.beforeOpenBrace.type.description": "The position of opening braces for type definitions.", @@ -120,9 +356,24 @@ "c_cpp.configuration.vcFormat.newLine.scopeBracesOnSeparateLines.description": "Place opening and closing braces for scopes on separate lines.", "c_cpp.configuration.vcFormat.newLine.closeBraceSameLine.emptyType.description": "For empty types, move closing braces to the same line as opening braces.", "c_cpp.configuration.vcFormat.newLine.closeBraceSameLine.emptyFunction.description": "For empty function bodies, move closing braces to the same line as opening braces.", - "c_cpp.configuration.vcFormat.newLine.beforeCatch.markdownDescription": { "message": "Place `catch` and similar keywords on a new line.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.vcFormat.newLine.beforeElse.markdownDescription": { "message": "Place `else` on a new line.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.vcFormat.newLine.beforeWhileInDoWhile.markdownDescription": { "message": "Place `while` in a `do`-`while` loop on a new line.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, + "c_cpp.configuration.vcFormat.newLine.beforeCatch.markdownDescription": { + "message": "Place `catch` and similar keywords on a new line.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.vcFormat.newLine.beforeElse.markdownDescription": { + "message": "Place `else` on a new line.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.vcFormat.newLine.beforeWhileInDoWhile.markdownDescription": { + "message": "Place `while` in a `do`-`while` loop on a new line.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, "c_cpp.configuration.vcFormat.space.beforeFunctionOpenParenthesis.description": "Spacing between function names and opening parentheses of argument lists.", "c_cpp.configuration.vcFormat.space.beforeFunctionOpenParenthesis.insert.description": "Add a space before the opening parenthesis of a function.", "c_cpp.configuration.vcFormat.space.beforeFunctionOpenParenthesis.remove.description": "Spaces before opening parenthesis of a function are removed.", @@ -167,100 +418,410 @@ "c_cpp.configuration.vcFormat.space.aroundOperators.remove.description": "Spaces before and after the operator are removed.", "c_cpp.configuration.vcFormat.space.aroundOperators.ignore.description": "Spaces are left as entered.", "c_cpp.configuration.vcFormat.wrap.preserveBlocks.description": "Wrapping options for blocks.", - "c_cpp.configuration.vcFormat.wrap.preserveBlocks.oneLiners.markdownDescription": { "message": "A complete code block that is entered on one line is kept on one line, regardless of the values of any of the `C_Cpp.vcFormat.newLine.*` settings.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.vcFormat.wrap.preserveBlocks.allOneLineScopes.markdownDescription": { "message": "Any code where the opening and closing brace is entered on one line is kept on one line, regardless of the values of any of the `C_Cpp.vcFormat.newLine.*` settings.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.vcFormat.wrap.preserveBlocks.never.markdownDescription": { "message": "Code blocks are always formatted based on the values of the `C_Cpp.vcFormat.newLine.*` settings.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.clang_format_path.markdownDescription": { "message": "The full path of the `clang-format` executable. If not specified, and `clang-format` is available in the environment path, that is used. If not found in the environment path, the `clang-format` bundled with the extension will be used.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.clang_format_style.markdownDescription": { "message": "Coding style, currently supports: `Visual Studio`, `LLVM`, `Google`, `Chromium`, `Mozilla`, `WebKit`, `Microsoft`, `GNU`. Use `file` to load the style from a `.clang-format` file in the current or parent directory, or use `file:/.clang-format` to reference a specific path. Use `{key: value, ...}` to set specific parameters. For example, the `Visual Studio` style is similar to: `{ BasedOnStyle: LLVM, UseTab: Never, IndentWidth: 4, TabWidth: 4, BreakBeforeBraces: Allman, AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: false, ColumnLimit: 0, AccessModifierOffset: -4, NamespaceIndentation: All, FixNamespaceComments: false }`.", "comment": [ "Words 'key' and 'value' in '{key: value, ...}' and the word 'path' in 'file:/.clang-format' should be translated, but all other markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.clang_format_fallbackStyle.markdownDescription": { "message": "Name of the predefined style used as a fallback in case `clang-format` is invoked with style `file` but the `.clang-format` file is not found. Possible values are `Visual Studio`, `LLVM`, `Google`, `Chromium`, `Mozilla`, `WebKit`, `Microsoft`, `GNU`, `none`, or use `{key: value, ...}` to set specific parameters. For example, the `Visual Studio` style is similar to: `{ BasedOnStyle: LLVM, UseTab: Never, IndentWidth: 4, TabWidth: 4, BreakBeforeBraces: Allman, AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: false, ColumnLimit: 0, AccessModifierOffset: -4, NamespaceIndentation: All, FixNamespaceComments: false }`.", "comment": [ "Words 'key' and 'value' in '{key: value, ...}' should be translated, but all other markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.clang_format_sortIncludes.markdownDescription": { "message": "If set, overrides the include sorting behavior determined by the `SortIncludes` parameter.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, + "c_cpp.configuration.vcFormat.wrap.preserveBlocks.oneLiners.markdownDescription": { + "message": "A complete code block that is entered on one line is kept on one line, regardless of the values of any of the `C_Cpp.vcFormat.newLine.*` settings.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.vcFormat.wrap.preserveBlocks.allOneLineScopes.markdownDescription": { + "message": "Any code where the opening and closing brace is entered on one line is kept on one line, regardless of the values of any of the `C_Cpp.vcFormat.newLine.*` settings.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.vcFormat.wrap.preserveBlocks.never.markdownDescription": { + "message": "Code blocks are always formatted based on the values of the `C_Cpp.vcFormat.newLine.*` settings.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.clang_format_path.markdownDescription": { + "message": "The full path of the `clang-format` executable. If not specified, and `clang-format` is available in the environment path, that is used. If not found in the environment path, the `clang-format` bundled with the extension will be used.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.clang_format_style.markdownDescription": { + "message": "Coding style, currently supports: `Visual Studio`, `LLVM`, `Google`, `Chromium`, `Mozilla`, `WebKit`, `Microsoft`, `GNU`. Use `file` to load the style from a `.clang-format` file in the current or parent directory, or use `file:/.clang-format` to reference a specific path. Use `{key: value, ...}` to set specific parameters. For example, the `Visual Studio` style is similar to: `{ BasedOnStyle: LLVM, UseTab: Never, IndentWidth: 4, TabWidth: 4, BreakBeforeBraces: Allman, AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: false, ColumnLimit: 0, AccessModifierOffset: -4, NamespaceIndentation: All, FixNamespaceComments: false }`.", + "comment": [ + "Words 'key' and 'value' in '{key: value, ...}' and the word 'path' in 'file:/.clang-format' should be translated, but all other markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.clang_format_fallbackStyle.markdownDescription": { + "message": "Name of the predefined style used as a fallback in case `clang-format` is invoked with style `file` but the `.clang-format` file is not found. Possible values are `Visual Studio`, `LLVM`, `Google`, `Chromium`, `Mozilla`, `WebKit`, `Microsoft`, `GNU`, `none`, or use `{key: value, ...}` to set specific parameters. For example, the `Visual Studio` style is similar to: `{ BasedOnStyle: LLVM, UseTab: Never, IndentWidth: 4, TabWidth: 4, BreakBeforeBraces: Allman, AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: false, ColumnLimit: 0, AccessModifierOffset: -4, NamespaceIndentation: All, FixNamespaceComments: false }`.", + "comment": [ + "Words 'key' and 'value' in '{key: value, ...}' should be translated, but all other markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.clang_format_sortIncludes.markdownDescription": { + "message": "If set, overrides the include sorting behavior determined by the `SortIncludes` parameter.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, "c_cpp.configuration.intelliSenseEngine.description": "Controls the IntelliSense provider.", "c_cpp.configuration.intelliSenseEngine.default.description": "Provides context-aware results via a separate IntelliSense process.", "c_cpp.configuration.intelliSenseEngine.tagParser.description": "Provides \"fuzzy\" results that are not context-aware.", "c_cpp.configuration.intelliSenseEngine.disabled.description": "Turns off C/C++ language service features.", - "c_cpp.configuration.intelliSenseEngineFallback.markdownDescription": { "message": "Controls whether the IntelliSense engine will automatically switch to the Tag Parser for translation units containing `#include` errors.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.autocomplete.markdownDescription": { "message": "Controls the auto-completion provider. If `disabled` and you want word-based completion, you will also need to set `\"[cpp]\": {\"editor.wordBasedSuggestions\": true}` (and similarly for `c` and `cuda-cpp` languages).", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, + "c_cpp.configuration.intelliSenseEngineFallback.markdownDescription": { + "message": "Controls whether the IntelliSense engine will automatically switch to the Tag Parser for translation units containing `#include` errors.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.autocomplete.markdownDescription": { + "message": "Controls the auto-completion provider. If `disabled` and you want word-based completion, you will also need to set `\"[cpp]\": {\"editor.wordBasedSuggestions\": true}` (and similarly for `c` and `cuda-cpp` languages).", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, "c_cpp.configuration.autocomplete.default.description": "Uses the active IntelliSense engine.", "c_cpp.configuration.autocomplete.disabled.description": "Uses the word-based completion provided by Visual Studio Code.", "c_cpp.configuration.errorSquiggles.description": "Controls whether suspected compile errors detected by the IntelliSense engine will be reported back to the editor. It also controls whether code analysis warnings are reported if includes can't be found. This setting is ignored by the Tag Parser engine.", "c_cpp.configuration.dimInactiveRegions.description": "Controls whether inactive preprocessor blocks are colored differently than active code. This setting has no effect if IntelliSense is disabled or if using the Default High Contrast theme.", - "c_cpp.configuration.inactiveRegionOpacity.markdownDescription": { "message": "Controls the opacity of inactive preprocessor blocks. Scales between `0.1` and `1.0`. This setting only applies when inactive region dimming is enabled.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, + "c_cpp.configuration.inactiveRegionOpacity.markdownDescription": { + "message": "Controls the opacity of inactive preprocessor blocks. Scales between `0.1` and `1.0`. This setting only applies when inactive region dimming is enabled.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, "c_cpp.configuration.inactiveRegionForegroundColor.description": "Controls the font coloring of inactive preprocessor blocks. Input is in the form a hexadecimal color code or a valid Theme Color. If not set, this defaults to the syntax coloring scheme of the editor. This setting only applies when inactive region dimming is enabled.", "c_cpp.configuration.inactiveRegionBackgroundColor.description": "Controls the background coloring of inactive preprocessor blocks. Input is in the form a hexadecimal color code or a valid Theme Color. If not set, this defaults to transparent. This setting only applies when inactive region dimming is enabled.", - "c_cpp.configuration.inlayHints.autoDeclarationTypes.enabled.markdownDescription": { "message": "Display inlay hints for deduced type when `auto` is used in a declaration:\n```cpp \n\n auto index /* : int */ = 0;\n```", "comment": [ "Markdown text between `` and the text inside ``` block is code and should not be localized." ] }, - "c_cpp.configuration.inlayHints.autoDeclarationTypes.showOnLeft.markdownDescription": { "message": "Display inlay hints for deduced type when `auto` is used in a declaration on the left of the identifier:\n```cpp \n\n auto /* int */ index = 0;\n```", "comment": [ "Markdown text between `` and the text inside ``` block is code and should not be localized." ] }, - "c_cpp.configuration.inlayHints.parameterNames.enabled.markdownDescription": { "message": "Display inlay hints for parameter names:\n```cpp \n\n int a = getArea(/* width: */ x, /* height: */ y);\n```", "comment": [ "Markdown text between `` and the text inside ``` block is code and should not be localized." ] }, - "c_cpp.configuration.inlayHints.parameterNames.hideLeadingUnderscores.markdownDescription": { "message": "Hide leading `_` in parameter name hints.", "comment": [ "Markdown text between `` is code and should not be localized." ] }, - "c_cpp.configuration.inlayHints.parameterNames.suppressWhenArgumentContainsName.markdownDescription": { "message": "Suppress parameter name hints when the argument text or inline comment contains the parameter name:\n```cpp \n\n int a = getArea(width, /* height: */ y);\n```", "comment": [ "Markdown text between `` and the text inside ``` block is code and should not be localized." ] }, - "c_cpp.configuration.inlayHints.referenceOperator.enabled.markdownDescription": { "message": "Display the inlay hint reference operator `&` for parameters passed by non-const reference:\n```cpp \n\n swap(/* &first: */ str1, /* &last: */ str2);\n```", "comment": [ "Markdown text between `` and the text inside ``` block is code and should not be localized." ] }, - "c_cpp.configuration.inlayHints.referenceOperator.showSpace.markdownDescription": { "message": "Controls whether a space is shown after `&` for parameters passed by non-const reference:\n```cpp \n\n swap(/* & first: */ str1, /* & last: */ str2);\n```", "comment": [ "Markdown text between `` and the text inside ``` block is code and should not be localized." ] }, - "c_cpp.configuration.loggingLevel.markdownDescription": { "message": "The verbosity of logging in the Output Panel. The order of levels from least verbose to most verbose is: `None` < `Error` < `Warning` < `Information` < `Debug`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.autoAddFileAssociations.markdownDescription": { "message": "Controls whether files are automatically added to `#files.associations#` when they are the target of a navigation operation from a C/C++ file.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.workspaceParsingPriority.markdownDescription": { "message": "Controls whether parsing of the non-active workspace files uses sleeps to avoid using 100% CPU. The values `highest`/`high`/`medium`/`low` correspond to approximately 100/75/50/25% CPU usage.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.workspaceSymbols.description": { "message": "The symbols to include in the query results when 'Go to Symbol in Workspace' is invoked.", "comment": [ "Text in '' is a command and should be translated in the same way that VS Code itself translates it." ] }, - "c_cpp.configuration.exclusionPolicy.markdownDescription": { "message": "Instructs the extension when to use the `#files.exclude#` (and `#C_Cpp.files.exclude#`) setting when determining which files should be added to the code navigation database while traversing through the paths in the `browse.path` array. If your `#files.exclude#` setting only contains folders, then `checkFolders` is the best choice and will increase the speed at which the extension can initialize the code navigation database.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, + "c_cpp.configuration.inlayHints.autoDeclarationTypes.enabled.markdownDescription": { + "message": "Display inlay hints for deduced type when `auto` is used in a declaration:\n```cpp \n\n auto index /* : int */ = 0;\n```", + "comment": [ + "Markdown text between `` and the text inside ``` block is code and should not be localized." + ] + }, + "c_cpp.configuration.inlayHints.autoDeclarationTypes.showOnLeft.markdownDescription": { + "message": "Display inlay hints for deduced type when `auto` is used in a declaration on the left of the identifier:\n```cpp \n\n auto /* int */ index = 0;\n```", + "comment": [ + "Markdown text between `` and the text inside ``` block is code and should not be localized." + ] + }, + "c_cpp.configuration.inlayHints.parameterNames.enabled.markdownDescription": { + "message": "Display inlay hints for parameter names:\n```cpp \n\n int a = getArea(/* width: */ x, /* height: */ y);\n```", + "comment": [ + "Markdown text between `` and the text inside ``` block is code and should not be localized." + ] + }, + "c_cpp.configuration.inlayHints.parameterNames.hideLeadingUnderscores.markdownDescription": { + "message": "Hide leading `_` in parameter name hints.", + "comment": [ + "Markdown text between `` is code and should not be localized." + ] + }, + "c_cpp.configuration.inlayHints.parameterNames.suppressWhenArgumentContainsName.markdownDescription": { + "message": "Suppress parameter name hints when the argument text or inline comment contains the parameter name:\n```cpp \n\n int a = getArea(width, /* height: */ y);\n```", + "comment": [ + "Markdown text between `` and the text inside ``` block is code and should not be localized." + ] + }, + "c_cpp.configuration.inlayHints.referenceOperator.enabled.markdownDescription": { + "message": "Display the inlay hint reference operator `&` for parameters passed by non-const reference:\n```cpp \n\n swap(/* &first: */ str1, /* &last: */ str2);\n```", + "comment": [ + "Markdown text between `` and the text inside ``` block is code and should not be localized." + ] + }, + "c_cpp.configuration.inlayHints.referenceOperator.showSpace.markdownDescription": { + "message": "Controls whether a space is shown after `&` for parameters passed by non-const reference:\n```cpp \n\n swap(/* & first: */ str1, /* & last: */ str2);\n```", + "comment": [ + "Markdown text between `` and the text inside ``` block is code and should not be localized." + ] + }, + "c_cpp.configuration.loggingLevel.markdownDescription": { + "message": "The verbosity of logging in the Output Panel. The order of levels from least verbose to most verbose is: `None` < `Error` < `Warning` < `Information` < `Debug`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.autoAddFileAssociations.markdownDescription": { + "message": "Controls whether files are automatically added to `#files.associations#` when they are the target of a navigation operation from a C/C++ file.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.workspaceParsingPriority.markdownDescription": { + "message": "Controls whether parsing of the non-active workspace files uses sleeps to avoid using 100% CPU. The values `highest`/`high`/`medium`/`low` correspond to approximately 100/75/50/25% CPU usage.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.workspaceSymbols.description": { + "message": "The symbols to include in the query results when 'Go to Symbol in Workspace' is invoked.", + "comment": [ + "Text in '' is a command and should be translated in the same way that VS Code itself translates it." + ] + }, + "c_cpp.configuration.exclusionPolicy.markdownDescription": { + "message": "Instructs the extension when to use the `#files.exclude#` (and `#C_Cpp.files.exclude#`) setting when determining which files should be added to the code navigation database while traversing through the paths in the `browse.path` array. If your `#files.exclude#` setting only contains folders, then `checkFolders` is the best choice and will increase the speed at which the extension can initialize the code navigation database.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, "c_cpp.configuration.exclusionPolicy.checkFolders.description": "The exclusion filters will only be evaluated once per folder (individual files are not checked).", "c_cpp.configuration.exclusionPolicy.checkFilesAndFolders.description": "The exclusion filters will be evaluated against every file and folder encountered.", - "c_cpp.configuration.preferredPathSeparator.markdownDescription": { "message": "The character used as a path separator for `#include` auto-completion results.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.simplifyStructuredComments.markdownDescription": { "message": "If `true`, tooltips of hover and auto-complete will only display certain labels of structured comments. Otherwise, all comments are displayed.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.doxygen.generateOnType.description": "Controls whether to automatically insert the Doxygen comment after typing the chosen comment style.", + "c_cpp.configuration.preferredPathSeparator.markdownDescription": { + "message": "The character used as a path separator for `#include` auto-completion results.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.simplifyStructuredComments.markdownDescription": { + "message": "If `true`, tooltips of hover and auto-complete will only display certain labels of structured comments. Otherwise, all comments are displayed.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.doxygen.generateOnType.description": "Controls whether to automatically insert the Doxygen comment after typing the chosen comment style.", "c_cpp.configuration.doxygen.generatedStyle.description": "The string of characters used as the starting line of the Doxygen comment.", "c_cpp.configuration.doxygen.sectionTags.description": "Select the Doxygen section tags that you would like to appear on hover in the tooltip area when the 'Simplify Structured Comments' setting is enabled. ", - "c_cpp.configuration.commentContinuationPatterns.items.anyof.string.markdownDescription": { "message": "The pattern that begins a multiline or single line comment block. The continuation pattern defaults to ` * ` for multiline comment blocks or this string for single line comment blocks.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, + "c_cpp.configuration.commentContinuationPatterns.items.anyof.string.markdownDescription": { + "message": "The pattern that begins a multiline or single line comment block. The continuation pattern defaults to ` * ` for multiline comment blocks or this string for single line comment blocks.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, "c_cpp.configuration.commentContinuationPatterns.items.anyof.object.begin.description": "The pattern that begins a multiline or single line comment block.", "c_cpp.configuration.commentContinuationPatterns.items.anyof.object.continue.description": "The text that will be inserted on the next line when Enter is pressed inside a multiline or single line comment block.", "c_cpp.configuration.commentContinuationPatterns.description": "Defines the editor behavior for when the Enter key is pressed inside a multiline or single line comment block.", "c_cpp.configuration.configurationWarnings.description": "Determines whether pop up notifications will be shown when a configuration provider extension is unable to provide a configuration for a source file.", - "c_cpp.configuration.intelliSenseCachePath.markdownDescription": { "message": "Defines the folder path for cached precompiled headers used by IntelliSense. The default cache path is `%LocalAppData%/Microsoft/vscode-cpptools` on Windows, `$XDG_CACHE_HOME/vscode-cpptools/` on Linux (or `$HOME/.cache/vscode-cpptools/` if `XDG_CACHE_HOME` is not defined), and `$HOME/Library/Caches/vscode-cpptools/` on macOS. The default path will be used if no path is specified or if a specified path is invalid.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.intelliSenseCacheSize.markdownDescription": { "message": "Maximum size of the per-workspace hard drive space in megabytes (MB) for cached precompiled headers; the actual usage may fluctuate around this value. The default size is `5120` MB. Precompiled header caching is disabled when the size is `0`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.intelliSenseMemoryLimit.markdownDescription": { "message": "Memory usage limit in megabytes (MB) of an IntelliSense process. The default is `4096` and the maximum is `16384`. The extension will shutdown and restart an IntelliSense process when it exceeds the limit.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, + "c_cpp.configuration.intelliSenseCachePath.markdownDescription": { + "message": "Defines the folder path for cached precompiled headers used by IntelliSense. The default cache path is `%LocalAppData%/Microsoft/vscode-cpptools` on Windows, `$XDG_CACHE_HOME/vscode-cpptools/` on Linux (or `$HOME/.cache/vscode-cpptools/` if `XDG_CACHE_HOME` is not defined), and `$HOME/Library/Caches/vscode-cpptools/` on macOS. The default path will be used if no path is specified or if a specified path is invalid.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.intelliSenseCacheSize.markdownDescription": { + "message": "Maximum size of the per-workspace hard drive space in megabytes (MB) for cached precompiled headers; the actual usage may fluctuate around this value. The default size is `5120` MB. Precompiled header caching is disabled when the size is `0`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.intelliSenseMemoryLimit.markdownDescription": { + "message": "Memory usage limit in megabytes (MB) of an IntelliSense process. The default is `4096` and the maximum is `16384`. The extension will shutdown and restart an IntelliSense process when it exceeds the limit.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, "c_cpp.configuration.intelliSenseUpdateDelay.description": "Controls the delay in milliseconds before IntelliSense starts updating after a modification.", - "c_cpp.configuration.default.includePath.markdownDescription": { "message": "The value to use in a configuration if `includePath` is not specified in `c_cpp_properties.json`. If `includePath` is specified, add `${default}` to the array to insert the values from this setting. Usually, this should not include system includes; instead, set `#C_Cpp.default.compilerPath#`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.default.defines.markdownDescription": { "message": "The value to use in a configuration if `defines` is not specified, or the values to insert if `${default}` is present in `defines`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.default.macFrameworkPath.markdownDescription": { "message": "The value to use in a configuration if `macFrameworkPath` is not specified, or the values to insert if `${default}` is present in `macFrameworkPath`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.default.windowsSdkVersion.markdownDescription": { "message": "Version of the Windows SDK include path to use on Windows, e.g. `10.0.17134.0`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.default.compileCommands.markdownDescription": { "message": "The value to use in a configuration if `compileCommands` is either not specified, or set to `${default}`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.default.forcedInclude.markdownDescription": { "message": "The value to use in a configuration if `forcedInclude` is not specified, or the values to insert if `${default}` is present in `forcedInclude`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.default.intelliSenseMode.markdownDescription": { "message": "The value to use in a configuration if `intelliSenseMode` is either not specified or set to `${default}`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.default.compilerPath.markdownDescription": { "message": "The value to use in a configuration if `compilerPath` is either not specified or set to `${default}`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.default.compilerArgs.markdownDescription": { "message": "The value to use in configuration if `compilerArgs` is either not specified or set to `${default}`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.default.cStandard.markdownDescription": { "message": "The value to use in a configuration if `cStandard` is either not specified or set to `${default}`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.default.cppStandard.markdownDescription": { "message": "The value to use in a configuration if `cppStandard` is either not specified or set to `${default}`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.default.configurationProvider.markdownDescription": { "message": "The value to use in a configuration if `configurationProvider` is either not specified or set to `${default}`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.default.mergeConfigurations.markdownDescription": { "message": "Set to `true` to merge include paths, defines, and forced includes with those from a configuration provider.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.default.browse.path.markdownDescription": { "message": "The value to use in a configuration if `browse.path` is not specified, or the values to insert if `${default}` is present in `browse.path`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.default.browse.databaseFilename.markdownDescription": { "message": "The value to use in a configuration if `browse.databaseFilename` is either not specified or set to `${default}`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.default.browse.limitSymbolsToIncludedHeaders.markdownDescription": { "message": "The value to use in a configuration if `browse.limitSymbolsToIncludedHeaders` is either not specified or set to `${default}`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.default.systemIncludePath.markdownDescription": { "message": "The value to use for the system include path. If set, it overrides the system include path acquired via `compilerPath` and `compileCommands` settings.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.default.enableConfigurationSquiggles.markdownDescription": { "message": "Controls whether the extension will report errors detected in `c_cpp_properties.json`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.default.customConfigurationVariables.markdownDescription": { "message": "The value to use in a configuration if `customConfigurationVariables` is not set, or the values to insert if `${default}` is present as a key in `customConfigurationVariables`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.updateChannel.markdownDescription": { "message": "Set to `Insiders` to automatically download and install the latest Insiders builds of the extension, which include upcoming features and bug fixes.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, + "c_cpp.configuration.default.includePath.markdownDescription": { + "message": "The value to use in a configuration if `includePath` is not specified in `c_cpp_properties.json`. If `includePath` is specified, add `${default}` to the array to insert the values from this setting. Usually, this should not include system includes; instead, set `#C_Cpp.default.compilerPath#`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.default.defines.markdownDescription": { + "message": "The value to use in a configuration if `defines` is not specified, or the values to insert if `${default}` is present in `defines`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.default.macFrameworkPath.markdownDescription": { + "message": "The value to use in a configuration if `macFrameworkPath` is not specified, or the values to insert if `${default}` is present in `macFrameworkPath`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.default.windowsSdkVersion.markdownDescription": { + "message": "Version of the Windows SDK include path to use on Windows, e.g. `10.0.17134.0`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.default.compileCommands.markdownDescription": { + "message": "The value to use in a configuration if `compileCommands` is either not specified, or set to `${default}`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.default.forcedInclude.markdownDescription": { + "message": "The value to use in a configuration if `forcedInclude` is not specified, or the values to insert if `${default}` is present in `forcedInclude`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.default.intelliSenseMode.markdownDescription": { + "message": "The value to use in a configuration if `intelliSenseMode` is either not specified or set to `${default}`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.default.compilerPath.markdownDescription": { + "message": "The value to use in a configuration if `compilerPath` is either not specified or set to `${default}`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.default.compilerArgs.markdownDescription": { + "message": "The value to use in configuration if `compilerArgs` is either not specified or set to `${default}`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.default.cStandard.markdownDescription": { + "message": "The value to use in a configuration if `cStandard` is either not specified or set to `${default}`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.default.cppStandard.markdownDescription": { + "message": "The value to use in a configuration if `cppStandard` is either not specified or set to `${default}`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.default.configurationProvider.markdownDescription": { + "message": "The value to use in a configuration if `configurationProvider` is either not specified or set to `${default}`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.default.mergeConfigurations.markdownDescription": { + "message": "Set to `true` to merge include paths, defines, and forced includes with those from a configuration provider.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.default.browse.path.markdownDescription": { + "message": "The value to use in a configuration if `browse.path` is not specified, or the values to insert if `${default}` is present in `browse.path`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.default.browse.databaseFilename.markdownDescription": { + "message": "The value to use in a configuration if `browse.databaseFilename` is either not specified or set to `${default}`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.default.browse.limitSymbolsToIncludedHeaders.markdownDescription": { + "message": "The value to use in a configuration if `browse.limitSymbolsToIncludedHeaders` is either not specified or set to `${default}`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.default.systemIncludePath.markdownDescription": { + "message": "The value to use for the system include path. If set, it overrides the system include path acquired via `compilerPath` and `compileCommands` settings.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.default.enableConfigurationSquiggles.markdownDescription": { + "message": "Controls whether the extension will report errors detected in `c_cpp_properties.json`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.default.customConfigurationVariables.markdownDescription": { + "message": "The value to use in a configuration if `customConfigurationVariables` is not set, or the values to insert if `${default}` is present as a key in `customConfigurationVariables`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.updateChannel.markdownDescription": { + "message": "Set to `Insiders` to automatically download and install the latest Insiders builds of the extension, which include upcoming features and bug fixes.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, "c_cpp.configuration.updateChannel.deprecationMessage": "This setting is deprecated. Pre-release extensions are now available via the Marketplace.", - "c_cpp.configuration.default.dotConfig.markdownDescription": { "message": "The value to use in a configuration if `dotConfig` is not specified, or the value to insert if `${default}` is present in `dotConfig`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, + "c_cpp.configuration.default.dotConfig.markdownDescription": { + "message": "The value to use in a configuration if `dotConfig` is not specified, or the value to insert if `${default}` is present in `dotConfig`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, "c_cpp.configuration.experimentalFeatures.description": "Controls whether \"experimental\" features are usable.", - "c_cpp.configuration.suggestSnippets.markdownDescription": { "message": "If `true`, snippets are provided by the language server.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.caseSensitiveFileSupport.markdownDescription": { "message": "If set to `default`, the file system of the workspace is assumed to be case insensitive on Windows and case sensitive on macOS or Linux. If set to `enabled`, the file system of the workspace is assumed to be case sensitive on Windows.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.enhancedColorization.markdownDescription": { "message": "If enabled, code is colorized based on IntelliSense. This setting only applies if `#C_Cpp.intelliSenseEngine#` is set to `default`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, + "c_cpp.configuration.suggestSnippets.markdownDescription": { + "message": "If `true`, snippets are provided by the language server.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.caseSensitiveFileSupport.markdownDescription": { + "message": "If set to `default`, the file system of the workspace is assumed to be case insensitive on Windows and case sensitive on macOS or Linux. If set to `enabled`, the file system of the workspace is assumed to be case sensitive on Windows.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.enhancedColorization.markdownDescription": { + "message": "If enabled, code is colorized based on IntelliSense. This setting only applies if `#C_Cpp.intelliSenseEngine#` is set to `default`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, "c_cpp.configuration.codeFolding.description": "If enabled, code folding ranges are provided by the language server.", "c_cpp.configuration.markdownInComments.description": "Select whether markdown will be available in the hover tooltip. By default, only a subset of markdown will be applied to comments in the hover tooltip.", "c_cpp.configuration.markdownInComments.subsetEnabled.description": "Enable all markdown features in the hover tooltip except those that include the '_' and '*' characters.", "c_cpp.configuration.markdownInComments.enabled.description": "Enable all markdown features in the hover tooltip.", "c_cpp.configuration.markdownInComments.disabled.description": "Disable all markdown features in the hover tooltip.", "c_cpp.configuration.hover.description": "If disabled, hover details are no longer provided by the language server.", - "c_cpp.configuration.vcpkg.enabled.markdownDescription": { "message": "Enable integration services for the [vcpkg dependency manager](https://aka.ms/vcpkg/).", "comment": [ "Markdown text between () should not be altered: https://en.wikipedia.org/wiki/Markdown" ] }, - "c_cpp.configuration.addNodeAddonIncludePaths.markdownDescription": { "message": "Add include paths from `nan` and `node-addon-api` when they are dependencies.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.renameRequiresIdentifier.markdownDescription": { "message": "If `true`, 'Rename Symbol' will require a valid C/C++ identifier.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.autocompleteAddParentheses.markdownDescription": { "message": "If `true`, autocomplete will automatically add `(` after function calls, in which case `)` may also be added, depending on the value of the `#editor.autoClosingBrackets#` setting.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.filesExclude.markdownDescription": { "message": "Configure glob patterns for excluding folders (and files if `#C_Cpp.exclusionPolicy#` is changed). These are specific to the C/C++ extension and are in addition to `#files.exclude#`, but unlike `#files.exclude#` they also apply to paths outside the current workspace folder and are not removed from the Explorer view. Read more about glob patterns [here](https://code.visualstudio.com/docs/editor/codebasics#_advanced-search-options).", "comment": [ "Markdown text between `` and [) should not be translated and the capitalization, spacing, and punctuation (including the ``) should not be altered: https://en.wikipedia.org/wiki/Markdown" ] }, - "c_cpp.configuration.filesExcludeBoolean.markdownDescription": { "message": "The glob pattern to match file paths against. Set to `true` or `false` to enable or disable the pattern.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.filesExcludeWhen.markdownDescription": { "message": "Additional check on the siblings of a matching file. Use `$(basename)` as variable for the matching file name.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, - "c_cpp.configuration.debugger.useBacktickCommandSubstitution.markdownDescription": { "message": "If `true`, debugger shell command substitution will use obsolete backtick ``(`)``.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, + "c_cpp.configuration.vcpkg.enabled.markdownDescription": { + "message": "Enable integration services for the [vcpkg dependency manager](https://aka.ms/vcpkg/).", + "comment": [ + "Markdown text between () should not be altered: https://en.wikipedia.org/wiki/Markdown" + ] + }, + "c_cpp.configuration.addNodeAddonIncludePaths.markdownDescription": { + "message": "Add include paths from `nan` and `node-addon-api` when they are dependencies.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.renameRequiresIdentifier.markdownDescription": { + "message": "If `true`, 'Rename Symbol' will require a valid C/C++ identifier.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.autocompleteAddParentheses.markdownDescription": { + "message": "If `true`, autocomplete will automatically add `(` after function calls, in which case `)` may also be added, depending on the value of the `#editor.autoClosingBrackets#` setting.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.filesExclude.markdownDescription": { + "message": "Configure glob patterns for excluding folders (and files if `#C_Cpp.exclusionPolicy#` is changed). These are specific to the C/C++ extension and are in addition to `#files.exclude#`, but unlike `#files.exclude#` they also apply to paths outside the current workspace folder and are not removed from the Explorer view. Read more about glob patterns [here](https://code.visualstudio.com/docs/editor/codebasics#_advanced-search-options).", + "comment": [ + "Markdown text between `` and [) should not be translated and the capitalization, spacing, and punctuation (including the ``) should not be altered: https://en.wikipedia.org/wiki/Markdown" + ] + }, + "c_cpp.configuration.filesExcludeBoolean.markdownDescription": { + "message": "The glob pattern to match file paths against. Set to `true` or `false` to enable or disable the pattern.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.filesExcludeWhen.markdownDescription": { + "message": "Additional check on the siblings of a matching file. Use `$(basename)` as variable for the matching file name.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "c_cpp.configuration.debugger.useBacktickCommandSubstitution.markdownDescription": { + "message": "If `true`, debugger shell command substitution will use obsolete backtick ``(`)``.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, "c_cpp.configuration.legacyCompilerArgsBehavior.markdownDescription": "Enable pre-v1.10.0 behavior for how shell escaping is handled in compiler arg settings. Shell escaping is no longer expected or supported by default in arg arrays starting in v1.10.0.", "c_cpp.configuration.legacyCompilerArgsBehavior.deprecationMessage": "This setting is temporary to support transitioning to corrected behavior in v1.10.0.", "c_cpp.configuration.sshTargetsView.description": "Controls whether the SSH Targets view is visible. By default, enable the view when an SSH command is invoked.", "c_cpp.contributes.views.cppReferencesView.title": "C/C++: Other references results", - "c_cpp.contributes.views.sshTargetsView.title": { "message": "Cpptools: SSH targets", "comment": [ "Do not localize `Cpptools`." ] }, - "c_cpp.contributes.viewsWelcome.contents": { "message": "To learn more about launch.json, see [Configuring C/C++ debugging](https://code.visualstudio.com/docs/cpp/launch-json-reference).", "comment": [ "Markdown text between () should not be altered: https://en.wikipedia.org/wiki/Markdown" ] }, + "c_cpp.contributes.views.sshTargetsView.title": { + "message": "Cpptools: SSH targets", + "comment": [ + "Do not localize `Cpptools`." + ] + }, + "c_cpp.contributes.viewsWelcome.contents": { + "message": "To learn more about launch.json, see [Configuring C/C++ debugging](https://code.visualstudio.com/docs/cpp/launch-json-reference).", + "comment": [ + "Markdown text between () should not be altered: https://en.wikipedia.org/wiki/Markdown" + ] + }, "c_cpp.configuration.debugShortcut.description": "Show the \"Run and Debug\" play button and \"Add Debug Configuration\" gear in the editor title bar for C++ files.", "c_cpp.debuggers.pipeTransport.description": "When present, this tells the debugger to connect to a remote computer using another executable as a pipe that will relay standard input/output between VS Code and the MI-enabled debugger backend executable (such as gdb).", "c_cpp.debuggers.pipeTransport.default.pipeProgram": "enter the fully qualified path for the pipe program name, for example '/usr/bin/ssh'.", @@ -396,7 +957,12 @@ "c_cpp.semanticTokenTypes.templateType.description": "Style for C++ template types.", "c_cpp.semanticTokenTypes.operatorOverload.description": "Style for C++ overloaded operators.", "c_cpp.semanticTokenTypes.memberOperatorOverload.description": "Style for C++ overloaded operator member functions.", - "c_cpp.semanticTokenTypes.newOperator.description": { "message": "Style for C++ `new` or `delete` operators.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, + "c_cpp.semanticTokenTypes.newOperator.description": { + "message": "Style for C++ `new` or `delete` operators.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, "c_cpp.semanticTokenTypes.customLiteral.description": "Style for C++ user-defined literals.", "c_cpp.semanticTokenTypes.numberLiteral.description": "Style for C++ user-defined literal numbers.", "c_cpp.semanticTokenTypes.stringLiteral.description": "Style for C++ user-defined literal strings.", @@ -411,7 +977,8 @@ "c_cpp.walkthrough.description": "Dive into VS Code's rich C++ development experience.", "c_cpp.walkthrough.set.up.title": "Set up your C++ Environment", "c_cpp.walkthrough.activating.description": "Activating the C++ extension to determine whether your C++ Environment has been set up.\nActivating Extension...", - "c_cpp.walkthrough.no.compilers.description": "We could not find a C++ compiler on your machine, which is required to use the C++ extension. Follow the instructions on the right to install one, then click “Find my new Compiler” below.\n[Find my new Compiler](command:C_Cpp.RescanCompilers?%7B%22sender%22%3A%22walkthrough%22%7D)", + "c_cpp.walkthrough.no.compilers.windows.description": "We could not find a C++ compiler on your machine, which is required to use the C++ extension. Follow the instructions on the right to install one, then click “Find my new Compiler” below.\n[Find my new Compiler](command:C_Cpp.RescanCompilers?%7B%22sender%22%3A%22walkthrough%22%7D)", + "c_cpp.walkthrough.no.compilers.description": "We could not find a C++ compiler on your machine, which is required to use the C++ extension. Either select “Install a C++ Compiler” to have a compiler installed for you or follow the instructions on the right to install one, then click “Find my new Compiler” below.\n[Install a C++ Compiler](command:C_Cpp.InstallCompiler?%7B%22sender%22%3A%22walkthrough%22%7D)\n[Find my new Compiler](command:C_Cpp.RescanCompilers?%7B%22sender%22%3A%22walkthrough%22%7D)", "c_cpp.walkthrough.compilers.found.description": "The C++ extension works with a C++ compiler. Select one from those already on your machine by clicking the button below.\n[Select my Default Compiler](command:C_Cpp.SelectDefaultCompiler?%7B%22sender%22%3A%22walkthrough%22%7D)", "c_cpp.walkthrough.compilers.found.altText": "Image showing the select a default compiler quickpick and the list of compilers found on the users machine, one of which is selected.", "c_cpp.walkthrough.create.cpp.file.title": "Create a C++ file", @@ -428,5 +995,7 @@ "c_cpp.walkthrough.customize.debugging.mac.description": "You can customize your debug configuration (e.g. to pass arguments to your program at run time) by selecting \"Add Debug Configuration\" to the right of the play button. The custom debug configuration is saved in your project's launch.json file. \n[Learn More](https://code.visualstudio.com/docs/cpp/config-linux#_debug-helloworldcpp)", "c_cpp.walkthrough.customize.debugging.linux.description": "You can customize your debug configuration (e.g. to pass arguments to your program at run time) by selecting \"Add Debug Configuration\" to the right of the play button. The custom debug configuration is saved in your project's launch.json file. \n[Learn More](https://code.visualstudio.com/docs/cpp/config-msvc#_debug-helloworldcpp)", "c_cpp.walkthrough.customize.debugging.windows.description": "You can customize your debug configuration (e.g. to pass arguments to your program at run time) by selecting \"Add Debug Configuration\" to the right of the play button. The custom debug configuration is saved in your project's launch.json file. \n[Learn More](https://code.visualstudio.com/docs/cpp/config-clang-mac#_debug-helloworldcpp)", - "c_cpp.walkthrough.customize.debugging.altText": "Image that shows Add Debug Configuration in the drop-down" + "c_cpp.walkthrough.customize.debugging.altText": "Image that shows Add Debug Configuration in the drop-down", + "c_cpp.codeActions.refactor.inline.macro.title": "Inline macro", + "c_cpp.codeActions.refactor.inline.macro.description": "Replace the macro invocation with the expanded code." } diff --git a/Extension/src/Debugger/ParsedEnvironmentFile.ts b/Extension/src/Debugger/ParsedEnvironmentFile.ts index ac94306487..9018a540b0 100644 --- a/Extension/src/Debugger/ParsedEnvironmentFile.ts +++ b/Extension/src/Debugger/ParsedEnvironmentFile.ts @@ -72,7 +72,7 @@ export class ParsedEnvironmentFile { // show error message if single lines cannot get parsed let warning: string | undefined; if (parseErrors.length !== 0) { - warning = localize("ignoring.lines.in.envfile", "Ignoring non-parseable lines in {0} {1}: ", "envFile", envFile); + warning = localize("ignoring.lines.in.envfile", "Ignoring non-parsable lines in {0} {1}: ", "envFile", envFile); parseErrors.forEach(function (value, idx, array): void { warning += "\"" + value + "\"" + ((idx !== array.length - 1) ? ", " : "."); }); diff --git a/Extension/src/Debugger/debugAdapterDescriptorFactory.ts b/Extension/src/Debugger/debugAdapterDescriptorFactory.ts index cf41e2d21c..d43d71bc3c 100644 --- a/Extension/src/Debugger/debugAdapterDescriptorFactory.ts +++ b/Extension/src/Debugger/debugAdapterDescriptorFactory.ts @@ -40,7 +40,7 @@ export class CppvsdbgDebugAdapterDescriptorFactory extends AbstractDebugAdapterD async createDebugAdapterDescriptor(_session: vscode.DebugSession, _executable?: vscode.DebugAdapterExecutable): Promise { if (os.platform() !== 'win32') { - void vscode.window.showErrorMessage(localize("debugger.not.available", "Debugger type '{0}' is not avaliable for non-Windows machines.", "cppvsdbg")); + void vscode.window.showErrorMessage(localize("debugger.not.available", "Debugger type '{0}' is not available for non-Windows machines.", "cppvsdbg")); return null; } else { return new vscode.DebugAdapterExecutable( diff --git a/Extension/src/Debugger/extension.ts b/Extension/src/Debugger/extension.ts index 3fc651b59d..81770ce34b 100644 --- a/Extension/src/Debugger/extension.ts +++ b/Extension/src/Debugger/extension.ts @@ -215,7 +215,7 @@ async function addSshTargetImpl(): Promise { async function removeSshTargetImpl(node: TargetLeafNode): Promise { const labelYes: string = localize('yes', 'Yes'); const labelNo: string = localize('no', 'No'); - const confirm: string | undefined = await vscode.window.showInformationMessage(localize('ssh.target.delete.confirmation', 'Are you sure you want to permanamtly delete "{0}"?', node.name), labelYes, labelNo); + const confirm: string | undefined = await vscode.window.showInformationMessage(localize('ssh.target.delete.confirmation', 'Are you sure you want to permanently delete "{0}"?', node.name), labelYes, labelNo); if (!confirm || confirm === labelNo) { return false; } diff --git a/Extension/src/LanguageServer/Providers/codeActionProvider.ts b/Extension/src/LanguageServer/Providers/codeActionProvider.ts index f3beee3dc6..66b966ebd8 100644 --- a/Extension/src/LanguageServer/Providers/codeActionProvider.ts +++ b/Extension/src/LanguageServer/Providers/codeActionProvider.ts @@ -4,6 +4,7 @@ * ------------------------------------------------------------------------------------------ */ import * as vscode from 'vscode'; import { Position, Range, RequestType, TextEdit } from 'vscode-languageclient'; +import * as nls from 'vscode-nls'; import { DefaultClient } from '../client'; import { CodeActionCodeInfo, CodeActionDiagnosticInfo, codeAnalysisAllFixes, codeAnalysisCodeToFixes, codeAnalysisFileToCodeActions @@ -12,6 +13,9 @@ import { LocalizeStringParams, getLocalizedString } from '../localization'; import { CppSettings } from '../settings'; import { makeVscodeRange } from '../utils'; +nls.config({ messageFormat: nls.MessageFormat.bundle, bundleFormat: nls.BundleFormat.standalone })(); +const localize: nls.LocalizeFunc = nls.loadMessageBundle(); + interface GetCodeActionsRequestParams { uri: string; range: Range; @@ -44,6 +48,8 @@ export class CodeActionProvider implements vscode.CodeActionProvider { this.client = client; } + private static inlineMacroKind: vscode.CodeActionKind = vscode.CodeActionKind.RefactorInline.append("macro"); + public async provideCodeActions(document: vscode.TextDocument, range: vscode.Range | vscode.Selection, context: vscode.CodeActionContext, token: vscode.CancellationToken): Promise<(vscode.Command | vscode.CodeAction)[]> { await this.client.ready; @@ -66,7 +72,7 @@ export class CodeActionProvider implements vscode.CodeActionProvider { uri: document.uri.toString() }; - const response: GetCodeActionsResult = await this.client.languageClient.sendRequest( + let response: GetCodeActionsResult = await this.client.languageClient.sendRequest( GetCodeActionsRequest, params, token); const resultCodeActions: vscode.CodeAction[] = []; @@ -86,15 +92,17 @@ export class CodeActionProvider implements vscode.CodeActionProvider { !!this.client.configuration.CurrentConfiguration?.configurationProviderInCppPropertiesJson; // Convert to vscode.CodeAction array - response.commands.forEach((command) => { + let hasInlineMacro: boolean = false; + const processCommand = (command: CodeActionCommand) => { let title: string = getLocalizedString(command.localizeStringParams); let wsEdit: vscode.WorkspaceEdit | undefined; let codeActionKind: vscode.CodeActionKind = vscode.CodeActionKind.QuickFix; if (command.edit) { // Inline macro feature. - codeActionKind = vscode.CodeActionKind.RefactorInline; + codeActionKind = CodeActionProvider.inlineMacroKind; wsEdit = new vscode.WorkspaceEdit(); wsEdit.replace(document.uri, makeVscodeRange(command.edit.range), command.edit.newText); + hasInlineMacro = true; } else if (command.command === "C_Cpp.RemoveAllCodeAnalysisProblems" && command.uri !== undefined) { // The "RemoveAll" message is sent for all code analysis squiggles. const vsCodeRange: vscode.Range = makeVscodeRange(r); @@ -218,7 +226,47 @@ export class CodeActionProvider implements vscode.CodeActionProvider { kind: codeActionKind }; resultCodeActions.push(vscodeCodeAction); - }); + }; + + response.commands.forEach(processCommand); + + // If the refactor.inline.macro code action is specifically invoked by the user, + // then force a hover to ensure that the "Expands to" info is available. + if (!hasInlineMacro && context.only?.value === "refactor.inline.macro") { + const processInlineMacro = async (): Promise => { + const editor: vscode.TextEditor | undefined = vscode.window.activeTextEditor; + if (!editor) { + return false; + } + const result: vscode.Hover[] = (await vscode.commands.executeCommand('vscode.executeHoverProvider', document.uri, range.start)); + if (result.length === 0) { + return false; + } + const hoverResult: vscode.MarkdownString = result[0].contents[0]; + if (!hoverResult.value.includes(localize("expands.to", "Expands to:"))) { + return false; + } + response = await this.client.languageClient.sendRequest(GetCodeActionsRequest, params, token); + if (token.isCancellationRequested || response.commands === undefined) { + return false; + } + for (const command of response.commands) { + if (command.edit) { + processCommand(command); + return true; + } + } + return false; + }; + if (!await processInlineMacro()) { + const disabledCodeAction: vscode.CodeAction = { + title: localize({ key: "inline.macro", comment: ["'Inline' is a command and not an adjective, i.e. like 'Expand macro'."] }, "Inline macro"), + kind: CodeActionProvider.inlineMacroKind, + disabled: { reason: localize("inline.macro.not.available", "Inline macro is not available at this location.") } + }; + resultCodeActions.push(disabledCodeAction); + } + } return resultCodeActions; } } diff --git a/Extension/src/LanguageServer/client.ts b/Extension/src/LanguageServer/client.ts index 0ad18deaf4..42b8d692cb 100644 --- a/Extension/src/LanguageServer/client.ts +++ b/Extension/src/LanguageServer/client.ts @@ -37,8 +37,10 @@ import { ManualSignal } from '../Utility/Async/manualSignal'; import { logAndReturn, returns } from '../Utility/Async/returns'; import { is } from '../Utility/System/guards'; import * as util from '../common'; +import { isWindows } from '../constants'; import { DebugProtocolParams, Logger, ShowWarningParams, getDiagnosticsChannel, getOutputChannelLogger, logDebugProtocol, logLocalized, showWarning } from '../logger'; import { localizedStringCount, lookupString } from '../nativeStrings'; +import { SessionState } from '../sessionState'; import * as telemetry from '../telemetry'; import { TestHook, getTestHook } from '../testHook'; import { @@ -97,7 +99,6 @@ interface ConfigStateReceived { let displayedSelectCompiler: boolean = false; let secondPromptCounter: number = 0; -let scanForCompilersDone: boolean = false; let workspaceHash: string = ""; let workspaceDisposables: vscode.Disposable[] = []; @@ -1035,7 +1036,14 @@ export class DefaultClient implements Client { const compilersIndex: number = paths.length; const compilerCount: number = compilersIndex === compileCommandsIndex ? 0 : compilersIndex - compileCommandsIndex - 1; paths.push(localize("selectAnotherCompiler.string", "Select another compiler on my machine...")); - paths.push(localize("installCompiler.string", "Help me install a compiler")); + let installShown = true; + if (isWindows && util.getSenderType(sender) !== 'walkthrough') { + paths.push(localize("installCompiler.string", "Help me install a compiler")); + } else if (!isWindows) { + paths.push(localize("installCompiler.string.nix", "Install a compiler")); + } else { + installShown = false; + } paths.push(localize("noConfig.string", "Do not configure with a compiler (not recommended)")); const index: number = await this.showSelectIntelliSenseConfiguration(paths, compilersOnly); let action: string = ""; @@ -1059,44 +1067,13 @@ export class DefaultClient implements Client { } return ui.ShowConfigureIntelliSenseButton(false, this, ConfigurationType.CompilerPath, "disablePrompt"); } - if (index === paths.length - 2) { - action = "help"; - // Because we need to conditionally enable/disable steps to alter their contents, - // we need to determine which step is actually visible. If the steps change, this - // logic will need to change to reflect them. - let step: string = "ms-vscode.cpptools#"; - if (!scanForCompilersDone) { - step = step + "awaiting.activation."; - } else if (compilerDefaults?.knownCompilers === undefined || !compilerDefaults.knownCompilers.length) { - step = step + "no.compilers.found."; - } else { - step = step + "verify.compiler."; - } - switch (os.platform()) { - case 'win32': - step = step + "windows"; - break; - case 'darwin': - step = step + "mac"; - break; - default: // Linux - step = step + "linux"; - break; - } - void vscode.commands.executeCommand( - "workbench.action.openWalkthrough", - { category: 'ms-vscode.cpptools#cppWelcome', step }, - false) - // Run it twice for now because of VS Code bug #187958 - .then(() => vscode.commands.executeCommand( - "workbench.action.openWalkthrough", - { category: 'ms-vscode.cpptools#cppWelcome', step }, - false) - ); + if (installShown && index === paths.length - 2) { + action = "install"; + void vscode.commands.executeCommand('C_Cpp.InstallCompiler', sender); return; } const showButtonSender: string = "quickPick"; - if (index === paths.length - 3) { + if (index === paths.length - 3 || (!installShown && index === paths.length - 2)) { const result: vscode.Uri[] | undefined = await vscode.window.showOpenDialog(); if (result === undefined || result.length === 0) { action = "browse dismissed"; @@ -1109,7 +1086,7 @@ export class DefaultClient implements Client { action = "compiler browsed"; settings.defaultCompilerPath = result[0].fsPath; await this.configuration.updateCompilerPathIfSet(settings.defaultCompilerPath); - void vscode.commands.executeCommand('setContext', 'cpptools.trustedCompilerFound', true); + void SessionState.trustedCompilerFound.set(true); } else { configurationSelected = true; if (index < configProvidersIndex && configProviders) { @@ -1128,7 +1105,7 @@ export class DefaultClient implements Client { action = "select compiler"; settings.defaultCompilerPath = util.isCl(paths[index]) ? "cl.exe" : paths[index]; await this.configuration.updateCompilerPathIfSet(settings.defaultCompilerPath); - void vscode.commands.executeCommand('setContext', 'cpptools.trustedCompilerFound', true); + void SessionState.trustedCompilerFound.set(true); } } @@ -1784,10 +1761,10 @@ export class DefaultClient implements Client { if (document.uri.scheme === "file") { const uri: string = document.uri.toString(); openFileVersions.set(uri, document.version); - void vscode.commands.executeCommand('setContext', 'cpptools.buildAndDebug.isSourceFile', util.isCppOrCFile(document.uri)); - void vscode.commands.executeCommand('setContext', 'cpptools.buildAndDebug.isFolderOpen', util.isFolderOpen(document.uri)); + void SessionState.buildAndDebugIsSourceFile.set(util.isCppOrCFile(document.uri)); + void SessionState.buildAndDebugIsFolderOpen.set(util.isFolderOpen(document.uri)); } else { - void vscode.commands.executeCommand('setContext', 'cpptools.buildAndDebug.isSourceFile', false); + void SessionState.buildAndDebugIsSourceFile.set(false); } } @@ -2121,7 +2098,7 @@ export class DefaultClient implements Client { const settings: CppSettings = new CppSettings(this.RootUri); if (settings.configurationWarnings && !this.isExternalHeader(docUri) && !vscode.debug.activeDebugSession) { const dismiss: string = localize("dismiss.button", "Dismiss"); - const disable: string = localize("diable.warnings.button", "Disable Warnings"); + const disable: string = localize("disable.warnings.button", "Disable Warnings"); const configName: string | undefined = this.configuration.CurrentConfiguration?.name; if (!configName) { return; @@ -2841,18 +2818,17 @@ export class DefaultClient implements Client { newTrustedCompilerPath: newCompilerPath ?? "" }; const results: configs.CompilerDefaults = await this.languageClient.sendRequest(QueryCompilerDefaultsRequest, params); - scanForCompilersDone = true; - void vscode.commands.executeCommand('setContext', 'cpptools.scanForCompilersDone', true); - void vscode.commands.executeCommand('setContext', 'cpptools.scanForCompilersEmpty', results.knownCompilers === undefined || !results.knownCompilers.length); - void vscode.commands.executeCommand('setContext', 'cpptools.trustedCompilerFound', results.trustedCompilerFound); + void SessionState.scanForCompilersDone.set(true); + void SessionState.scanForCompilersEmpty.set(results.knownCompilers === undefined || !results.knownCompilers.length); + void SessionState.trustedCompilerFound.set(results.trustedCompilerFound); return results; } private updateActiveDocumentTextOptions(): void { const editor: vscode.TextEditor | undefined = vscode.window.activeTextEditor; if (editor && util.isCpp(editor.document)) { - void vscode.commands.executeCommand('setContext', 'cpptools.buildAndDebug.isSourceFile', util.isCppOrCFile(editor.document.uri)); - void vscode.commands.executeCommand('setContext', 'cpptools.buildAndDebug.isFolderOpen', util.isFolderOpen(editor.document.uri)); + void SessionState.buildAndDebugIsSourceFile.set(util.isCppOrCFile(editor.document.uri)); + void SessionState.buildAndDebugIsFolderOpen.set(util.isFolderOpen(editor.document.uri)); // If using vcFormat, check for a ".editorconfig" file, and apply those text options to the active document. const settings: CppSettings = new CppSettings(this.RootUri); if (settings.useVcFormat(editor.document)) { @@ -2874,7 +2850,7 @@ export class DefaultClient implements Client { } } } else { - void vscode.commands.executeCommand('setContext', 'cpptools.buildAndDebug.isSourceFile', false).then(undefined, logAndReturn.undefined); + void SessionState.buildAndDebugIsSourceFile.set(false); } } diff --git a/Extension/src/LanguageServer/codeAnalysis.ts b/Extension/src/LanguageServer/codeAnalysis.ts index e59446f292..cb397eb851 100644 --- a/Extension/src/LanguageServer/codeAnalysis.ts +++ b/Extension/src/LanguageServer/codeAnalysis.ts @@ -118,7 +118,7 @@ export const codeAnalysisCodeToFixes: Map = new Map< export const codeAnalysisAllFixes: CodeActionAllInfo = { version: 0, fixAllCodeAction: { - title: localize("fix_all_code_analysis_problems", "Fix all code analysis problems"), + title: localize("fix.all.code.analysis.problems", "Fix all code analysis problems"), command: { title: 'FixAllCodeAnalysisProblems', command: 'C_Cpp.FixAllCodeAnalysisProblems', @@ -127,7 +127,7 @@ export const codeAnalysisAllFixes: CodeActionAllInfo = { kind: vscode.CodeActionKind.QuickFix }, removeAllCodeAction: { - title: localize("clear_all_code_analysis_problems", "Clear all code analysis problems"), + title: localize("clear.all.code.analysis.problems", "Clear all code analysis problems"), command: { title: "RemoveAllCodeAnalysisProblems", command: "C_Cpp.RemoveAllCodeAnalysisProblems" }, kind: vscode.CodeActionKind.QuickFix } @@ -175,7 +175,7 @@ function rebuildCodeAnalysisCodeAndAllFixes(): void { } ++numFixTypes; codeToFixes[1].fixAllTypeCodeAction = { - title: localize("fix_all_type_problems", "Fix all {0} problems", codeToFixes[0]), + title: localize("fix.all.type.problems", "Fix all {0} problems", codeToFixes[0]), command: { title: 'FixAllTypeCodeAnalysisProblems', command: 'C_Cpp.FixAllTypeCodeAnalysisProblems', @@ -187,7 +187,7 @@ function rebuildCodeAnalysisCodeAndAllFixes(): void { if (new CppSettings().clangTidyCodeActionShowDisable) { codeToFixes[1].disableAllTypeCodeAction = { - title: localize("disable_all_type_problems", "Disable all {0} problems", codeToFixes[0]), + title: localize("disable.all.type.problems", "Disable all {0} problems", codeToFixes[0]), command: { title: 'DisableAllTypeCodeAnalysisProblems', command: 'C_Cpp.DisableAllTypeCodeAnalysisProblems', @@ -201,7 +201,7 @@ function rebuildCodeAnalysisCodeAndAllFixes(): void { if (new CppSettings().clangTidyCodeActionShowClear !== "None") { codeToFixes[1].removeAllTypeCodeAction = { - title: localize("clear_all_type_problems", "Clear all {0} problems", codeToFixes[0]), + title: localize("clear.all.type.problems", "Clear all {0} problems", codeToFixes[0]), command: { title: 'RemoveAllTypeCodeAnalysisProblems', command: 'C_Cpp.RemoveCodeAnalysisProblems', @@ -265,7 +265,7 @@ export function publishCodeAnalysisDiagnostics(params: PublishCodeAnalysisDiagno range: makeVscodeRange(identifier.range), code: identifier.code, removeCodeAction: { - title: localize("clear_this_problem", "Clear this {0} problem", d.code), + title: localize("clear.this.problem", "Clear this {0} problem", d.code), command: { title: 'RemoveCodeAnalysisProblems', command: 'C_Cpp.RemoveCodeAnalysisProblems', @@ -281,7 +281,7 @@ export function publishCodeAnalysisDiagnostics(params: PublishCodeAnalysisDiagno workspaceEdit.workspaceEdit.set(vscode.Uri.parse(uriStr, true), makeVscodeTextEdits(edits)); } const fixThisCodeAction: vscode.CodeAction = { - title: localize("fix_this_problem", "Fix this {0} problem", d.code), + title: localize("fix.this.problem", "Fix this {0} problem", d.code), command: { title: 'FixThisCodeAnalysisProblem', command: 'C_Cpp.FixThisCodeAnalysisProblem', @@ -315,7 +315,7 @@ export function publishCodeAnalysisDiagnostics(params: PublishCodeAnalysisDiagno const relatedIdentifiersAndUri: CodeAnalysisDiagnosticIdentifiersAndUri = { uri: info.location.uri, identifiers: [ relatedIdentifier ] }; const relatedCodeAction: vscode.CodeAction = { - title: localize("fix_this_problem", "Fix this {0} problem", d.code), + title: localize("fix.this.problem", "Fix this {0} problem", d.code), command: { title: 'FixThisCodeAnalysisProblem', command: 'C_Cpp.FixThisCodeAnalysisProblem', @@ -384,7 +384,7 @@ export function publishCodeAnalysisDiagnostics(params: PublishCodeAnalysisDiagno if (new CppSettings().clangTidyCodeActionShowDocumentation) { if (codeActionCodeInfo.docCodeAction === undefined) { codeActionCodeInfo.docCodeAction = { - title: localize("show_documentation_for", "Show documentation for {0}", primaryCode), + title: localize("show.documentation.for", "Show documentation for {0}", primaryCode), command: { title: 'ShowDocumentation', command: 'C_Cpp.ShowCodeAnalysisDocumentation', diff --git a/Extension/src/LanguageServer/cppBuildTaskProvider.ts b/Extension/src/LanguageServer/cppBuildTaskProvider.ts index 0192f6465b..2bd8b43c7a 100644 --- a/Extension/src/LanguageServer/cppBuildTaskProvider.ts +++ b/Extension/src/LanguageServer/cppBuildTaskProvider.ts @@ -179,7 +179,7 @@ export class CppBuildTaskProvider implements TaskProvider { if (!definition) { const isWindows: boolean = os.platform() === 'win32'; const taskLabel: string = ((appendSourceToName && !compilerPathBase.startsWith(ext.configPrefix)) ? - ext.configPrefix : "") + compilerPathBase + " " + localize("build_active_file", "build active file"); + ext.configPrefix : "") + compilerPathBase + " " + localize("build.active.file", "build active file"); const programName: string = util.defaultExePath(); let args: string[] = isCl ? ['/Zi', '/EHsc', '/nologo', `/Fe${programName}`, '${file}'] : @@ -213,7 +213,7 @@ export class CppBuildTaskProvider implements TaskProvider { ), isCl ? '$msCompile' : '$gcc'); task.group = TaskGroup.Build; - task.detail = detail ? detail : localize("compiler_details", "compiler:") + " " + resolvedcompilerPath; + task.detail = detail ? detail : localize("compiler.details", "compiler:") + " " + resolvedcompilerPath; return task; }; @@ -294,7 +294,7 @@ export class CppBuildTaskProvider implements TaskProvider { ...selectedTask.definition, problemMatcher: selectedTask.problemMatchers, group: setAsDefault ? { kind: "build", "isDefault": true } : "build", - detail: localize("task_generated_by_debugger", "Task generated by Debugger.") + detail: localize("task.generated.by.debugger", "Task generated by Debugger.") }; rawTasksJson.tasks.push(newTask); } @@ -372,7 +372,7 @@ class CustomBuildTaskTerminal implements Pseudoterminal { } telemetry.logLanguageServerEvent("cppBuildTaskStarted"); // At this point we can start using the terminal. - this.writeEmitter.fire(localize("starting_build", "Starting build...") + this.endOfLine); + this.writeEmitter.fire(localize("starting.build", "Starting build...") + this.endOfLine); await this.doBuild(); } diff --git a/Extension/src/LanguageServer/extension.ts b/Extension/src/LanguageServer/extension.ts index a0fe492a35..2351b97497 100644 --- a/Extension/src/LanguageServer/extension.ts +++ b/Extension/src/LanguageServer/extension.ts @@ -12,6 +12,7 @@ import * as vscode from 'vscode'; import * as nls from 'vscode-nls'; import { logAndReturn } from '../Utility/Async/returns'; import * as util from '../common'; +import { PlatformInformation } from '../platform'; import * as telemetry from '../telemetry'; import { Client, DefaultClient, DoxygenCodeActionCommandArguments, openFileVersions } from './client'; import { ClientCollection } from './clientCollection'; @@ -23,7 +24,7 @@ import { PersistentState } from './persistentState'; import { NodeType, TreeNode } from './referencesModel'; import { CppSettings } from './settings'; import { LanguageStatusUI, getUI } from './ui'; -import { makeCpptoolsRange, rangeEquals, shouldChangeFromCToCpp } from './utils'; +import { makeCpptoolsRange, rangeEquals, shouldChangeFromCToCpp, showInstallCompilerWalkthrough } from './utils'; nls.config({ messageFormat: nls.MessageFormat.bundle, bundleFormat: nls.BundleFormat.standalone })(); const localize: nls.LocalizeFunc = nls.loadMessageBundle(); @@ -41,7 +42,7 @@ let intervalTimer: NodeJS.Timer; let codeActionProvider: vscode.Disposable; export const intelliSenseDisabledError: string = "Do not activate the extension when IntelliSense is disabled."; -type VcpkgDatabase = { [key: string]: string[] }; // Stored as
-> [] +type VcpkgDatabase = Record; // Stored as
-> [] let vcpkgDbPromise: Promise; async function initVcpkgDatabase(): Promise { const database: VcpkgDatabase = {}; @@ -97,7 +98,7 @@ async function lookupIncludeInVcpkg(document: vscode.TextDocument, line: number) if (!matches || !matches.length || !matches.groups) { return []; } - const missingHeader: string = matches.groups['includeFile'].replace(/\//g, '\\'); + const missingHeader: string = matches.groups.includeFile.replace(/\//g, '\\'); let portsWithHeader: string[] | undefined; const vcpkgDb: VcpkgDatabase = await vcpkgDbPromise; @@ -116,20 +117,20 @@ function isMissingIncludeDiagnostic(diagnostic: vscode.Diagnostic): boolean { } function sendActivationTelemetry(): void { - const activateEvent: { [key: string]: string } = {}; + const activateEvent: Record = {}; // Don't log telemetry for machineId if it's a special value used by the dev host: someValue.machineid if (vscode.env.machineId !== "someValue.machineId") { const machineIdPersistentState: PersistentState = new PersistentState("CPP.machineId", undefined); if (!machineIdPersistentState.Value) { - activateEvent["newMachineId"] = vscode.env.machineId; + activateEvent.newMachineId = vscode.env.machineId; } else if (machineIdPersistentState.Value !== vscode.env.machineId) { - activateEvent["newMachineId"] = vscode.env.machineId; - activateEvent["oldMachineId"] = machineIdPersistentState.Value; + activateEvent.newMachineId = vscode.env.machineId; + activateEvent.oldMachineId = machineIdPersistentState.Value; } machineIdPersistentState.Value = vscode.env.machineId; } if (vscode.env.uiKind === vscode.UIKind.Web) { - activateEvent["WebUI"] = "1"; + activateEvent.WebUI = "1"; } telemetry.logLanguageServerEvent("Activate", activateEvent); } @@ -257,14 +258,14 @@ export function updateLanguageConfigurations(): void { async function onDidChangeSettings(event: vscode.ConfigurationChangeEvent): Promise { const client: Client = clients.getDefaultClient(); if (client instanceof DefaultClient) { - const defaultClient: DefaultClient = client; - const changedDefaultClientSettings: { [key: string]: string } = await defaultClient.onDidChangeSettings(event); + const defaultClient: DefaultClient = client as DefaultClient; + const changedDefaultClientSettings: Record = await defaultClient.onDidChangeSettings(event); clients.forEach(client => { if (client !== defaultClient) { void client.onDidChangeSettings(event).catch(logAndReturn.undefined); } }); - const newUpdateChannel: string = changedDefaultClientSettings['updateChannel']; + const newUpdateChannel: string = changedDefaultClientSettings.updateChannel; if (newUpdateChannel || event.affectsConfiguration("extensions.autoUpdate")) { UpdateInsidersAccess(); } @@ -388,6 +389,7 @@ export function registerCommands(enabled: boolean): void { commandDisposables.push(vscode.commands.registerCommand('C_Cpp.ResetDatabase', enabled ? onResetDatabase : onDisabledCommand)); commandDisposables.push(vscode.commands.registerCommand('C_Cpp.SelectDefaultCompiler', enabled ? selectDefaultCompiler : onDisabledCommand)); commandDisposables.push(vscode.commands.registerCommand('C_Cpp.SelectIntelliSenseConfiguration', enabled ? selectIntelliSenseConfiguration : onDisabledCommand)); + commandDisposables.push(vscode.commands.registerCommand('C_Cpp.InstallCompiler', enabled ? installCompiler : onDisabledCommand)); commandDisposables.push(vscode.commands.registerCommand('C_Cpp.ConfigurationSelect', enabled ? onSelectConfiguration : onDisabledCommand)); commandDisposables.push(vscode.commands.registerCommand('C_Cpp.ConfigurationProviderSelect', enabled ? onSelectConfigurationProvider : onDisabledCommand)); commandDisposables.push(vscode.commands.registerCommand('C_Cpp.ConfigurationEditJSON', enabled ? onEditConfigurationJSON : onDisabledCommand)); @@ -476,7 +478,7 @@ async function onSwitchHeaderSource(): Promise { let targetFileNameReplaced: boolean = false; clients.forEach(client => { if (!targetFileNameReplaced && client.RootRealPath && client.RootPath !== client.RootRealPath - && targetFileName.indexOf(client.RootRealPath) === 0) { + && targetFileName.startsWith(client.RootRealPath)) { targetFileName = client.RootPath + targetFileName.substring(client.RootRealPath.length); targetFileNameReplaced = true; } @@ -540,6 +542,63 @@ async function selectIntelliSenseConfiguration(sender?: any): Promise { return clients.ActiveClient.promptSelectIntelliSenseConfiguration(true, sender); } +async function installCompiler(sender?: any): Promise { + const telemetryProperties = { sender: util.getSenderType(sender), platform: os.platform(), ranCommand: 'false' }; + const ok = localize('ok', 'OK'); + switch (os.platform()) { + case "win32": + showInstallCompilerWalkthrough(); + break; + case "darwin": { + const title = localize('install.compiler.mac.title', 'The clang compiler will now be installed'); + const detail = localize('install.compiler.mac.detail', 'You may be prompted to type your password in the VS Code terminal window to authorize the installation.'); + const response = await vscode.window.showInformationMessage(title, { modal: true, detail }, ok); + if (response === ok) { + const terminal = vscode.window.createTerminal('Install C++ Compiler'); + terminal.sendText('sudo xcode-select --install'); + terminal.show(); + telemetryProperties.ranCommand = 'true'; + } + break; + } + default: { + const info = await PlatformInformation.GetPlatformInformation(); + const installCommand = (() => { + switch (info.distribution?.name) { + case 'ubuntu': + case 'linuxmint': + case 'debian': { + return 'sudo sh -c \'apt update ; apt install -y build-essential\''; + } + case 'centos': + case 'fedora': + case 'rhel': { + return 'sudo sh -c \'yum install -y gcc-c++ gdb\''; + } + case 'opensuse': + case 'opensuse-leap': + case 'opensuse-tumbleweed': { + return 'sudo sh -c \'zypper refresh ; zypper install gcc-c++ gdb\''; + } + } + return undefined; + })(); + if (installCommand) { + const title = localize('install.compiler.linux.title', 'The gcc compiler will now be installed'); + const detail = localize('install.compiler.linux.detail', 'You may be prompted to type your password in the VS Code terminal window to authorize the installation.'); + const response = await vscode.window.showInformationMessage(title, { modal: true, detail }, ok); + if (response === ok) { + const terminal = vscode.window.createTerminal('Install C++ Compiler'); + terminal.sendText(installCommand); + terminal.show(true); + telemetryProperties.ranCommand = 'true'; + } + } + } + } + telemetry.logLanguageServerEvent('installCompiler', telemetryProperties); +} + async function onSelectConfiguration(): Promise { if (!isFolderOpen()) { void vscode.window.showInformationMessage(localize("configuration.select.first", 'Open a folder first to select a configuration.')); @@ -674,7 +733,7 @@ async function onDisableAllTypeCodeAnalysisProblems(code: string, identifiersAnd async function onCopyDeclarationOrDefinition(args?: any): Promise { const sender: any | undefined = util.isString(args?.sender) ? args.sender : args; - const properties: { [key: string]: string } = { + const properties: Record = { sender: util.getSenderType(sender) }; telemetry.logLanguageServerEvent('CopyDeclDefn', properties); @@ -683,7 +742,7 @@ async function onCopyDeclarationOrDefinition(args?: any): Promise { async function onCreateDeclarationOrDefinition(args?: any): Promise { const sender: any | undefined = util.isString(args?.sender) ? args.sender : args; - const properties: { [key: string]: string } = { + const properties: Record = { sender: util.getSenderType(sender) }; telemetry.logLanguageServerEvent('CreateDeclDefn', properties); @@ -877,7 +936,7 @@ function reportMacCrashes(): void { const home: string = os.homedir(); const crashFolder: string = path.resolve(home, "Library/Logs/DiagnosticReports"); fs.stat(crashFolder, (err) => { - const crashObject: { [key: string]: string } = {}; + const crashObject: Record = {}; if (err?.code) { // If the directory isn't there, we have a problem... crashObject["fs.stat: err.code"] = err.code; @@ -921,12 +980,12 @@ let previousMacCrashData: string; let previousMacCrashCount: number = 0; function logMacCrashTelemetry(data: string): void { - const crashObject: { [key: string]: string } = {}; - const crashCountObject: { [key: string]: number } = {}; - crashObject["CrashingThreadCallStack"] = data; + const crashObject: Record = {}; + const crashCountObject: Record = {}; + crashObject.CrashingThreadCallStack = data; previousMacCrashCount = data === previousMacCrashData ? previousMacCrashCount + 1 : 0; previousMacCrashData = data; - crashCountObject["CrashCount"] = previousMacCrashCount; + crashCountObject.CrashCount = previousMacCrashCount; telemetry.logLanguageServerEvent("MacCrash", crashObject, crashCountObject); } diff --git a/Extension/src/LanguageServer/utils.ts b/Extension/src/LanguageServer/utils.ts index b71e0c3bc0..f8f8407dd2 100644 --- a/Extension/src/LanguageServer/utils.ts +++ b/Extension/src/LanguageServer/utils.ts @@ -3,8 +3,10 @@ * See 'LICENSE' in the project root for license information. * ------------------------------------------------------------------------------------------ */ 'use strict'; +import * as os from 'os'; import * as vscode from 'vscode'; import { Range } from 'vscode-languageclient'; +import { SessionState } from '../sessionState'; import { Location, TextEdit } from './commonTypes'; import { CppSettings } from './settings'; @@ -51,4 +53,49 @@ export function handleChangedFromCppToC(document: vscode.TextDocument): void { } } +export function showInstallCompilerWalkthrough(): void { + // Because we need to conditionally enable/disable steps to alter their contents, + // we need to determine which step is actually visible. If the steps change, this + // logic will need to change to reflect them. + enum Step { + Activation = 'awaiting.activation', + NoCompilers = 'no.compilers.found', + Verify = 'verify.compiler' + } + + const step = (() => { + if (!SessionState.scanForCompilersDone.get()) { + return Step.Activation; + } else if (!SessionState.trustedCompilerFound.get()) { + return Step.NoCompilers; + } else { + return Step.Verify; + } + })(); + + const platform = (() => { + switch (os.platform()) { + case 'win32': return 'windows'; + case 'darwin': return 'mac'; + default: return 'linux'; + } + })(); + + const version = (platform === 'windows') ? SessionState.windowsVersion.get() : ''; + + const index = `ms-vscode.cpptools#${step}.${platform}${version}`; + + void vscode.commands.executeCommand( + 'workbench.action.openWalkthrough', + { category: 'ms-vscode.cpptools#cppWelcome', step: index }, + false) + // Run it twice for now because of VS Code bug #187958 + .then(() => vscode.commands.executeCommand( + "workbench.action.openWalkthrough", + { category: 'ms-vscode.cpptools#cppWelcome', step: index }, + false) + ); + return; +} + const docsChangedFromCppToC: Set = new Set(); diff --git a/Extension/src/SSH/commands.ts b/Extension/src/SSH/commands.ts index 1d11aae167..159138f31a 100644 --- a/Extension/src/SSH/commands.ts +++ b/Extension/src/SSH/commands.ts @@ -82,13 +82,13 @@ export function ssh(host: ISshHostInfo, command: string, sshPath?: string, jumpH function localForwardToArgs(localForward: ISshLocalForwardInfo): string[] { // Do not combine error checking and arg conversion for clarity. if (localForward.localSocket && (localForward.bindAddress || localForward.port)) { - throw Error(localize('local.forward.local.conflict', '"localSocket" cannot be specifed at the same time with "bindAddress" or "port" in localForwards')); + throw Error(localize('local.forward.local.conflict', '"localSocket" cannot be specified at the same time with "bindAddress" or "port" in localForwards')); } if (!localForward.localSocket && !localForward.port) { throw Error(localize('local.forward.local.missing', '"port" or "localSocket" required in localForwards')); } if (localForward.remoteSocket && (localForward.host || localForward.hostPort)) { - throw Error(localize('local.forward.remote.conflict', '"remoteSocket" cannot be specifed at the same time with "host" or "hostPort" in localForwards')); + throw Error(localize('local.forward.remote.conflict', '"remoteSocket" cannot be specified at the same time with "host" or "hostPort" in localForwards')); } if (!localForward.remoteSocket && (!localForward.host || !localForward.hostPort)) { throw Error(localize('local.forward.remote.missing', '"host" and "hostPort", or "remoteSocket" required in localForwards')); diff --git a/Extension/src/SSH/sshCommandRunner.ts b/Extension/src/SSH/sshCommandRunner.ts index 07eb353b72..b2df7dfdcd 100644 --- a/Extension/src/SSH/sshCommandRunner.ts +++ b/Extension/src/SSH/sshCommandRunner.ts @@ -51,7 +51,7 @@ export function showPasswordInputBox( prompt?: string, cancelToken?: vscode.CancellationToken ): Promise { - const msg: string = user ? localize('ssh.enter.password.for.user', 'Enter password for user "{0}"', user) : localize('ssh_message_enterPassword', 'Enter password'); + const msg: string = user ? localize('ssh.enter.password.for.user', 'Enter password for user "{0}"', user) : localize('ssh.message.enter.password', 'Enter password'); return showInputBox(msg, prompt, cancelToken); } diff --git a/Extension/src/SSH/sshCommandToConfig.ts b/Extension/src/SSH/sshCommandToConfig.ts index 0a610dcf4e..80b9a05624 100644 --- a/Extension/src/SSH/sshCommandToConfig.ts +++ b/Extension/src/SSH/sshCommandToConfig.ts @@ -49,7 +49,7 @@ const flags: { return; } else { throw new CommandParseError( - `LocalFoward needs a listener and a destination separate by a colon. ${args} does not match.` + `LocalForward needs a listener and a destination separate by a colon. ${args} does not match.` ); } } @@ -63,7 +63,7 @@ const flags: { const delimiter: number = args.indexOf(':'); if (delimiter === -1) { throw new CommandParseError( - `LocalFoward needs a listener and a destination separate by a colon. ${args} does not match.` + `LocalForward needs a listener and a destination separate by a colon. ${args} does not match.` ); } diff --git a/Extension/src/common.ts b/Extension/src/common.ts index e6fabeb63c..242669b349 100644 --- a/Extension/src/common.ts +++ b/Extension/src/common.ts @@ -227,12 +227,11 @@ let isExtensionNotReadyPromptDisplayed: boolean = false; export const extensionNotReadyString: string = localize("extension.not.ready", 'The C/C++ extension is still installing. See the output window for more information.'); export function displayExtensionNotReadyPrompt(): void { - if (!isExtensionNotReadyPromptDisplayed) { isExtensionNotReadyPromptDisplayed = true; showOutputChannel(); - getOutputChannelLogger().showInformationMessage(extensionNotReadyString).then( + void getOutputChannelLogger().showInformationMessage(extensionNotReadyString).then( () => { isExtensionNotReadyPromptDisplayed = false; }, () => { isExtensionNotReadyPromptDisplayed = false; } ); @@ -265,7 +264,7 @@ export function getIntelliSenseProgress(): number { export function setProgress(progress: number): void { if (extensionContext && getProgress() < progress) { void extensionContext.globalState.update(installProgressStr, progress); - const telemetryProperties: { [key: string]: string } = {}; + const telemetryProperties: Record = {}; let progressName: string | undefined; switch (progress) { case 0: progressName = "install started"; break; @@ -275,7 +274,7 @@ export function setProgress(progress: number): void { case progressParseRootSuccess: progressName = "parse root succeeded"; break; } if (progressName) { - telemetryProperties['progress'] = progressName; + telemetryProperties.progress = progressName; } Telemetry.logDebuggerEvent("progress", telemetryProperties); } @@ -284,13 +283,13 @@ export function setProgress(progress: number): void { export function setIntelliSenseProgress(progress: number): void { if (extensionContext && getIntelliSenseProgress() < progress) { void extensionContext.globalState.update(intelliSenseProgressStr, progress); - const telemetryProperties: { [key: string]: string } = {}; + const telemetryProperties: Record = {}; let progressName: string | undefined; switch (progress) { case progressIntelliSenseNoSquiggles: progressName = "IntelliSense no squiggles"; break; } if (progressName) { - telemetryProperties['progress'] = progressName; + telemetryProperties.progress = progressName; } Telemetry.logDebuggerEvent("progress", telemetryProperties); } @@ -338,7 +337,7 @@ export function isOptionalArrayOfString(input: any): input is string[] | undefin return input === undefined || isArrayOfString(input); } -export function resolveCachePath(input: string | undefined, additionalEnvironment: { [key: string]: string | string[] }): string { +export function resolveCachePath(input: string | undefined, additionalEnvironment: Record): string { let resolvedPath: string = ""; if (!input || input.trim() === "") { // If no path is set, return empty string to language service process, where it will set the default path as @@ -369,7 +368,7 @@ export function findExePathInArgs(args: string[]): string | undefined { // Pass in 'arrayResults' if a string[] result is possible and a delimited string result is undesirable. // The string[] result will be copied into 'arrayResults'. -export function resolveVariables(input: string | undefined, additionalEnvironment?: { [key: string]: string | string[] }, arrayResults?: string[]): string { +export function resolveVariables(input: string | undefined, additionalEnvironment?: Record, arrayResults?: string[]): string { if (!input) { return ""; } @@ -385,7 +384,7 @@ export function resolveVariables(input: string | undefined, additionalEnvironmen // Replace environment and configuration variables. const regexp: () => RegExp = () => /\$\{((env|config|workspaceFolder|file|fileDirname|fileBasenameNoExtension|execPath|pathSeparator)(\.|:))?(.*?)\}/g; let ret: string = input; - const cycleCache: Set = new Set(); + const cycleCache = new Set(); while (!cycleCache.has(ret)) { cycleCache.add(ret); ret = ret.replace(regexp(), (match: string, ignored1: string, varType: string, ignored2: string, name: string) => { @@ -444,7 +443,7 @@ export function resolveVariables(input: string | undefined, additionalEnvironmen return resolveHome(ret); } -export function resolveVariablesArray(variables: string[] | undefined, additionalEnvironment?: { [key: string]: string | string[] }): string[] { +export function resolveVariablesArray(variables: string[] | undefined, additionalEnvironment?: Record): string[] { let result: string[] = []; if (variables) { variables.forEach(variable => { @@ -463,7 +462,7 @@ export function resolveHome(filePath: string): string { export function asFolder(uri: vscode.Uri): string { let result: string = uri.toString(); - if (result.charAt(result.length - 1) !== '/') { + if (!result.endsWith('/')) { result += '/'; } return result; @@ -865,7 +864,7 @@ export function removePotentialPII(str: string): string { const words: string[] = str.split(" "); let result: string = ""; for (const word of words) { - if (word.indexOf(".") === -1 && word.indexOf("/") === -1 && word.indexOf("\\") === -1 && word.indexOf(":") === -1) { + if (!word.includes(".") && !word.includes("/") && !word.includes("\\") && !word.includes(":")) { result += word + " "; } else { result += "? "; @@ -922,7 +921,7 @@ export function createTempFileWithPostfix(postfix: string): Promise{ name: path, fd: fd, removeCallback: cleanupCallback }); + return resolve({ name: path, fd: fd, removeCallback: cleanupCallback } as tmp.FileResult); }); }); } @@ -1183,6 +1182,8 @@ export function getSenderType(sender?: any): string { return sender; } else if (isUri(sender)) { return 'contextMenu'; + } else if (sender?.sender) { + return sender.sender; // The walkthrough buttons send an object with a 'sender' property. } return 'commandPalette'; } @@ -1309,7 +1310,7 @@ export function getCacheStoragePath(): string { switch (os.platform()) { case 'win32': defaultCachePath = "Microsoft\\vscode-cpptools\\"; - pathEnvironmentVariable = process.env["LOCALAPPDATA"]; + pathEnvironmentVariable = process.env.LOCALAPPDATA; break; case 'darwin': defaultCachePath = "Library/Caches/vscode-cpptools/"; @@ -1317,7 +1318,7 @@ export function getCacheStoragePath(): string { break; default: // Linux defaultCachePath = "vscode-cpptools/"; - pathEnvironmentVariable = process.env["XDG_CACHE_HOME"]; + pathEnvironmentVariable = process.env.XDG_CACHE_HOME; if (!pathEnvironmentVariable) { pathEnvironmentVariable = os.homedir(); } @@ -1350,7 +1351,7 @@ export function getUniqueWorkspaceStorageName(workspaceFolder: vscode.WorkspaceF } export function isCodespaces(): boolean { - return !!process.env["CODESPACES"]; + return !!process.env.CODESPACES; } // Sequentially Resolve Promises. diff --git a/Extension/src/main.ts b/Extension/src/main.ts index aab4a873bf..1632020ee6 100644 --- a/Extension/src/main.ts +++ b/Extension/src/main.ts @@ -42,7 +42,7 @@ export async function activate(context: vscode.ExtensionContext): Promise { - console.assert(uri.path[0] === '/', "A preceeding slash is expected on schema uri path"); + console.assert(uri.path[0] === '/', "A preceding slash is expected on schema uri path"); const fileName: string = uri.path.substring(1); const locale: string = getLocaleId(); let localizedFilePath: string = util.getExtensionFilePath(path.join("dist/schema/", locale, fileName)); diff --git a/Extension/src/platform.ts b/Extension/src/platform.ts index 572fcdfbc4..5b5e3c1ab8 100644 --- a/Extension/src/platform.ts +++ b/Extension/src/platform.ts @@ -9,6 +9,7 @@ import * as plist from 'plist'; import * as nls from 'vscode-nls'; import { LinuxDistribution } from './linuxDistribution'; import * as logger from './logger'; +import { SessionState, SupportedWindowsVersions } from './sessionState'; nls.config({ messageFormat: nls.MessageFormat.bundle, bundleFormat: nls.BundleFormat.standalone })(); const localize: nls.LocalizeFunc = nls.loadMessageBundle(); @@ -32,6 +33,8 @@ export class PlatformInformation { let version: string | undefined; switch (platform) { case "win32": + version = PlatformInformation.GetWindowsVersion(); + void SessionState.windowsVersion.set(version as SupportedWindowsVersions); break; case "linux": distribution = await LinuxDistribution.GetDistroInformation(); @@ -84,4 +87,19 @@ export class PlatformInformation { return Promise.resolve(productDarwinVersion); } + + private static GetWindowsVersion(): SupportedWindowsVersions { + const version = os.release().split('.'); + if (version.length > 0) { + if (version[0] === '10') { + if (version.length > 2 && version[2].startsWith('1')) { + // 10.0.10240 - 10.0.190## + return '10'; + } + // 10.0.22000+ + return '11'; + } + } + return ''; + } } diff --git a/Extension/src/sessionState.ts b/Extension/src/sessionState.ts new file mode 100644 index 0000000000..d9a2a65b1c --- /dev/null +++ b/Extension/src/sessionState.ts @@ -0,0 +1,40 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All Rights Reserved. + * See 'LICENSE' in the project root for license information. + * ------------------------------------------------------------------------------------------ */ + +import * as vscode from 'vscode'; + +/** + * Stores a session variable and updates the vscode context. + */ +class SessionStateVariable { + constructor(private key: string, private value: T) { + void this.setContext(); + } + + public get(): T { + return this.value; + } + + public async set(value: T): Promise { + this.value = value; + return this.setContext(); + } + + private async setContext(): Promise { + await vscode.commands.executeCommand('setContext', this.key, this.value); + } +} + +// Used by the walkthrough to determine which markdown page to load. Any change to this type requires an update to the walkthrough. +export type SupportedWindowsVersions = '10' | '11' | ''; + +export abstract class SessionState { + public static trustedCompilerFound = new SessionStateVariable('cpptools.trustedCompilerFound', false); + public static scanForCompilersDone = new SessionStateVariable('cpptools.scanForCompilersDone', false); + public static scanForCompilersEmpty = new SessionStateVariable('cpptools.scanForCompilersEmpty', false); + public static buildAndDebugIsFolderOpen = new SessionStateVariable('cpptools.buildAndDebug.isFolderOpen', false); + public static buildAndDebugIsSourceFile = new SessionStateVariable('cpptools.buildAndDebug.isSourceFile', false); + public static windowsVersion = new SessionStateVariable('cpptools.windowsVersion', ''); +} diff --git a/Extension/test/scenarios/SingleRootProject/tests/ParsedEnvironmentFile.test.ts b/Extension/test/scenarios/SingleRootProject/tests/ParsedEnvironmentFile.test.ts index 8166289b55..a107971cea 100644 --- a/Extension/test/scenarios/SingleRootProject/tests/ParsedEnvironmentFile.test.ts +++ b/Extension/test/scenarios/SingleRootProject/tests/ParsedEnvironmentFile.test.ts @@ -96,7 +96,7 @@ MyName2=Value2 `; const result: ParsedEnvironmentFile = ParsedEnvironmentFile.CreateFromContent(content, "TestEnvFileName", []); - assert(result.Warning && result.Warning.startsWith("Ignoring non-parseable lines in envFile TestEnvFileName"), 'Checking if warning exists'); + assert(result.Warning && result.Warning.startsWith("Ignoring non-parsable lines in envFile TestEnvFileName"), 'Checking if warning exists'); assertEnvironmentEqual(result.Env, "MyName1", "Value1"); assertEnvironmentEqual(result.Env, "MyName2", "Value2"); }); diff --git a/Extension/translations_auto_pr.js b/Extension/translations_auto_pr.js index e4121a67ed..eee13392fc 100644 --- a/Extension/translations_auto_pr.js +++ b/Extension/translations_auto_pr.js @@ -24,7 +24,7 @@ if (!repoOwner || !repoName || !authUser || !authToken || !userFullName || !user console.error(`ERROR: Usage: ${path.parse(process.argv[0]).base} ${path.parse(process.argv[1]).base} repo_owner repo_name auth_token user_full_name user_email loc_root_path loc_sub_path`); console.error(` repo_owner - The owner of the repo on GitHub. i.e. microsoft`); console.error(` repo_name - The name of the repo on GitHub. i.e. vscode-cpptools`); - console.error(` auth_user - User account wiith permission to post a pull request against the GitHub repo.`); + console.error(` auth_user - User account with permission to post a pull request against the GitHub repo.`); console.error(` auth_token - A PAT associated with auth_user.`); console.error(` user_full_name - A full name to associate with a git commit. (This is replaced by the PR account if commit is squashed.)`); console.error(` user_email - An email to associate with a git commit. (This is replaced by the PR account if commit is squashed.)`); @@ -160,7 +160,7 @@ cp.execSync('git remote remove origin'); cp.execSync(`git remote add origin https://${authUser}:${authToken}@github.com/${repoOwner}/${repoName}.git`); // Commit changed files. -console.log(`Commiting changes (git commit -m "${commitComment}")`); +console.log(`Committing changes (git commit -m "${commitComment}")`); cp.execSync(`git commit -m "${commitComment}"`); if (existingUserName === undefined) { diff --git a/Extension/walkthrough/installcompiler/install-clang-macos.md b/Extension/walkthrough/installcompiler/install-clang-macos.md index 95bcbc3722..7fc1e6d63c 100644 --- a/Extension/walkthrough/installcompiler/install-clang-macos.md +++ b/Extension/walkthrough/installcompiler/install-clang-macos.md @@ -1,5 +1,5 @@ -

Install a C++ compiler on macOS

-

If you're doing C++ development for macOS, we recommend installing the Clang compiler. All you need to do is run the following command in a Terminal window(Ctrl+Shift+ `) to install the command line developer tools:

+

Install a C++ compiler on macOS

+

If you're doing C++ development for macOS, we recommend installing the Clang compiler. All you need to do is run the following command in a Terminal window(Ctrl+Shift+ `) to install the command line developer tools:

xcode-select --install
-

Then, to verify that clang is installed, run the following command in a Terminal window. You should see a message with information about the version of Clang you're using.

+

Then, to verify that clang is installed, run the following command in a Terminal window. You should see a message with information about the version of Clang you're using.

clang --version
diff --git a/Extension/walkthrough/installcompiler/install-compiler-windows.md b/Extension/walkthrough/installcompiler/install-compiler-windows.md index 01e2e1f67c..7abf671dde 100644 --- a/Extension/walkthrough/installcompiler/install-compiler-windows.md +++ b/Extension/walkthrough/installcompiler/install-compiler-windows.md @@ -15,4 +15,4 @@

Note: To use MSVC from the command line or VS Code, you must run from a Developer Command Prompt for VS. An ordinary shell such as PowerShell, Bash, or the Windows command prompt does not have the necessary path environment variables set.

- + \ No newline at end of file diff --git a/Extension/walkthrough/installcompiler/install-compiler-windows10.md b/Extension/walkthrough/installcompiler/install-compiler-windows10.md new file mode 100644 index 0000000000..999b9ed46f --- /dev/null +++ b/Extension/walkthrough/installcompiler/install-compiler-windows10.md @@ -0,0 +1,23 @@ +

Install a C++ compiler on Windows

+

If you're doing C++ development for Windows, we recommend installing the Microsoft Visual C++ (MSVC) compiler.

+
    +
  1. To install MSVC, open the VS Code terminal (CTRL + `) and paste in the following command: +

    winget install Microsoft.VisualStudio.2022.BuildTools --force --override "--wait --passive --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows10SDK"
    +
  2. +
    +

    Note: You can use the C++ toolset from Visual Studio Build Tools along with Visual Studio Code to compile, build, and verify any C++ codebase as long as you also have a valid Visual Studio license (either Community, Pro, or Enterprise) that you are actively using to develop that C++ codebase.

    +
    + +
+

Verifying the compiler installation

+
    +
  1. Open the Developer Command Prompt for VS by typing 'developer' in the Windows Start menu.

    +
  2. +
  3. Check your MSVC installation by typing cl into the Developer Command Prompt for VS. You should see a copyright message with the version and basic usage description.

    +
    +

    Note: To use MSVC from the command line or VS Code, you must run from a Developer Command Prompt for VS. An ordinary shell such as PowerShell, Bash, or the Windows command prompt does not have the necessary path environment variables set.

    +
    +
  4. +
+

Other compiler options

+

If you're targeting Linux from Windows, check out Using C++ and Windows Subsystem for Linux (WSL) in VS Code. Or, you could install GCC on Windows with MinGW.

\ No newline at end of file diff --git a/Extension/walkthrough/installcompiler/install-compiler-windows11.md b/Extension/walkthrough/installcompiler/install-compiler-windows11.md new file mode 100644 index 0000000000..1d21f45960 --- /dev/null +++ b/Extension/walkthrough/installcompiler/install-compiler-windows11.md @@ -0,0 +1,23 @@ +

Install a C++ compiler on Windows

+

If you're doing C++ development for Windows, we recommend installing the Microsoft Visual C++ (MSVC) compiler.

+
    +
  1. To install MSVC, open the VS Code terminal (CTRL + `) and paste in the following command: +

    winget install Microsoft.VisualStudio.2022.BuildTools --force --override "--wait --passive --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows11SDK.22000"
    +
  2. +
    +

    Note: You can use the C++ toolset from Visual Studio Build Tools along with Visual Studio Code to compile, build, and verify any C++ codebase as long as you also have a valid Visual Studio license (either Community, Pro, or Enterprise) that you are actively using to develop that C++ codebase.

    +
    + +
+

Verifying the compiler installation

+
    +
  1. Open the Developer Command Prompt for VS by typing 'developer' in the Windows Start menu.

    +
  2. +
  3. Check your MSVC installation by typing cl into the Developer Command Prompt for VS. You should see a copyright message with the version and basic usage description.

    +
    +

    Note: To use MSVC from the command line or VS Code, you must run from a Developer Command Prompt for VS. An ordinary shell such as PowerShell, Bash, or the Windows command prompt does not have the necessary path environment variables set.

    +
    +
  4. +
+

Other compiler options

+

If you're targeting Linux from Windows, check out Using C++ and Windows Subsystem for Linux (WSL) in VS Code. Or, you could install GCC on Windows with MinGW.

\ No newline at end of file