From fb221108834e847262951694934d325937faec1e Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Mon, 4 Aug 2025 11:05:40 -0700 Subject: [PATCH 1/2] Handle .txx headers. --- Extension/src/LanguageServer/client.ts | 2 +- Extension/src/common.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Extension/src/LanguageServer/client.ts b/Extension/src/LanguageServer/client.ts index 0f14b8fd7..79bde74f0 100644 --- a/Extension/src/LanguageServer/client.ts +++ b/Extension/src/LanguageServer/client.ts @@ -2647,7 +2647,7 @@ export class DefaultClient implements Client { }); // TODO: Handle new associations without a reload. - this.associations_for_did_change = new Set(["cu", "cuh", "c", "i", "cpp", "cc", "cxx", "c++", "cp", "hpp", "hh", "hxx", "h++", "hp", "h", "ii", "ino", "inl", "ipp", "tcc", "idl"]); + this.associations_for_did_change = new Set(["cu", "cuh", "c", "i", "cpp", "cc", "cxx", "c++", "cp", "hpp", "hh", "hxx", "h++", "hp", "h", "ii", "ino", "inl", "ipp", "tcc", "txx", "idl"]); const assocs: any = new OtherSettings().filesAssociations; for (const assoc in assocs) { const dotIndex: number = assoc.lastIndexOf('.'); diff --git a/Extension/src/common.ts b/Extension/src/common.ts index 4ce922d28..9e6ae494b 100644 --- a/Extension/src/common.ts +++ b/Extension/src/common.ts @@ -165,7 +165,7 @@ export function getVcpkgRoot(): string { export function isHeaderFile(uri: vscode.Uri): boolean { const fileExt: string = path.extname(uri.fsPath); const fileExtLower: string = fileExt.toLowerCase(); - return !fileExt || [".cuh", ".hpp", ".hh", ".hxx", ".h++", ".hp", ".h", ".inl", ".ipp", ".tcc", ".tlh", ".tli", ""].some(ext => fileExtLower === ext); + return !fileExt || [".cuh", ".hpp", ".hh", ".hxx", ".h++", ".hp", ".h", ".inl", ".ipp", ".tcc", ".txx", ".tlh", ".tli", ""].some(ext => fileExtLower === ext); } export function isCppFile(uri: vscode.Uri): boolean { From 265de0da503dc2f4297986f50607ee84e374b91d Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Mon, 4 Aug 2025 12:53:05 -0700 Subject: [PATCH 2/2] Add tpp too. --- Extension/src/LanguageServer/client.ts | 2 +- Extension/src/common.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Extension/src/LanguageServer/client.ts b/Extension/src/LanguageServer/client.ts index 79bde74f0..cb1e31f14 100644 --- a/Extension/src/LanguageServer/client.ts +++ b/Extension/src/LanguageServer/client.ts @@ -2647,7 +2647,7 @@ export class DefaultClient implements Client { }); // TODO: Handle new associations without a reload. - this.associations_for_did_change = new Set(["cu", "cuh", "c", "i", "cpp", "cc", "cxx", "c++", "cp", "hpp", "hh", "hxx", "h++", "hp", "h", "ii", "ino", "inl", "ipp", "tcc", "txx", "idl"]); + this.associations_for_did_change = new Set(["cu", "cuh", "c", "i", "cpp", "cc", "cxx", "c++", "cp", "hpp", "hh", "hxx", "h++", "hp", "h", "ii", "ino", "inl", "ipp", "tcc", "txx", "tpp", "idl"]); const assocs: any = new OtherSettings().filesAssociations; for (const assoc in assocs) { const dotIndex: number = assoc.lastIndexOf('.'); diff --git a/Extension/src/common.ts b/Extension/src/common.ts index 9e6ae494b..44b492678 100644 --- a/Extension/src/common.ts +++ b/Extension/src/common.ts @@ -165,7 +165,7 @@ export function getVcpkgRoot(): string { export function isHeaderFile(uri: vscode.Uri): boolean { const fileExt: string = path.extname(uri.fsPath); const fileExtLower: string = fileExt.toLowerCase(); - return !fileExt || [".cuh", ".hpp", ".hh", ".hxx", ".h++", ".hp", ".h", ".inl", ".ipp", ".tcc", ".txx", ".tlh", ".tli", ""].some(ext => fileExtLower === ext); + return !fileExt || [".cuh", ".hpp", ".hh", ".hxx", ".h++", ".hp", ".h", ".inl", ".ipp", ".tcc", ".txx", ".tpp", ".tlh", ".tli", ""].some(ext => fileExtLower === ext); } export function isCppFile(uri: vscode.Uri): boolean {