Syntax highlighting for HTML files #29

Closed
opened 2023-08-12 18:06:28 +00:00 by joshamaju · 2 comments
joshamaju commented 2023-08-12 18:06:28 +00:00 (Migrated from github.com)

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

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 <img width="1160" alt="Screenshot 2023-08-12 at 18 57 52" src="https://github.com/sublimelsp/LSP-svelte/assets/127889846/4a2aaa4f-a25b-4d19-8d2e-7f1586a6e099"> <img width="634" alt="Screenshot 2023-08-12 at 18 59 19" src="https://github.com/sublimelsp/LSP-svelte/assets/127889846/797ba687-fc1a-44e0-bafc-3b19a8cf5de1"> Any help will be appreciated
corneliusio commented 2023-08-14 21:51:21 +00:00 (Migrated from github.com)

@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 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](https://packagecontrol.io/packages/Project%20Specific%20Syntax%20Settings). I haven't used this plugin in a while, but I assume it's still working. Hope that helps!
joshamaju commented 2023-08-21 20:20:24 +00:00 (Migrated from github.com)

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

Just started using sublime, still trying to find my way around it. That actually solved it, Thank you.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
repos/svelte-sublime#29
No description provided.