Skip to content

Commit

Permalink
feat(vscode-pv-handlebars-language-server): support assemble layout f…
Browse files Browse the repository at this point in the history
…iles being placed in /templates/ instead of /layouts/
  • Loading branch information
mbehzad committed Jun 25, 2024
1 parent 9c5a8fb commit e439f77
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ export async function definitionProvider(
? `${filePath.split("/frontend/src/components")[0]}/frontend/src/components`
: filePath.includes("src/pages/")
? `${filePath.split("/frontend/src/pages")[0]}/frontend/src/components`
: `${filePath.split("/frontend/src/layouts")[0]}/frontend/src/components`;
: filePath.includes("src/layouts/")
? `${filePath.split("/frontend/src/layouts")[0]}/frontend/src/components`
: `${filePath.split("/frontend/src/templates")[0]}/frontend/src/components`;

// e.g. {{> partial
if (isPartial(textBefore)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ export function isPVArchetype(templatePath: string): boolean {
return (
templatePath.includes("/frontend/src/components") ||
templatePath.includes("/frontend/src/pages") ||
templatePath.includes("/frontend/src/layouts")
templatePath.includes("/frontend/src/layouts") ||
templatePath.includes("/frontend/src/templates")
);
}

Expand Down

0 comments on commit e439f77

Please sign in to comment.