diff --git a/package.json b/package.json index dc849591..9c37a75f 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,8 @@ "virtualWorkspaces": true }, "activationEvents": [ - "onLanguage:yaml" + "onLanguage:yaml", + "onLanguage:dockercompose" ], "keywords": [ "kubernetes", diff --git a/src/extension.ts b/src/extension.ts index 99b33718..37e2cc97 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -107,7 +107,7 @@ export function startClient( // Options to control the language client const clientOptions: LanguageClientOptions = { // Register the server for on disk and newly created YAML documents - documentSelector: [{ language: 'yaml' }], + documentSelector: [{ language: 'yaml' }, { language: 'dockercompose' }, { pattern: '*.y(a)ml' }], synchronize: { // Notify the server about file changes to YAML and JSON files contained in the workspace fileEvents: [workspace.createFileSystemWatcher('**/*.?(e)y?(a)ml'), workspace.createFileSystemWatcher('**/*.json')],