mirror of
https://github.com/any86/any-rule.git
synced 2025-07-14 15:38:58 +08:00
chore: 删除语言配置功能
This commit is contained in:
parent
d343e63e00
commit
6a34340d32
@ -41,11 +41,6 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "@zz",
|
"default": "@zz",
|
||||||
"description": "触发字符串"
|
"description": "触发字符串"
|
||||||
},
|
|
||||||
"any-rule.supportedLanguages": {
|
|
||||||
"type": "string",
|
|
||||||
"default": "*, javascript, typescript, javascriptreact, typescriptreact, markdown, jsx, vue, html, json, plaintext, coffeescript",
|
|
||||||
"description": "如果您的文件格式未被支持, 请在此处添加(⚡添加成功后需要重启vscode)"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -43,7 +43,7 @@ export default function (context: ExtensionContext, RULES: Rule[]) {
|
|||||||
title: item.label,
|
title: item.label,
|
||||||
method: 'QuickPick'
|
method: 'QuickPick'
|
||||||
});
|
});
|
||||||
showResultMessage(item.label,item.rule);
|
showResultMessage(item.label, item.rule);
|
||||||
});
|
});
|
||||||
}, 10)
|
}, 10)
|
||||||
return [];
|
return [];
|
||||||
@ -81,12 +81,12 @@ function insertRule(document: TextDocument, position: Position, ruleString: stri
|
|||||||
// 获取配置
|
// 获取配置
|
||||||
function getConfig() {
|
function getConfig() {
|
||||||
const configuration = workspace.getConfiguration();
|
const configuration = workspace.getConfiguration();
|
||||||
const { triggerString, supportedLanguages = '*' } = configuration.AnyRule;
|
const { triggerString } = configuration.AnyRule;
|
||||||
const { length } = triggerString;
|
const { length } = triggerString;
|
||||||
const triggerStringStart = triggerString.substr(0, length - 1);
|
const triggerStringStart = triggerString.substr(0, length - 1);
|
||||||
const triggerStringEnd = triggerString.substr(-1);
|
const triggerStringEnd = triggerString.substr(-1);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
triggerStringStart, triggerStringEnd, triggerString, supportedLanguages
|
triggerStringStart, triggerStringEnd, triggerString, supportedLanguages: '*'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user