Build time code block syntax highlighting #4

Open
opened 2025-08-05 01:55:26 +00:00 by Pagwin · 0 comments
Owner

At the moment for syntax highlighting in code blocks the best solution when using psb is a frontend javascript library, however treesitter exists and ideally it will be used instead

There are 2 options on that front

  1. There's The Treesitter Haskell Bindings which haven't been touched in a year and where I'm uncertain of whether they're up to date
  2. I could make my own bindings

There is a middle option of making some noise to update those bindings which should also be considered

Regardless of my choice I'll then need to figure out how to make use of tree sitter's output for this, maybe Neovim's code can be used as an example, hard to say.

At the moment for syntax highlighting in code blocks the best solution when using psb is a frontend javascript library, however treesitter exists and ideally it will be used instead There are 2 options on that front 1. There's [The Treesitter Haskell Bindings](https://github.com/tree-sitter/haskell-tree-sitter) which haven't been touched in a year and where I'm uncertain of whether they're up to date 2. I could make my own bindings There is a middle option of making some noise to update those bindings which should also be considered Regardless of my choice I'll then need to figure out how to make use of tree sitter's output for this, maybe Neovim's code can be used as an example, hard to say.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Pagwin/psb#4
No description provided.