Menci / monaco-tree-sitter

Highlight your Monaco Editor with tree-sitter grammar.
MIT License
35 stars 7 forks source link

vite bundler + monaco editor + tree-sitter parser #12

Open milahu opened 3 years ago

milahu commented 3 years ago

see my vite-plugin-tree-sitter

cos webpack is soooo old ; ) vite allows faster development with hot module reload of ESM modules

not tested in production mode → copy wasm files to /dist

by default, tree-sitter will request /tree-sitter.wasm → ideally, use relative paths, for gh-pages etc

not tested with grammars from npm → no need to compile wasm file, only serve

i needed a way to install tree-sitter grammars from source for example tree-sitter-nix has no npm release with prebuilt wasm file

im using the same build command as tree-sitter build