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",
|
||||
"default": "@zz",
|
||||
"description": "触发字符串"
|
||||
},
|
||||
"any-rule.supportedLanguages": {
|
||||
"type": "string",
|
||||
"default": "*, javascript, typescript, javascriptreact, typescriptreact, markdown, jsx, vue, html, json, plaintext, coffeescript",
|
||||
"description": "如果您的文件格式未被支持, 请在此处添加(⚡添加成功后需要重启vscode)"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -81,12 +81,12 @@ function insertRule(document: TextDocument, position: Position, ruleString: stri
|
||||
// 获取配置
|
||||
function getConfig() {
|
||||
const configuration = workspace.getConfiguration();
|
||||
const { triggerString, supportedLanguages = '*' } = configuration.AnyRule;
|
||||
const { triggerString } = configuration.AnyRule;
|
||||
const { length } = triggerString;
|
||||
const triggerStringStart = triggerString.substr(0, length - 1);
|
||||
const triggerStringEnd = triggerString.substr(-1);
|
||||
|
||||
return {
|
||||
triggerStringStart, triggerStringEnd, triggerString, supportedLanguages
|
||||
triggerStringStart, triggerStringEnd, triggerString, supportedLanguages: '*'
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user