Menci / monaco-tree-sitter

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

using non-standard grammar #20

Open vzaliva opened 1 month ago

vzaliva commented 1 month ago

I have a tree-sitter grammar for a language https://github.com/rems-project/tree-sitter-core

How can I use it? Apparently,, copying the wasm file is not enough. Do I need to copy files generated under bindings/node/ somewhere? Or perhaps I could somehow refer to the git repository as an extra dependency? Thanks!

vzaliva commented 1 month ago

To clarify, I am interested in highlighting, and my question is about grammar as in the following statement in the example:

onst language = new Language(require("monaco-tree-sitter/grammars/cpp"));

In my case, the language is not cpp. It is core for which I gave a custom tree-sitter grammar.