tree-sitter-kotlin
tree-sitter-kotlin copied to clipboard
Automate updating the playground's bundled tree-sitter version
Currently, the implementation has to be updated manually whenever the built language version of the parser is no longer compatible with the bundled tree-sitter version, otherwise the web app will fail to launch:
Uncaught (in promise) Error: Incompatible language version 14. Compatibility range 13 through 13.
setLanguage https://fwcd.dev/tree-sitter-kotlin/tree-sitter.js:1
handleLanguageChange https://fwcd.dev/tree-sitter-kotlin/playground.js:101
We'll have to adapt this to the new playground layout too. A script similar to the one used by tree-sitter-yaml's tree-sitter fork might be nice: https://github.com/ikatyang/tree-sitter/blob/fc5a692b7d5f144cc531f5823b1c5a3b2f06cf01/script/generate-playground.js