QuickPick 菜单支持过滤用户配置的禁用格式 (disableFormat)
This commit is contained in:
parent
f8fe40c374
commit
68ffcc49f7
@ -441,17 +441,80 @@
|
||||
"title": "定义循环转换快捷键的目标格式排序",
|
||||
// "description": "Defines the destination format ordering of the circular conversion shortcut.\n定义循环转换快捷键的目标格式排序",
|
||||
// markdownDescription 最多配置 11 行
|
||||
"markdownDescription": "Defines the destination format ordering of the circular conversion shortcut, separated by commas.\n\n 定义循环转换快捷键的目标格式排序,以英文逗号分隔\n\n Target formats that are not in the following configuration list will appear last in the following custom order in the default order.\n\n不在以下配置列表中的目标格式,将按照默认顺序排在以下自定义顺序最后\n\n 🌟Lower Case 全小写命名: `lower_case`(全小写), `snake_case`(下划线), `kebab_case`(连字符), `space_case`(空格), `dot_case`(点)\n\n 🌟Upper Case 全大写命名: `upper_case`(全大写), `snake_upper_case`(下划线), `kebab_upper_case`(连字符), `space_upper_case`(空格), `dot_upper_case`(点)\n\n 🌟Pascal Case 大驼峰命名: `pascal_case`(大驼峰), `snake_pascal_case`(下划线), `kebab_pascal_case`(连字符), `space_pascal_case`(空格), `dot_pascal_case`(点)\n\n 🌟Camel Case 小驼峰命名: `camel_case`(小驼峰), `snake_camel_case`(下划线), `kebab_camel_case`(连字符), `space_camel_case`(空格), `dot_camel_case`(点)\n\n🐳Default value 默认值: `camel_case, snake_case, pascal_case, kebab_case, space_case, dot_case, snake_upper_case, kebab_upper_case, space_upper_case, dot_upper_case, snake_pascal_case, kebab_pascal_case, space_pascal_case, dot_pascal_case, snake_camel_case, kebab_camel_case, space_camel_case, dot_camel_case, lower_case, upper_case`\n\n If you find the following configuration troublesome, you can also edit this configuration item in `settings.json`. 若您感觉以下配置比较麻烦,也可以选择在 `settings.json` 中编辑: `\"variable-conversion.circularConversionFormatOrder\": \"...\",` [Edit in settings.json (在 settings.json 中编辑)](command:workbench.action.openSettingsJson)",
|
||||
"type": "string",
|
||||
// "markdownDescription": "Defines the destination format ordering of the circular conversion shortcut, separated by commas.\n\n 定义循环转换快捷键的目标格式排序,以英文逗号分隔\n\n Target formats that are not in the following configuration list will appear last in the following custom order in the default order.\n\n不在以下配置列表中的目标格式,将按照默认顺序排在以下自定义顺序最后\n\n 🌟Lower Case 全小写命名: `lower_case`(全小写), `snake_case`(下划线), `kebab_case`(连字符), `space_case`(空格), `dot_case`(点)\n\n 🌟Upper Case 全大写命名: `upper_case`(全大写), `snake_upper_case`(下划线), `kebab_upper_case`(连字符), `space_upper_case`(空格), `dot_upper_case`(点)\n\n 🌟Pascal Case 大驼峰命名: `pascal_case`(大驼峰), `snake_pascal_case`(下划线), `kebab_pascal_case`(连字符), `space_pascal_case`(空格), `dot_pascal_case`(点)\n\n 🌟Camel Case 小驼峰命名: `camel_case`(小驼峰), `snake_camel_case`(下划线), `kebab_camel_case`(连字符), `space_camel_case`(空格), `dot_camel_case`(点)\n\n🐳Default value 默认值: `camel_case, snake_case, pascal_case, kebab_case, space_case, dot_case, snake_upper_case, kebab_upper_case, space_upper_case, dot_upper_case, snake_pascal_case, kebab_pascal_case, space_pascal_case, dot_pascal_case, snake_camel_case, kebab_camel_case, space_camel_case, dot_camel_case, lower_case, upper_case`\n\n If you find the following configuration troublesome, you can also edit this configuration item in `settings.json`. 若您感觉以下配置比较麻烦,也可以选择在 `settings.json` 中编辑: `\"variable-conversion.circularConversionFormatOrder\": \"...\",` [Edit in settings.json (在 settings.json 中编辑)](command:workbench.action.openSettingsJson)",
|
||||
"markdownDescription": "Defines the destination format ordering of the circular conversion shortcut, separated by commas. (Target formats that are not in the following configuration list will appear last in the following custom order in the default order.)\n\n 定义循环转换快捷键的目标格式排序,以英文逗号分隔。不在以下配置列表中的目标格式,将按照默认顺序排在以下自定义顺序最后\n\n 📌Please [edit this configuration in `settings.json`](command:workbench.action.openSettingsJson), **instead of** using the drop-down box on the settings page.\n\n 📌请[在 `settings.json` 中编辑该配置](command:workbench.action.openSettingsJson),**不要使用**设置页面的下拉框进行配置: `\"variable-conversion.circularConversionFormatOrder\": [ ... ],`\n\n 🐳Default value 默认值: `\"variable-conversion.circularConversionFormatOrder\": [ \"camel_case\", \"snake_case\", \"pascal_case\", \"kebab_case\", \"space_case\", \"dot_case\", \"snake_upper_case\", \"kebab_upper_case\", \"space_upper_case\", \"dot_upper_case\", \"snake_pascal_case\", \"kebab_pascal_case\", \"space_pascal_case\", \"dot_pascal_case\", \"snake_camel_case\", \"kebab_camel_case\", \"space_camel_case\", \"dot_camel_case\", \"lower_case\", \"upper_case\" ],`\n\n 👉Configuration item meaning 配置项说明\n\n 🌟Lower Case 全小写命名: `lower_case`(全小写), `snake_case`(下划线), `kebab_case`(连字符), `space_case`(空格), `dot_case`(点)\n\n 🌟Upper Case 全大写命名: `upper_case`(全大写), `snake_upper_case`(下划线), `kebab_upper_case`(连字符), `space_upper_case`(空格), `dot_upper_case`(点)\n\n 🌟Pascal Case 大驼峰命名: `pascal_case`(大驼峰), `snake_pascal_case`(下划线), `kebab_pascal_case`(连字符), `space_pascal_case`(空格), `dot_pascal_case`(点)\n\n 🌟Camel Case 小驼峰命名: `camel_case`(小驼峰), `snake_camel_case`(下划线), `kebab_camel_case`(连字符), `space_camel_case`(空格), `dot_camel_case`(点)",
|
||||
// "type": "string",
|
||||
// "default": "camel_case, snake_case, pascal_case, kebab_case, space_case, dot_case, snake_upper_case, kebab_upper_case, space_upper_case, dot_upper_case, snake_pascal_case, kebab_pascal_case, space_pascal_case, dot_pascal_case, snake_camel_case, kebab_camel_case, space_camel_case, dot_camel_case, lower_case, upper_case"
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Option1",
|
||||
"Option2",
|
||||
"Option3"
|
||||
"camel_case",
|
||||
"pascal_case",
|
||||
"snake_case",
|
||||
"snake_camel_case",
|
||||
"snake_pascal_case",
|
||||
"snake_upper_case",
|
||||
"kebab_case",
|
||||
"kebab_camel_case",
|
||||
"kebab_pascal_case",
|
||||
"kebab_upper_case",
|
||||
"space_case",
|
||||
"space_camel_case",
|
||||
"space_pascal_case",
|
||||
"space_upper_case",
|
||||
"dot_case",
|
||||
"dot_camel_case",
|
||||
"dot_pascal_case",
|
||||
"dot_upper_case",
|
||||
"lower_case",
|
||||
"upper_case"
|
||||
],
|
||||
"enumDescriptions": [
|
||||
"小驼峰(驼峰)命名",
|
||||
"大驼峰(帕斯卡)命名",
|
||||
"下划线(蛇形)命名",
|
||||
"下划线(蛇形) + 小驼峰(驼峰)命名",
|
||||
"下划线(蛇形) + 大驼峰(帕斯卡)命名",
|
||||
"下划线(蛇形) + 全大写命名",
|
||||
"中划线(连字符/脊柱式)命名",
|
||||
"中划线(连字符/脊柱式) + 小驼峰(驼峰)命名",
|
||||
"中划线(连字符/脊柱式) + 大驼峰(帕斯卡)命名",
|
||||
"中划线(连字符/脊柱式) + 全大写命名",
|
||||
"空格分隔命名",
|
||||
"空格分隔 + 小驼峰(驼峰)命名",
|
||||
"空格分隔 + 大驼峰(帕斯卡)命名",
|
||||
"空格分隔 + 全大写命名",
|
||||
"点分隔命名",
|
||||
"点分隔 + 小驼峰(驼峰)命名",
|
||||
"点分隔 + 大驼峰(帕斯卡)命名",
|
||||
"点分隔 + 全大写命名",
|
||||
"全小写",
|
||||
"全大写"
|
||||
]
|
||||
},
|
||||
"default": "camel_case, snake_case, pascal_case, kebab_case, space_case, dot_case, snake_upper_case, kebab_upper_case, space_upper_case, dot_upper_case, snake_pascal_case, kebab_pascal_case, space_pascal_case, dot_pascal_case, snake_camel_case, kebab_camel_case, space_camel_case, dot_camel_case, lower_case, upper_case"
|
||||
"default": [
|
||||
"camel_case",
|
||||
"snake_case",
|
||||
"pascal_case",
|
||||
"kebab_case",
|
||||
"space_case",
|
||||
"dot_case",
|
||||
"snake_upper_case",
|
||||
"kebab_upper_case",
|
||||
"space_upper_case",
|
||||
"dot_upper_case",
|
||||
"snake_pascal_case",
|
||||
"kebab_pascal_case",
|
||||
"space_pascal_case",
|
||||
"dot_pascal_case",
|
||||
"snake_camel_case",
|
||||
"kebab_camel_case",
|
||||
"space_camel_case",
|
||||
"dot_camel_case",
|
||||
"lower_case",
|
||||
"upper_case"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
72
package.json
72
package.json
@ -301,17 +301,77 @@
|
||||
"variable-conversion.circularConversionFormatOrder": {
|
||||
"order": 2,
|
||||
"title": "定义循环转换快捷键的目标格式排序",
|
||||
"markdownDescription": "Defines the destination format ordering of the circular conversion shortcut, separated by commas.\n\n 定义循环转换快捷键的目标格式排序,以英文逗号分隔\n\n Target formats that are not in the following configuration list will appear last in the following custom order in the default order.\n\n不在以下配置列表中的目标格式,将按照默认顺序排在以下自定义顺序最后\n\n 🌟Lower Case 全小写命名: `lower_case`(全小写), `snake_case`(下划线), `kebab_case`(连字符), `space_case`(空格), `dot_case`(点)\n\n 🌟Upper Case 全大写命名: `upper_case`(全大写), `snake_upper_case`(下划线), `kebab_upper_case`(连字符), `space_upper_case`(空格), `dot_upper_case`(点)\n\n 🌟Pascal Case 大驼峰命名: `pascal_case`(大驼峰), `snake_pascal_case`(下划线), `kebab_pascal_case`(连字符), `space_pascal_case`(空格), `dot_pascal_case`(点)\n\n 🌟Camel Case 小驼峰命名: `camel_case`(小驼峰), `snake_camel_case`(下划线), `kebab_camel_case`(连字符), `space_camel_case`(空格), `dot_camel_case`(点)\n\n🐳Default value 默认值: `camel_case, snake_case, pascal_case, kebab_case, space_case, dot_case, snake_upper_case, kebab_upper_case, space_upper_case, dot_upper_case, snake_pascal_case, kebab_pascal_case, space_pascal_case, dot_pascal_case, snake_camel_case, kebab_camel_case, space_camel_case, dot_camel_case, lower_case, upper_case`\n\n If you find the following configuration troublesome, you can also edit this configuration item in `settings.json`. 若您感觉以下配置比较麻烦,也可以选择在 `settings.json` 中编辑: `\"variable-conversion.circularConversionFormatOrder\": \"...\",` [Edit in settings.json (在 settings.json 中编辑)](command:workbench.action.openSettingsJson)",
|
||||
"type": "string",
|
||||
"markdownDescription": "Defines the destination format ordering of the circular conversion shortcut, separated by commas. (Target formats that are not in the following configuration list will appear last in the following custom order in the default order.)\n\n 定义循环转换快捷键的目标格式排序,以英文逗号分隔。不在以下配置列表中的目标格式,将按照默认顺序排在以下自定义顺序最后\n\n 📌Please [edit this configuration in `settings.json`](command:workbench.action.openSettingsJson), **instead of** using the drop-down box on the settings page.\n\n 📌请[在 `settings.json` 中编辑该配置](command:workbench.action.openSettingsJson),**不要使用**设置页面的下拉框进行配置: `\"variable-conversion.circularConversionFormatOrder\": [ ... ],`\n\n 🐳Default value 默认值: `\"variable-conversion.circularConversionFormatOrder\": [ \"camel_case\", \"snake_case\", \"pascal_case\", \"kebab_case\", \"space_case\", \"dot_case\", \"snake_upper_case\", \"kebab_upper_case\", \"space_upper_case\", \"dot_upper_case\", \"snake_pascal_case\", \"kebab_pascal_case\", \"space_pascal_case\", \"dot_pascal_case\", \"snake_camel_case\", \"kebab_camel_case\", \"space_camel_case\", \"dot_camel_case\", \"lower_case\", \"upper_case\" ],`\n\n 👉Configuration item meaning 配置项说明\n\n 🌟Lower Case 全小写命名: `lower_case`(全小写), `snake_case`(下划线), `kebab_case`(连字符), `space_case`(空格), `dot_case`(点)\n\n 🌟Upper Case 全大写命名: `upper_case`(全大写), `snake_upper_case`(下划线), `kebab_upper_case`(连字符), `space_upper_case`(空格), `dot_upper_case`(点)\n\n 🌟Pascal Case 大驼峰命名: `pascal_case`(大驼峰), `snake_pascal_case`(下划线), `kebab_pascal_case`(连字符), `space_pascal_case`(空格), `dot_pascal_case`(点)\n\n 🌟Camel Case 小驼峰命名: `camel_case`(小驼峰), `snake_camel_case`(下划线), `kebab_camel_case`(连字符), `space_camel_case`(空格), `dot_camel_case`(点)",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Option1",
|
||||
"Option2",
|
||||
"Option3"
|
||||
"camel_case",
|
||||
"pascal_case",
|
||||
"snake_case",
|
||||
"snake_camel_case",
|
||||
"snake_pascal_case",
|
||||
"snake_upper_case",
|
||||
"kebab_case",
|
||||
"kebab_camel_case",
|
||||
"kebab_pascal_case",
|
||||
"kebab_upper_case",
|
||||
"space_case",
|
||||
"space_camel_case",
|
||||
"space_pascal_case",
|
||||
"space_upper_case",
|
||||
"dot_case",
|
||||
"dot_camel_case",
|
||||
"dot_pascal_case",
|
||||
"dot_upper_case",
|
||||
"lower_case",
|
||||
"upper_case"
|
||||
],
|
||||
"enumDescriptions": [
|
||||
"小驼峰(驼峰)命名",
|
||||
"大驼峰(帕斯卡)命名",
|
||||
"下划线(蛇形)命名",
|
||||
"下划线(蛇形) + 小驼峰(驼峰)命名",
|
||||
"下划线(蛇形) + 大驼峰(帕斯卡)命名",
|
||||
"下划线(蛇形) + 全大写命名",
|
||||
"中划线(连字符/脊柱式)命名",
|
||||
"中划线(连字符/脊柱式) + 小驼峰(驼峰)命名",
|
||||
"中划线(连字符/脊柱式) + 大驼峰(帕斯卡)命名",
|
||||
"中划线(连字符/脊柱式) + 全大写命名",
|
||||
"空格分隔命名",
|
||||
"空格分隔 + 小驼峰(驼峰)命名",
|
||||
"空格分隔 + 大驼峰(帕斯卡)命名",
|
||||
"空格分隔 + 全大写命名",
|
||||
"点分隔命名",
|
||||
"点分隔 + 小驼峰(驼峰)命名",
|
||||
"点分隔 + 大驼峰(帕斯卡)命名",
|
||||
"点分隔 + 全大写命名",
|
||||
"全小写",
|
||||
"全大写"
|
||||
]
|
||||
},
|
||||
"default": "camel_case, snake_case, pascal_case, kebab_case, space_case, dot_case, snake_upper_case, kebab_upper_case, space_upper_case, dot_upper_case, snake_pascal_case, kebab_pascal_case, space_pascal_case, dot_pascal_case, snake_camel_case, kebab_camel_case, space_camel_case, dot_camel_case, lower_case, upper_case"
|
||||
"default": [
|
||||
"camel_case",
|
||||
"snake_case",
|
||||
"pascal_case",
|
||||
"kebab_case",
|
||||
"space_case",
|
||||
"dot_case",
|
||||
"snake_upper_case",
|
||||
"kebab_upper_case",
|
||||
"space_upper_case",
|
||||
"dot_upper_case",
|
||||
"snake_pascal_case",
|
||||
"kebab_pascal_case",
|
||||
"space_pascal_case",
|
||||
"dot_pascal_case",
|
||||
"snake_camel_case",
|
||||
"kebab_camel_case",
|
||||
"space_camel_case",
|
||||
"dot_camel_case",
|
||||
"lower_case",
|
||||
"upper_case"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,12 @@
|
||||
import * as vscode from 'vscode';
|
||||
import QuickPickItemEx from "../type-definition/QuickPickItemExType";
|
||||
import { quickPickSupportCases } from '../type-definition/SupportCaseType';
|
||||
import { QuickPickSupportCaseItem, quickPickSupportCases } from '../type-definition/SupportCaseType';
|
||||
import { TransformTextResult } from '../type-definition/TransformTextResultType';
|
||||
import { transformMutliLineText, transformMutliSelectionText } from '../main-code/transform';
|
||||
import { transformMutliSelectionText } from '../main-code/transform';
|
||||
import { EOL } from '../type-definition/EOLType';
|
||||
import { caseConversion } from '../main-code/conversion';
|
||||
import { isStringArrayEqual } from '../main-code/utils';
|
||||
import { getUserConfigurations } from '../main-code/user-configuration';
|
||||
|
||||
const QuickPickLabelMaxLength = 60;
|
||||
|
||||
@ -18,12 +19,12 @@ interface RecommendItem {
|
||||
/**
|
||||
* 弹出的提示
|
||||
*/
|
||||
function generateOptionsBasedOnText(textList: string[], eol: EOL): Array<QuickPickItemEx> {
|
||||
function generateOptionsBasedOnText(textList: string[], eol: EOL, enabledQuickPickSupportCases: Array<QuickPickSupportCaseItem>): Array<QuickPickItemEx> {
|
||||
// Cut text 切割文本
|
||||
const resultsList: Array<TransformTextResult[]> = transformMutliSelectionText(textList);
|
||||
|
||||
const mergeResultList: Array<RecommendItem> = [];
|
||||
for (const quickPick of quickPickSupportCases) {
|
||||
for (const quickPick of enabledQuickPickSupportCases) {
|
||||
const conversionResults: Array<string> = [];
|
||||
for (let i = 0; i < textList.length; i++) {
|
||||
const text = textList[i];
|
||||
@ -95,8 +96,24 @@ export function handleQuickPick() {
|
||||
return;
|
||||
}
|
||||
|
||||
// issue: #1 https://github.com/coder-xiaomo/variable-conversion-vscode-extension/issues/1
|
||||
// 获取用户配置
|
||||
const disableFormatList = getUserConfigurations('disableFormat');
|
||||
// 排除禁用的选项
|
||||
const enabledQuickPickSupportCases = [];
|
||||
for (const quickPick of quickPickSupportCases) {
|
||||
if (disableFormatList.includes(quickPick.settingsKey)) {
|
||||
continue;
|
||||
}
|
||||
enabledQuickPickSupportCases.push(quickPick);
|
||||
}
|
||||
if (enabledQuickPickSupportCases.length === 0) {
|
||||
vscode.window.showInformationMessage('所有格式都已被配置为禁用,请修改配置 `variable-conversion.disableFormat` 后重试\nAll formats have been configured to disable. Modify the `variable-conversion.disableFormat` configuration and try again.');
|
||||
return;
|
||||
}
|
||||
|
||||
// 基于选中的文本生成选项
|
||||
const options = generateOptionsBasedOnText(textList, eol);
|
||||
const options = generateOptionsBasedOnText(textList, eol, enabledQuickPickSupportCases);
|
||||
if (options.length === 0) {
|
||||
vscode.window.showInformationMessage('所选内容暂无可选转换,请尝试重新选择\nNo conversion candidates are available for the selected content, please try to select another text.');
|
||||
return;
|
||||
|
14
src/main-code/user-configuration.ts
Normal file
14
src/main-code/user-configuration.ts
Normal file
@ -0,0 +1,14 @@
|
||||
const vscode = require('vscode');
|
||||
|
||||
function getUserConfigurations(configKey: string) {
|
||||
const config = vscode.workspace.getConfiguration('variable-conversion');
|
||||
|
||||
// 获取 disableFormat 配置项
|
||||
const configValue = config.get(configKey);
|
||||
console.log('configValue:', configValue);
|
||||
return configValue;
|
||||
}
|
||||
|
||||
export {
|
||||
getUserConfigurations
|
||||
};
|
@ -309,130 +309,158 @@ export const commands: Array<{ command: string; targetCase: SupportCase }> = [
|
||||
{ command: 'variable-conversion.toUpperCase', targetCase: SupportCase.UPPER_CASE },
|
||||
];
|
||||
|
||||
export interface QuickPickSupportCaseItem {
|
||||
type: SupportCase,
|
||||
name: string,
|
||||
shortName: string,
|
||||
keyword: string[],
|
||||
settingsKey: string,
|
||||
}
|
||||
|
||||
/**
|
||||
* 所有支持的命名方式
|
||||
* @since 2024-04-06
|
||||
*/
|
||||
export const quickPickSupportCases = [
|
||||
export const quickPickSupportCases: Array<QuickPickSupportCaseItem> = [
|
||||
{
|
||||
type: SupportCase.CAMEL_CASE,
|
||||
name: '小驼峰(驼峰)命名',
|
||||
shortName: '小驼峰',
|
||||
keyword: keyword.camel,
|
||||
settingsKey: 'camel_case',
|
||||
},
|
||||
{
|
||||
type: SupportCase.PASCAL_CASE,
|
||||
name: '大驼峰(帕斯卡)命名',
|
||||
shortName: '帕斯卡',
|
||||
keyword: keyword.pascal,
|
||||
settingsKey: 'pascal_case',
|
||||
},
|
||||
{
|
||||
type: SupportCase.SNAKE_CASE,
|
||||
name: '下划线(蛇形)命名',
|
||||
shortName: '蛇形',
|
||||
keyword: [...keyword.snake, ...keyword.lower],
|
||||
settingsKey: 'snake_case',
|
||||
},
|
||||
{
|
||||
type: SupportCase.SNAKE_CAMEL_CASE,
|
||||
name: '下划线(蛇形) + 小驼峰(驼峰)命名',
|
||||
shortName: '蛇形驼峰',
|
||||
keyword: [...keyword.snake, ...keyword.camel],
|
||||
settingsKey: 'snake_camel_case',
|
||||
},
|
||||
{
|
||||
type: SupportCase.SNAKE_PASCAL_CASE,
|
||||
name: '下划线(蛇形) + 大驼峰(帕斯卡)命名',
|
||||
shortName: '蛇形帕斯卡',
|
||||
keyword: [...keyword.snake, ...keyword.pascal],
|
||||
settingsKey: 'snake_pascal_case',
|
||||
},
|
||||
{
|
||||
type: SupportCase.SNAKE_UPPER_CASE,
|
||||
name: '下划线(蛇形) + 全大写命名',
|
||||
shortName: '蛇形大写',
|
||||
keyword: [...keyword.snake, ...keyword.upper],
|
||||
settingsKey: 'snake_upper_case',
|
||||
},
|
||||
{
|
||||
type: SupportCase.KEBAB_CASE,
|
||||
name: '中划线(连字符/脊柱式)命名',
|
||||
shortName: '脊柱',
|
||||
keyword: [...keyword.kebab, ...keyword.lower],
|
||||
settingsKey: 'kebab_case',
|
||||
},
|
||||
{
|
||||
type: SupportCase.KEBAB_CAMEL_CASE,
|
||||
name: '中划线(连字符/脊柱式) + 小驼峰(驼峰)命名',
|
||||
shortName: '脊柱驼峰',
|
||||
keyword: [...keyword.kebab, ...keyword.camel],
|
||||
settingsKey: 'kebab_camel_case',
|
||||
},
|
||||
{
|
||||
type: SupportCase.KEBAB_PASCAL_CASE,
|
||||
name: '中划线(连字符/脊柱式) + 大驼峰(帕斯卡)命名',
|
||||
shortName: '脊柱帕斯卡',
|
||||
keyword: [...keyword.kebab, ...keyword.pascal],
|
||||
settingsKey: 'kebab_pascal_case',
|
||||
},
|
||||
{
|
||||
type: SupportCase.KEBAB_UPPER_CASE,
|
||||
name: '中划线(连字符/脊柱式) + 全大写命名',
|
||||
shortName: '脊柱大写',
|
||||
keyword: [...keyword.kebab, ...keyword.upper],
|
||||
settingsKey: 'kebab_upper_case',
|
||||
},
|
||||
{
|
||||
type: SupportCase.SPACE_CASE,
|
||||
name: '空格分隔命名',
|
||||
shortName: '脊柱',
|
||||
keyword: [...keyword.space, ...keyword.lower],
|
||||
settingsKey: 'space_case',
|
||||
},
|
||||
{
|
||||
type: SupportCase.SPACE_CAMEL_CASE,
|
||||
name: '空格分隔 + 小驼峰(驼峰)命名',
|
||||
shortName: '脊柱驼峰',
|
||||
keyword: [...keyword.space, ...keyword.camel],
|
||||
settingsKey: 'space_camel_case',
|
||||
},
|
||||
{
|
||||
type: SupportCase.SPACE_PASCAL_CASE,
|
||||
name: '空格分隔 + 大驼峰(帕斯卡)命名',
|
||||
shortName: '脊柱帕斯卡',
|
||||
keyword: [...keyword.space, ...keyword.pascal],
|
||||
settingsKey: 'space_pascal_case',
|
||||
},
|
||||
{
|
||||
type: SupportCase.SPACE_UPPER_CASE,
|
||||
name: '空格分隔 + 全大写命名',
|
||||
shortName: '脊柱大写',
|
||||
keyword: [...keyword.space, ...keyword.upper],
|
||||
settingsKey: 'space_upper_case',
|
||||
},
|
||||
{
|
||||
type: SupportCase.DOT_CASE,
|
||||
name: '点分隔命名',
|
||||
shortName: '脊柱',
|
||||
keyword: [...keyword.dot, ...keyword.lower],
|
||||
settingsKey: 'dot_case',
|
||||
},
|
||||
{
|
||||
type: SupportCase.DOT_CAMEL_CASE,
|
||||
name: '点分隔 + 小驼峰(驼峰)命名',
|
||||
shortName: '脊柱驼峰',
|
||||
keyword: [...keyword.dot, ...keyword.camel],
|
||||
settingsKey: 'dot_camel_case',
|
||||
},
|
||||
{
|
||||
type: SupportCase.DOT_PASCAL_CASE,
|
||||
name: '点分隔 + 大驼峰(帕斯卡)命名',
|
||||
shortName: '脊柱帕斯卡',
|
||||
keyword: [...keyword.dot, ...keyword.pascal],
|
||||
settingsKey: 'dot_pascal_case',
|
||||
},
|
||||
{
|
||||
type: SupportCase.DOT_UPPER_CASE,
|
||||
name: '点分隔 + 全大写命名',
|
||||
shortName: '脊柱大写',
|
||||
keyword: [...keyword.dot, ...keyword.upper],
|
||||
settingsKey: 'dot_upper_case',
|
||||
},
|
||||
{
|
||||
type: SupportCase.LOWER_CASE,
|
||||
name: '全小写',
|
||||
shortName: '小写',
|
||||
keyword: keyword.lower,
|
||||
settingsKey: 'lower_case',
|
||||
},
|
||||
{
|
||||
type: SupportCase.UPPER_CASE,
|
||||
name: '全大写',
|
||||
shortName: '大写',
|
||||
keyword: keyword.upper,
|
||||
settingsKey: 'upper_case',
|
||||
},
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user