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

Lexer for VHS #690

Merged
merged 2 commits into from Oct 28, 2022
Merged

Lexer for VHS #690

merged 2 commits into from Oct 28, 2022

Conversation

maaslalani
Copy link
Contributor

@maaslalani maaslalani commented Oct 27, 2022

Hi! We recently (today) launched a new project called VHS which involves a custom scripting language / DSL for input: https://github.com/charmbracelet/vhs

There were some requests to add a Chroma lexer for it so that you could do syntax highlighting. So, I've made a PR for the (simple) grammar.

We also have a tree-sitter grammar available here: https://github.com/charmbracelet/tree-sitter-vhs

Totally understand if you are not able to merge this lexer until the language becomes more widely used! Thank you for making Chroma!

@alecthomas
Copy link
Owner

alecthomas commented Oct 28, 2022

I'm happy to accept any lexers, but would mind making it an XML lexer please? The conversion should be straightforward.

@alecthomas
Copy link
Owner

VHS looks cool, I have some uses for that :)

@maaslalani
Copy link
Contributor Author

I'm happy to accept any lexers, but would mind making it an XML lexer please? The conversion should be straightforward.

Hey, yes of course! I will do that today!

@jolheiser
Copy link
Contributor

@maaslalani Is this all of the keywords/names? Just wondering because I see a few more in
https://github.com/charmbracelet/vhs/blob/2bf729bd02d40c5a68f4db11b622038b0f4f4c66/token.go#L65-L100

@maaslalani
Copy link
Contributor Author

Ah good catch @jolheiser I definitely missed a few, I will add them in the XML lexer! Thanks!

@maaslalani
Copy link
Contributor Author

@alecthomas Switched over to XML parsers, thanks for the great project!

@alecthomas alecthomas merged commit f0bac8c into alecthomas:master Oct 28, 2022
@alecthomas
Copy link
Owner

Merged, thanks.

@maaslalani maaslalani deleted the vhs branch October 28, 2022 21:55
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

Successfully merging this pull request may close these issues.

None yet

4 participants