Syntax hightlighting for .astro files

Describe your feature request
So, it would be good if there is a way to implement syntax highlighting for .astro files.

What problem(s) would this feature solve?
Currently these .astro files does not have any syntax highlighting and is treated as text files.
These .astro files uses a very similar syntax highlighting to default html, css and js files.

Explain what you were trying to do when you came across the problem leading to this feature request
I am currently trying to use astro js which uses .astro files.

5 Likes

Hi @KyawThiha thanks for your post and welcome to the community!

It doesn’t exist at the moment so I’ve moved your post into feature requests. Please add any additional information from the questions into the original post (I’ve moved what you’ve already written)

2 Likes

Thanks for the quick reply.

2 Likes

I have added astro-ls to my .replit file but doesn’t seem to do much but add a “format file” option now for .astro files.

can I ask you how you configured .replit to get it to run the astro start up and also the build? thanks!

1 Like

There should be a template for astro:
https://replit.com/@RayhanADev/Astro-Blank?v=1

1 Like

Bump. Would still love Astro syntax highlighting :slightly_smiling_face:

I’m getting a 404 error from MiloCat’s astro template.
Made my own instead but .astro files still show up in plain text: https://replit.com/@shphrd/astro-htmx-tailwind?v=1

Thanks in advance!

1 Like

Is there any update on this? :slight_smile:

hi @IanAtCSTeach. is there an update with the feature request?

This is an ancient post, and Ian is no longer working at Replit. There is a slightly newer, more updated, feature request here:

Further more, there is a staff response on that topic about how to set up custom support for a highlighter, though they’d still need to implement it on their end: