From 749eb07a1a04db6f2b98559c515fb8d8f9e88c39 Mon Sep 17 00:00:00 2001 From: David Barbet Date: Tue, 4 Jun 2024 16:25:38 -0700 Subject: [PATCH 1/2] Add tsx/jsx as recognized extensions --- src/LanguageServer/Protocol/LanguageInfoProvider.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/LanguageServer/Protocol/LanguageInfoProvider.cs b/src/LanguageServer/Protocol/LanguageInfoProvider.cs index 755f9b706fddb..523dd5fde32e0 100644 --- a/src/LanguageServer/Protocol/LanguageInfoProvider.cs +++ b/src/LanguageServer/Protocol/LanguageInfoProvider.cs @@ -34,6 +34,8 @@ internal class LanguageInfoProvider : ILanguageInfoProvider { ".xaml", s_xamlLanguageInformation }, { ".ts", s_typeScriptLanguageInformation }, { ".js", s_typeScriptLanguageInformation }, + { ".tsx", s_typeScriptLanguageInformation }, + { ".jsx", s_typeScriptLanguageInformation }, }; public LanguageInformation GetLanguageInformation(string documentPath, string? lspLanguageId) From 91d0bc77893eb1930e04aca5a8e5ff1bc3ddab02 Mon Sep 17 00:00:00 2001 From: David Barbet Date: Wed, 5 Jun 2024 11:07:00 -0700 Subject: [PATCH 2/2] Add additional paths for TS language info --- src/LanguageServer/Protocol/LanguageInfoProvider.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/LanguageServer/Protocol/LanguageInfoProvider.cs b/src/LanguageServer/Protocol/LanguageInfoProvider.cs index 523dd5fde32e0..e7697ddd0573f 100644 --- a/src/LanguageServer/Protocol/LanguageInfoProvider.cs +++ b/src/LanguageServer/Protocol/LanguageInfoProvider.cs @@ -33,9 +33,13 @@ internal class LanguageInfoProvider : ILanguageInfoProvider { ".razor", s_razorLanguageInformation }, { ".xaml", s_xamlLanguageInformation }, { ".ts", s_typeScriptLanguageInformation }, - { ".js", s_typeScriptLanguageInformation }, + { ".d.ts", s_typeScriptLanguageInformation }, { ".tsx", s_typeScriptLanguageInformation }, + { ".js", s_typeScriptLanguageInformation }, { ".jsx", s_typeScriptLanguageInformation }, + { ".cjs", s_typeScriptLanguageInformation }, + { ".mjs", s_typeScriptLanguageInformation }, + { ".cts", s_typeScriptLanguageInformation }, }; public LanguageInformation GetLanguageInformation(string documentPath, string? lspLanguageId)