Skip to content

Commit b73353f

Browse files
authored
Fix some file association (#13455)
1 parent 799f0b3 commit b73353f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Extension/src/common.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -165,19 +165,19 @@ export function getVcpkgRoot(): string {
165165
export function isHeaderFile(uri: vscode.Uri): boolean {
166166
const fileExt: string = path.extname(uri.fsPath);
167167
const fileExtLower: string = fileExt.toLowerCase();
168-
return !fileExt || [".cuh", ".hpp", ".hh", ".hxx", ".h++", ".hp", ".h", ".ii", ".inl", ".idl", ""].some(ext => fileExtLower === ext);
168+
return !fileExt || [".cuh", ".hpp", ".hh", ".hxx", ".h++", ".hp", ".h", ".inl", ".ipp", ".tcc", ".tlh", ".tli", ""].some(ext => fileExtLower === ext);
169169
}
170170

171171
export function isCppFile(uri: vscode.Uri): boolean {
172172
const fileExt: string = path.extname(uri.fsPath);
173173
const fileExtLower: string = fileExt.toLowerCase();
174-
return (fileExt === ".C") || [".cu", ".cpp", ".cc", ".cxx", ".c++", ".cp", ".ino", ".ipp", ".tcc"].some(ext => fileExtLower === ext);
174+
return (fileExt === ".C") || [".cu", ".cpp", ".cc", ".cxx", ".c++", ".cp", ".ii", ".ino"].some(ext => fileExtLower === ext);
175175
}
176176

177177
export function isCFile(uri: vscode.Uri): boolean {
178178
const fileExt: string = path.extname(uri.fsPath);
179179
const fileExtLower: string = fileExt.toLowerCase();
180-
return (fileExt === ".C") || fileExtLower === ".c";
180+
return fileExt === ".c" || fileExtLower === ".i";
181181
}
182182

183183
export function isCppOrCFile(uri: vscode.Uri | undefined): boolean {

0 commit comments

Comments
 (0)