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

Dynamic sublanguages (injections) #717

Open
arbrauns opened this issue May 17, 2024 · 0 comments
Open

Dynamic sublanguages (injections) #717

arbrauns opened this issue May 17, 2024 · 0 comments

Comments

@arbrauns
Copy link
Contributor

arbrauns commented May 17, 2024

Some languages support arbitrary sublanguages inside tagged code blocks, for example some python code inside this Markdown text:

print("Hello world!")

It would be great if difft supported such tags and used the correct sublanguage parser for the code blocks. My specific usecase is Typst, which has the same code block syntax as Markdown but also a lot more features that make a tree-sitter parser very useful.

There seems to be a (semi-?)standard way of specifying these sublanguage blocks, injection queries.

@arbrauns arbrauns changed the title Dynamic sublanguages Dynamic sublanguages (injections) May 17, 2024
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

1 participant