mirror of
https://github.com/any86/any-rule.git
synced 2025-07-14 15:38:58 +08:00
refactor: 所有文件都支持"zz."
This commit is contained in:
parent
dbb58a1ed3
commit
a16608c3e5
10
package.json
10
package.json
@ -80,13 +80,7 @@
|
||||
"onCommand:extension.rule58",
|
||||
"onCommand:extension.rule59",
|
||||
"onCommand:extension.rule60",
|
||||
"onLanguage:html",
|
||||
"onLanguage:vue",
|
||||
"onLanguage:jsx",
|
||||
"onLanguage:js",
|
||||
"onLanguage:mjs",
|
||||
"onLanguage:ts",
|
||||
"onLanguage:plaintext"
|
||||
"*"
|
||||
],
|
||||
"main": "./out/extension.js",
|
||||
"contributes": {
|
||||
@ -377,4 +371,4 @@
|
||||
"dependencies": {
|
||||
"transliteration": "^2.1.8"
|
||||
}
|
||||
}
|
||||
}
|
@ -6,7 +6,7 @@ import { COMPLETION_TRIGGER_ID } from './constant';
|
||||
export default function (context: ExtensionContext, RULES: Rule[]) {
|
||||
// commands.registerCommand('functions.insertRegex', insertRule);
|
||||
|
||||
const disposable = languages.registerCompletionItemProvider('plaintext', {
|
||||
const disposable = languages.registerCompletionItemProvider('*', {
|
||||
provideCompletionItems(document, position) {
|
||||
const linePrefix = document.lineAt(position).text.substr(0, position.character);
|
||||
if (!linePrefix.endsWith(COMPLETION_TRIGGER_ID)) return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user