Skip to content

Tree sitter demo#1250

Closed
peconia wants to merge 4 commits into
mainfrom
tree-sitter-demo
Closed

Tree sitter demo#1250
peconia wants to merge 4 commits into
mainfrom
tree-sitter-demo

Conversation

@peconia

@peconia peconia commented Oct 1, 2025

Copy link
Copy Markdown
Contributor

This is a proof of concept PR, absolutely not ready to merge 😅

This adds web-tree-sitter library with python language .wasm to use a tree sitter to analyze any python code for errors, and show a "friendly" error message for some common issues. The wasm files are served from this server so had to edit webpack config slightly. We could get these from a CDN or somewhere else too, just for this demo it seemed simpler to serve them from the same project.

The benefit of tree sitter is that it is very fast, as it only evaluates the new code as you type rather than has to redo the whole thing. the negative is that parsing a clean looking error message is not that straightforward, and can be brittle.

error.highlight.demo.mp4

TODO:

  • make all the messages translatable and make them more helpful to learners
  • cover more error scenarios and improve which parts of code get highlighted
  • clean up vibe code 😂

@peconia
peconia temporarily deployed to previews/1250/merge October 1, 2025 16:30 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions Bot added the Stale label Jan 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR was closed because it has been open for more than 30 days with no activity.

@github-actions github-actions Bot closed this Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant