diff --git a/CHANGELOG.md b/CHANGELOG.md index 1860cdb..39b1cc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,7 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Add new configuration `variable-conversion.formatOrder` to customize the display order of variable naming conventions. (新增 `variable-conversion.formatOrder` 配置项,用于自定义变量命名方式的显示顺序) -- Add new command `variable-conversion.showConvertCaseOrderDialog` to display current format order configuration. (新增 `variable-conversion.showConvertCaseOrderDialog` 命令,用于显示当前配置的格式顺序信息) +- Add new command `variable-conversion.showConvertCaseDetailDialog` to display current format order configuration. (新增 `variable-conversion.showConvertCaseDetailDialog` 命令,用于显示当前配置的格式顺序信息) - Add clickable link in formatOrder configuration description to trigger info display. (在 formatOrder 配置项描述中添加了点击触发命令的超链接) - Add shortcut key `Ctrl + Alt + \` to trigger format order info display dialog. (新增快捷键 `Ctrl + Alt + \` 用于触发显示格式顺序弹窗) - Support displaying duplicate and invalid items in format order information dialog. (支持在格式顺序信息弹窗中显示配置的重复项和无效项) diff --git a/package-comment.jsonc b/package-comment.jsonc index 9a85b9f..c8e0f33 100644 --- a/package-comment.jsonc +++ b/package-comment.jsonc @@ -66,7 +66,7 @@ }, // 展示当前配置的转换格式顺序对话框 { - "command": "variable-conversion.showConvertCaseOrderDialog", + "command": "variable-conversion.showConvertCaseDetailDialog", "key": "ctrl+alt+\\" }, // ↓ 路径转换快捷键 @@ -691,7 +691,7 @@ }, "variable-conversion.formatOrder": { "type": "array", - "markdownDescription": "配置变量命名方式的显示顺序\n\nConfigure the display order of variable naming conventions.\n\n该配置中的格式名称必须与enabledFormats中的保持一致。如果某个格式在enabledFormats中被禁用,则即使在formatOrder中配置也不会显示。\n\nFormat names in this configuration must be consistent with those in enabledFormats. If a format is disabled in enabledFormats, it will not be displayed even if configured in formatOrder.\n\n \n\n🌰 e.g. `[\"camel_case\", \"snake_case\", \"pascal_case\"]`\n\n[在 settings.json 中编辑 (Edit in settings.json)](command:workbench.action.openSettingsJson)\n\n[查看当前配置顺序](command:variable-conversion.showConvertCaseOrderDialog)", + "markdownDescription": "配置变量命名方式的显示顺序\n\nConfigure the display order of variable naming conventions.\n\n该配置中的格式名称必须与enabledFormats中的保持一致。如果某个格式在enabledFormats中被禁用,则即使在formatOrder中配置也不会显示。\n\nFormat names in this configuration must be consistent with those in enabledFormats. If a format is disabled in enabledFormats, it will not be displayed even if configured in formatOrder.\n\n \n\n🌰 e.g. `[\"camel_case\", \"snake_case\", \"pascal_case\"]`\n\n[在 settings.json 中编辑 (Edit in settings.json)](command:workbench.action.openSettingsJson)\n\n[查看当前配置顺序](command:variable-conversion.showConvertCaseDetailDialog)", "scope": "window", "items": { "type": "string", diff --git a/package.json b/package.json index 64c3383..344abb3 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "when": "editorTextFocus" }, { - "command": "variable-conversion.showConvertCaseOrderDialog", + "command": "variable-conversion.showConvertCaseDetailDialog", "key": "ctrl+alt+\\" }, { @@ -331,7 +331,7 @@ "variable-conversion.enabledFormats": { "type": "object", "description": "Tags and options configured here will be used by the Add Tags command to add tags to struct fields. If promptForTags is true, then user will be prompted for tags and options. By default, json tags are added.", - "markdownDescription": "配置启用的变量命名方式\n\nConfiguration of Enabled Variable Naming Conventions.\n\n \n\n🌰 e.g. *Mike like eat ice-cream*\n\n对于这个句子,不同命名方式如以下示例:\n\nFor this sentence, different naming conventions are as follows:\n\n[在 settings.json 中编辑 (Edit in settings.json)](command:workbench.action.openSettingsJson)", + "markdownDescription": "配置启用的变量命名方式\n\nConfiguration of Enabled Variable Naming Conventions.\n\n \n\n🌰 e.g. *Mike like eat ice-cream*\n\n对于这个句子,不同命名方式如以下示例:\n\nFor this sentence, different naming conventions are as follows:\n\n[在 settings.json 中编辑 (Edit in settings.json)](command:workbench.action.openSettingsJson)\n\n[配置转换顺序](command:workbench.action.openSettings?%5B%22variable-conversion.formatOrder%22%5D)  [查看当前配置(对话框)](command:variable-conversion.showConvertCaseDetailDialog)", "scope": "window", "properties": { "lowerCase.enabled": { @@ -461,7 +461,7 @@ }, "variable-conversion.formatOrder": { "type": "array", - "markdownDescription": "配置变量命名方式的显示顺序\n\nConfigure the display order of variable naming conventions.\n\n该配置中的格式名称必须与enabledFormats中的保持一致。如果某个格式在enabledFormats中被禁用,则即使在formatOrder中配置也不会显示。\n\nFormat names in this configuration must be consistent with those in enabledFormats. If a format is disabled in enabledFormats, it will not be displayed even if configured in formatOrder.\n\n \n\n🌰 e.g. `[\"camel_case\", \"snake_case\", \"pascal_case\"]`\n\n[在 settings.json 中编辑 (Edit in settings.json)](command:workbench.action.openSettingsJson)\n\n[查看当前配置顺序](command:variable-conversion.showConvertCaseOrderDialog)", + "markdownDescription": "配置变量命名方式的显示顺序\n\nConfigure the display order of variable naming conventions.\n\n该配置中的格式名称必须与enabledFormats中的保持一致。如果某个格式在enabledFormats中被禁用,则即使在formatOrder中配置也不会显示。\n\nFormat names in this configuration must be consistent with those in enabledFormats. If a format is disabled in enabledFormats, it will not be displayed even if configured in formatOrder.\n\n \n\n🌰 e.g. `[\"camel_case\", \"snake_case\", \"pascal_case\"]`\n\n[在 settings.json 中编辑 (Edit in settings.json)](command:workbench.action.openSettingsJson)\n\n[配置启用的变量命名方式](command:workbench.action.openSettings?%5B%22variable-conversion.enabledFormats%22%5D)  [查看当前配置(对话框)](command:variable-conversion.showConvertCaseDetailDialog)", "scope": "window", "items": { "type": "string", diff --git a/src/core/variable-convert/show-convert-case-order-dialog.ts b/src/core/variable-convert/show-convert-case-order-dialog.ts index 069b07e..6eb67da 100644 --- a/src/core/variable-convert/show-convert-case-order-dialog.ts +++ b/src/core/variable-convert/show-convert-case-order-dialog.ts @@ -5,7 +5,7 @@ import { getUserConfigurations } from '../../utils/user-configuration'; /** * 显示当前配置的格式顺序信息 */ -export function showConvertCaseOrderDialog() { +export function showConvertCaseDetailDialog() { // 获取用户配置的格式顺序 const formatOrder = getUserConfigurations('formatOrder') || []; // 获取启用的格式 @@ -120,7 +120,7 @@ export function showConvertCaseOrderDialog() { // 显示信息弹窗 vscode.window.showInformationMessage( - '格式顺序配置信息', + '变量转换功能配置信息', { modal: true, detail: message.join('') }, // 弹窗按钮 { title: '插件全部配置' }, diff --git a/src/extension.ts b/src/extension.ts index 20a276e..bccc02e 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -17,7 +17,7 @@ import handleEditorReplaceVariable from './handler/variable-convert/editor-subme import { handleQuickPick as handleQuickPickVariable } from './handler/variable-convert/quick-pick-handler'; import { commands as variableCommands } from './core/variable-convert/types/SupportVariableCaseType'; import * as CyclicConversionVariable from './core/variable-convert/cyclic-conversion'; -import { showConvertCaseOrderDialog } from './core/variable-convert/show-convert-case-order-dialog'; +import { showConvertCaseDetailDialog } from './core/variable-convert/show-convert-case-order-dialog'; // Path Convert import handleEditorReplacePath from './handler/path-convert/editor-submenu-handler'; @@ -158,8 +158,8 @@ export function activate(context: vscode.ExtensionContext) { context.subscriptions.push(loopConvertCaseNextDisposable); // 注册显示格式顺序信息的命令 - let showConvertCaseOrderDialogDisposable = vscode.commands.registerCommand('variable-conversion.showConvertCaseOrderDialog', showConvertCaseOrderDialog); - context.subscriptions.push(showConvertCaseOrderDialogDisposable); + let showConvertCaseDetailDialogDisposable = vscode.commands.registerCommand('variable-conversion.showConvertCaseDetailDialog', showConvertCaseDetailDialog); + context.subscriptions.push(showConvertCaseDetailDialogDisposable); /**