Replies: 1 comment 5 replies
-
It's possible to do this with tree-sitter injections https://tree-sitter.github.io/tree-sitter/syntax-highlighting#language-injection but that typically needs some kind of marker like code fences in markdown. If HTML is recognizable within Go like other languages are in markdown, that could be added to I expect that the ability to set injections manually would take much larger changes though - I'm not sure it's possible to add that without some really large changes in core. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Would the option to select a block of text and set it as a different language be on the cards? It's highly beneficial for languages like
go
that utiliseHTML
templates. I'm finding that there's a clash when I switch toHTML
and then back togo
when I'm doing some work.This could also become a standard expectation, as I had assumed it followed the same behaviour as
:reflow
. If you think I should file this as an enhancement instead of an idea, I'll do so when I can.Thanks for reading!
Beta Was this translation helpful? Give feedback.
All reactions