Skip to content

Conversation

@infomiho
Copy link

@infomiho infomiho commented Jan 9, 2026

I needed support for Literate Haskell for my lectures, so I first made a separate extension, but then I realize this can actually be used as part of the Haskell extension.

I've found an existing Literate Haskell tree-sitter grammar: https://github.com/LaurentRDC/tree-sitter-haskell-literate

I've employed Claude Code to analyze existing extensions and how it could embed Haskell syntax highlighting in lhs code blocks. It supports "bird" syntax, Latex code block and a Markdown style code block.

SCR-20260109-jsdk

Tested it locally with my lectures - it works well:
SCR-20260109-jrln

@cla-bot
Copy link

cla-bot bot commented Jan 9, 2026

We require contributors to sign our Contributor License Agreement, and we don't have @infomiho on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@infomiho
Copy link
Author

infomiho commented Jan 9, 2026

@cla-bot check

@cla-bot cla-bot bot added the cla-signed label Jan 9, 2026
@cla-bot
Copy link

cla-bot bot commented Jan 9, 2026

The cla-bot has been summoned, and re-checked this pull request!

Copy link
Contributor

@MrSubidubi MrSubidubi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! I think it is fine to have (although somewhat of a niece use case), left two comments and then we should be good 🙂

[language_servers.hls]
name = "Haskell Language Server"
languages = ["Haskell", "Cabal"]
languages = ["Haskell", "Cabal", "Literate Haskell"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this is a good idea? Did a quick check and https://discourse.haskell.org/t/hls-visual-studio-code-whats-so-great-about-it/4181/16 would suggest otherwise, but that is a bit older, so perhaps I am missing context?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to have injections for LaTeX / Mardown as well? Or would that not work/break other things?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants