corneliusio / svelte-sublime

💡Sublime Text syntax highlighting for Svelte components
MIT License
59 stars 6 forks source link

Syntax highlighting for HTML files #29

Closed joshamaju closed 1 year ago

joshamaju commented 1 year ago

How can I enable Svelte syntax highlighting for HTML files. I've tried setting the file syntax using the language menu at the bottom, but that doesn't work across all files in a project.

And it doesn't show up in the package settings just like LSP language server and other packages show up

Screenshot 2023-08-12 at 18 57 52 Screenshot 2023-08-12 at 18 59 19

Any help will be appreciated

corneliusio commented 1 year ago

@joshamaju This is a core Sublime Text feature and not part of the plugin functionality. It's easy to miss, but when looking at View > Syntax in the menu the very first/top option is Open all with current extension as.... This is where you'll want to select Svelte as the preferred syntax. This should apply to all .html files across ALL projects. If you want something that is only configured for a single project, you'll need a plugin called Project Specific Syntax Settings. I haven't used this plugin in a while, but I assume it's still working.

Hope that helps!

joshamaju commented 1 year ago

Just started using sublime, still trying to find my way around it. That actually solved it, Thank you.