Introducing tree‑sitter‑objectscript: High‑Performance Syntax Parsing for ObjectScript in Your Favorite Editors
I’m pleased to announce the release of tree-sitter-objectscript, a new open-source tree-sitter grammar that brings first-class ObjectScript support to modern editors. If you caught the preview at READY ’25, you’ll be glad to know it’s now up on Github:
https://github.com/intersystems/tree-sitter-objectscript
What Does It Provide?
- Fast & Precise Parsing: A powerful grammar for ObjectScript, enabling real-time syntax parsing, smart highlighting, and structural editing in modern code editors.
- Polyglot-Awareness: ObjectScript
.clsfiles often embed SQL, HTML, Python, JavaScript, JSON, CSS, XML, and Markdown. The grammar is designed to integrate with those seamlessly. - Multi-Editor Support: Works across multiple editors today, with others coming as tree-sitter adoption grows.
Supported Editors
We've been working with tree-sitter-objectscript and the following editors:
- Zed (zed.dev) – Available as a Zed Extension for ObjectScript
- Neovim (via nvim-treesitter) – Requires a little local lua configuration
- Emacs (29.1+) – A dedicated major mode for ObjectScript in Emacs
Screenshot (Zed)

(this is actually Zed on Windows with a Tokyo Night Storm theme).
We’re excited to see how the community uses this — feedback and ideas are always welcome!
Thanks!
Comments
Wow, thanks a lot, now we have something to work on.
Is there any contribution guide? I cloned the project and tried to build it locally, but it does not look so simple
+1 for more info about building and using.
So far I have succeeded in getting the tree-sitter playground working for the expr grammar:
_anim_preview.jpg)
My attempts to do the same with the core and udl grammars only give a blank screen there, and DevTools shows an error.
From the udl directory, you should be able to do tree-sitter build --wasm (I use emscripten on Windows via scoop rather than the docker tooling) followed by tree-sitter playground to test. As I mentioned to Dmitry, I'll add some notes about getting started with contributing, it's mostly per the tree-sitter parser development docs, but I've found a few things that help!
Best place to start is the documentation for developing tree-sitter grammars, you'll need the tree-sitter-cli tooling (via homebrew on the Mac, or scoop on Windows).
https://tree-sitter.github.io/tree-sitter/index.html
I tend to just use the tree-sitter tools directly as per the tree-sitter-cli documentation -- tree-sitter generate to process the grammar into the state machine, then tree-sitter build followed by tree-sitter playground for testing the grammar in the playground.
In the meantime, I will add a section on getting started with contributing to the README!
I know a bit about how to use tree-sitter, but npm install does not work in this project, and tests are failing
`npm install` should be working now, let me look at the tests, I think they've just gotten out of date. Note that there's a known issue in the core tests whereby tree-sitter seems to get stuck in a loop on zero-length token.
EDIT: Yes @John Murray it's the core grammar that has the zero-length token, not the expr one! (corrected).
I think the looping affects the core tests, not the expr ones.
https://github.com/intersystems/tree-sitter-objectscript/issues/8
I have added some notes on getting started to the README.
@David McCaldon - exciting news, thank you for the work on getting this released!
Thanks for this great contribution, @David McCaldon ! Could you please also publish at Open Exchange?
Great work @David McCaldon, looking forward to use it with Zed.
👏