Skip to content

Add basic syntax highlighting for .astro files - #1084

Merged
AmethystLiang merged 1 commit into
mainfrom
add-astro-syntax-highlighting
Apr 25, 2026
Merged

AmethystLiang merged 1 commit into
mainfrom
add-astro-syntax-highlighting

Conversation

@AmethystLiang

Copy link
Copy Markdown
Contributor

Summary

  • Maps .astro to Monaco's html language id in language-detect.ts, matching how .vue and .svelte are already handled.
  • Astro files now get HTML-level coloring (tags, attributes, strings) instead of rendering as plain text.

Context

A user asked about improving IDE support for Vue/Astro (formatting, linting, highlighting). Proper SFC-aware highlighting — frontmatter TypeScript, template expressions, <script lang=\"ts\"> sections — needs a Monarch grammar or LSP. That's tracked in a separate issue; this PR is the cheap one-line win.

Test plan

  • Open an .astro file in the editor and confirm HTML-style coloring appears
  • Confirm .vue / .svelte behavior is unchanged

Maps .astro to Monaco's html language id, matching the existing
treatment of .vue and .svelte. This gives Astro files HTML-level
coloring instead of plain text. Proper SFC-aware highlighting
(frontmatter TS, template expressions) would require a Monarch
grammar — tracked separately.
@AmethystLiang
AmethystLiang merged commit 5f1161b into main Apr 25, 2026
3 checks passed
@AmethystLiang
AmethystLiang deleted the add-astro-syntax-highlighting branch April 25, 2026 20:23
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
Maps .astro to Monaco's html language id, matching the existing
treatment of .vue and .svelte. This gives Astro files HTML-level
coloring instead of plain text. Proper SFC-aware highlighting
(frontmatter TS, template expressions) would require a Monarch
grammar — tracked separately.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant