-
-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tree-sitter integration #395
Comments
EDIT: Actually scratch using node-tree-sitter, it uses a native (C++) extension with node-gyp and Deno won't ever support that. Looks Deno supports FFI with Rust though with deno_bindgen. Need to think/prototype on this more. I don't want to depend on Node.js so node-tree-sitter is off the table. I'm writing a prototype to use Deno/denops.vim to use npm to download grammars, and Node.js or Deno to build/generate the parser from that. I'm currently tinkering around with some proposed space-vim layers (nodejs, rustc, denops, tree-sitter layers) to get tree-sitter parsing and that usable by Vim plugins including vista.vim. All in a zero-install and built-from-source way for the end-user. Using the tree-sitter rust bindings in an external rust binary could possibly be a better performing alternative to Deno/denops (Rust/WASM) interface with tree-sitter, but that is out of reach for me to prototype. I should look at vim-clap Rust/vimscript implementation. |
Cool, keep up the great work. denops.vim looks interesting. Unfortunately, I don't have much time for these side projects recently, the long-term goal(which may never be able to be realized) is to support writing plugins in Rust that works for both Vim and Neovim, but the communication between Vim and Rust in vim-clap is quite limited at present, and there is a lot of room to improve in various places, so vim-clap can do many things in a non-ideal way, don't expect it's well-designed :D Some popular Rust-based editor projects are already using the tree sitter (https://github.com/lapce/lapce, https://github.com/helix-editor/helix), theoretically, a lot of goodness in these projects can be easily reused in Vim/NeoVim if using Rust, though they're made to be the next generation of editors. |
tree-sitter/tree-sitter#1042
And an external binary is planned. Feel free to drop any ideas about the tree-sitter integration.
The text was updated successfully, but these errors were encountered: