Closed fbraennstroem closed 5 months ago
Hi, all the replacing happens because I haven't updated to the new bindings API yet; kinda no time on hand and I'd like to support the old way a little bit more.
It's not clear what you want to do with the parser, but if all you want to do is to use the highlighting in Emacs, it's probably good to add it to https://github.com/emacs-tree-sitter/tree-sitter-langs as you install it with https://emacs-tree-sitter.github.io/installation/; I'm just wing it here, have no actual experience with Emacs.
If you wanna do other stuff with it
the generate
command compiles the parser into a WASM file; so you can really use it almost everywhere.
I kept switching between the native and wasm (web assembly) implementations for the LSP server for performance considerations at the time (and the hope of supporting vscode)
you can look at the relevant diffs here: https://sourcegraph.com/search?q=context:global+type:diff+repo:%5Egithub%5C.com/FoamScience/foam-language-server%24+foam.wasm&patternType=keyword&sm=0 those files will provide an example JavaScript usage.
I also can point you to a Rust project https://github.com/foamscience/foam-highlighter using the parser.
There are also golang bindings; but I'm not sure if it's feasible to provide parser bindings for CommonLisp
Hi, thank you for your quick reply! Yes, for now I would just use it for syntax highlighting. I will look into the tree-sitter-emacs more. ... and I need to look more into it to understand the other things I could do with it. Thank you very much!
I'd be interested to see it used with Emacs; closing as it's not issue with the code. If you have any further Qs feel free to reopen.
yes, I will do it, though I need some time to understand tree-sitter better, thank you
Hi, I have a very basic tree-sitter question...
I am using
tree-sitter generate
within the cloned directory on a macos. The output isMay I ask, how to procede here? Maybe you have a hint!? Actually I am using emacs and not nvim, but I assume that I can somehow load these package.json files.