Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I add support for other file extensions? #7

Open
s-varenia opened this issue May 21, 2023 · 2 comments
Open

How can I add support for other file extensions? #7

s-varenia opened this issue May 21, 2023 · 2 comments

Comments

@s-varenia
Copy link

How can I add support for other file extensions? For example, the file extension PUG (jade). I can see that the highlight recognizes the Alpine syntax perfectly, when I select the HTML language in language mode. What do I need to change in package.json to make Alpinejs Syntax Highlight work with .pug files?

@s-varenia
Copy link
Author

I think I found the solution by editing two files:
In the package.json file I added "text.pug" to array "injectTo"

				"injectTo": [
					"text.html.derivative",
					"text.html.php",
					"text.html.twig",
					"text.pug"
				],

In the syntaxes/injection.json file I added "L:text.pug" to arrey "injectionSelector"

	"injectionSelector": ["L:text.html.derivative", "L:text.html.php", "L:text.html.twig", "L:text.pug"],

@djmtype
Copy link

djmtype commented Feb 5, 2024

Unfortunately, @s-varenia that didn't seem to work with astro files. I tried adding text.astro and text.html.astro

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

No branches or pull requests

2 participants