From b896d1af49cf432e22a804c563c002c333eeb6b9 Mon Sep 17 00:00:00 2001 From: he1pa <18012015693@163.com> Date: Tue, 2 Apr 2024 18:45:51 +0800 Subject: [PATCH 1/2] feat: add kcl config file watcher Signed-off-by: he1pa <18012015693@163.com> --- package.json | 16 +++++++++++++++- src/extension.ts | 5 ++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a1d3f5a..09bdbfc 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,9 @@ "Programming Languages" ], "activationEvents": [ - "onLanguage:KCL" + "onLanguage:KCL", + "onLanguage:YAML", + "onLanguage:MOD" ], "main": "./out/extension.js", "scripts": { @@ -60,6 +62,18 @@ ".k" ], "configuration": "./language-configuration.json" + }, + { + "id": "YAML", + "extensions": [ + ".yaml" + ] + }, + { + "id": "MOD", + "extensions": [ + ".mod" + ] } ], "grammars": [ diff --git a/src/extension.ts b/src/extension.ts index 3482bb9..fbcc530 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -75,7 +75,10 @@ function startLanguageServerWith(language_server_path: string) { // Register the server for plain text documents documentSelector: [{ scheme: "file", language: "KCL" }], synchronize: { - fileEvents: vscode.workspace.createFileSystemWatcher("**/.k"), + fileEvents:[vscode.workspace.createFileSystemWatcher("**/*.k"), + vscode.workspace.createFileSystemWatcher("**/kcl.yaml"), + vscode.workspace.createFileSystemWatcher("**/kcl.mod"), + ] }, traceOutputChannel, }; From 86c12edde9c8d074ce6e5492a2b1c96eb4b17e22 Mon Sep 17 00:00:00 2001 From: he1pa <18012015693@163.com> Date: Wed, 3 Apr 2024 15:39:12 +0800 Subject: [PATCH 2/2] chore: bump to version v0.1.6 Signed-off-by: he1pa <18012015693@163.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 09bdbfc..28ee2ce 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "publisher": "kcl", "displayName": "KCL", "description": "Language extension for KCL", - "version": "0.1.5", + "version": "0.1.6", "engines": { "vscode": "^1.63.0" },