mirror of
https://github.com/any86/any-rule.git
synced 2025-07-14 07:38:58 +08:00
fix: 修复新版vocode中"@zz"不能唤起的BUG(#195)
This commit is contained in:
parent
80f68ddec7
commit
5f3887343a
@ -48,6 +48,11 @@
|
||||
"type": "string",
|
||||
"default": "@zz",
|
||||
"description": "触发字符串"
|
||||
},
|
||||
"any-rule.supportedLanguages": {
|
||||
"type": "string",
|
||||
"default": "*,javascript,javascriptreact,typescript,typescriptreact,vue,vue-postcss,vue-sugarss,vue-html,json,jsonc,graphql,dart,sql,go,java,php,jade,python,swift,markdown",
|
||||
"description": "支持的开发语言(用','分割)"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -368,4 +373,4 @@
|
||||
"axios": "^0.19.2",
|
||||
"transliteration": "^2.1.8"
|
||||
}
|
||||
}
|
||||
}
|
@ -87,16 +87,16 @@ function insertRule(document: TextDocument, position: Position, ruleString: stri
|
||||
// 获取配置
|
||||
function getConfig() {
|
||||
const configuration = workspace.getConfiguration();
|
||||
const { triggerString } = configuration['any-rule'];
|
||||
const { triggerString, supportedLanguages } = configuration['any-rule'];
|
||||
const { length } = triggerString;
|
||||
const triggerStringStart = triggerString.substr(0, length - 1);
|
||||
const triggerStringEnd = triggerString.substr(-1);
|
||||
|
||||
console.log(supportedLanguages);
|
||||
return {
|
||||
triggerStringStart,
|
||||
triggerStringEnd,
|
||||
triggerString,
|
||||
// 预留
|
||||
supportedLanguages: '*'
|
||||
supportedLanguages
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user