From 212e24f4dbddca9d08ec35a1d2a6ce8005c8ddab Mon Sep 17 00:00:00 2001 From: RedCMD <33529441+RedCMD@users.noreply.github.com> Date: Tue, 6 Feb 2024 03:56:16 +1300 Subject: [PATCH] Enable json language support for `code-snippets` files (#204090) * Enable json language support for `code-snippets` files * fix * snippets as a known language to the json language server --------- Co-authored-by: Martin Aeschlimann --- .../json-language-features/client/src/languageParticipants.ts | 2 ++ extensions/json-language-features/package.json | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/extensions/json-language-features/client/src/languageParticipants.ts b/extensions/json-language-features/client/src/languageParticipants.ts index 6bd1a086e0a..7748d42589b 100644 --- a/extensions/json-language-features/client/src/languageParticipants.ts +++ b/extensions/json-language-features/client/src/languageParticipants.ts @@ -40,8 +40,10 @@ export function getLanguageParticipants(): LanguageParticipants { languages = new Set(); languages.add('json'); languages.add('jsonc'); + languages.add('snippets'); comments = new Set(); comments.add('jsonc'); + comments.add('snippets'); for (const extension of extensions.allAcrossExtensionHosts) { const jsonLanguageParticipants = extension.packageJSON?.contributes?.jsonLanguageParticipants as LanguageParticipantContribution[]; diff --git a/extensions/json-language-features/package.json b/extensions/json-language-features/package.json index 33d2bbb09bd..541106ae1a0 100644 --- a/extensions/json-language-features/package.json +++ b/extensions/json-language-features/package.json @@ -15,7 +15,8 @@ "icon": "icons/json.png", "activationEvents": [ "onLanguage:json", - "onLanguage:jsonc" + "onLanguage:jsonc", + "onLanguage:snippets" ], "main": "./client/out/node/jsonClientMain", "browser": "./client/dist/browser/jsonClientMain",