Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions .changeset/four-pens-worry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro-vscode': patch
---

Improves astro file templates to be scoped to `.astro` file extensions
1 change: 1 addition & 0 deletions packages/language-tools/vscode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Provides language support for `.astro` files. This extension is powered by the [
- [Go to Definition](https://code.visualstudio.com/docs/editor/editingevolved#_go-to-definition), [Go to Type Definition](https://code.visualstudio.com/docs/editor/editingevolved#_go-to-type-definition), [Go to Implementation](https://code.visualstudio.com/docs/editor/editingevolved#_go-to-implementation) etc
- [Inlay hints](https://code.visualstudio.com/docs/editor/editingevolved#_inlay-hints)
- [Code folding](https://code.visualstudio.com/docs/editor/codebasics#_folding)
- [Snippets & File Templates](https://code.visualstudio.com/docs/editing/userdefinedsnippets)
- and more!

A TypeScript plugin adding support for importing and exporting Astro components inside JavaScript and TypeScript files is also included.
Expand Down
3 changes: 3 additions & 0 deletions packages/language-tools/vscode/languages/astro.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"</html>",
],
"description": "Page with full HTML",
"include": "*.astro",
},
"page_layout": {
"prefix": "page_layout",
Expand All @@ -36,12 +37,14 @@
"</$1>",
],
"description": "Page from Layout",
"include": "*.astro",
},
"component": {
"prefix": "component",
"isFileTemplate": true,
"scope": "astro",
"body": ["---", "$1", "---", "", "$0"],
"description": "Component",
"include": "*.astro",
},
}
Loading