4 ms·
AFAIK Neovim 0.5 uses tree-sitter. Is there any effort to integrate tree-sitter with Emacs in an easy way?
by yewenjie 5y ago
AFAIK Neovim 0.5 uses tree-sitter. Is there any effort to integrate tree-sitter with Emacs in an easy way?
- ywei3410 5y agoSort of. The integration needs to be done per-language, though helper packages like emacs-tree-sitter [1] exist. Afaik, C# mode currently uses it [2] though I'm not sure whether any other languages use it yet. [1] https://github.com/ubolonton/emacs-tree-sitter https://github.com/ubolonton/emacs-tree-sitter [2] https://github.com/emacs-csharp/csharp-mode/blob/master/csharp-tree-sitter.el https://github.com/emacs-csharp/csharp-mode/blob/master/csha...
- fmakunbound 5y agoEmacs already has Semantic https://www.gnu.org/software/emacs/manual/html_mono/semantic.html https://www.gnu.org/software/emacs/manual/html_mono/semantic... which seems similar in functionality. It’s been around for ages but more recently it has become part of Emacs proper.
- b3morales 5y agoSemantic is pretty cool. The advantage that Treesitter has (shared with LSP servers) is that it's client-agnostic. So while no one besides fellow Emacs users are going to hack on the Semantic parser for a given language, Treesitter can potentially draw help from users of any editor, or even people doing other things like building analysis tools.
- cjohansson 5y agoSemantic is used less and less I would say, there is not enough people involved in keeping it and it's grammars updated, it also suffers lack of asychronicity. Tree-sitter and LSP has the advantage of re-using code for multiple editors