Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Extension/src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,19 +165,19 @@ 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", ".ii", ".inl", ".idl", ""].some(ext => fileExtLower === ext);
return !fileExt || [".cuh", ".hpp", ".hh", ".hxx", ".h++", ".hp", ".h", ".inl", ".ipp", ".tcc", ".tlh", ".tli", ""].some(ext => fileExtLower === ext);
}

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

export function isCFile(uri: vscode.Uri): boolean {
const fileExt: string = path.extname(uri.fsPath);
const fileExtLower: string = fileExt.toLowerCase();
return (fileExt === ".C") || fileExtLower === ".c";
return fileExt === ".c" || fileExtLower === ".i";
}

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