Make use of tree-sitter's incremental parsing
See original GitHub issueTree-sitter supports incremental parsing, which can be accessed via tree.edit
. But {Syntax Highlighter} just parse the code and generate a new tree every time. This will lost the efficiency advantage from tree-sitter.
Also, instad of rebuild every time, buildDecor
should be done incrementally.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Tree-sitter|Introduction
Tree-sitter is a parser generator tool and an incremental parsing library. It can build a concrete syntax tree for a source file and...
Read more >Introductory to Treesitter - Teknologi Umum
Tree-sitter is a parser generator tool and an incremental parsing library. It can build a concrete syntax tree for a source file and...
Read more >Tree-sitter: an incremental parsing system for programming tools
The parsing is fast enough to run on every keystroke. The parse tree is extremely concise and readable. It resembles an AST more...
Read more >fast Scala 3 parsing with tree-sitter - eed3si9n
Tree-sitter is a parser generator tool and an incremental parsing ... uses external scanners to scan string literals, which makes sense ...
Read more >2020 - talks - Incremental Parsing with emacs-tree-sitter
Tree-sitter is a parser generator and an incremental parsing ... For the time being it looks like nvim-treesitter also uses the S-exp syntax ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m currently working on porting your highlighter from vscode to monaco-editor, in order to have fancy highlights in the web. I built a demo here. I used
tree.edit
and I didn’t find any issue with multi-line editing.Maybe it’s a bug in tree-sitter and already be fixed? Or maybe it’s a vscode bug?
could be fixed in tree-sitter 0.20.1