Live data from Hacker News

Tree-sitter: an incremental parsing system for programming tools

github.com

91–100 of 138 posts

Re: Tree-sitter: an incremental parsing system for programming tools

#91

Tree Sitter is amazing. The parsing is fast enough to run on every keystroke. The parse tree is extremely concise and readable. It resembles an AST more than a parse tree (ie no 11 levels of binary op precedence rules in the tree). The parse tree emits specific ERROR nodes, so you can get a semi-functional tree even with broken syntax. I can't wait for the tools to get built with this. Paredit for TypeScript. Syntax-…

Tooting my own horn, Emacs’ csharp-mode[1] is undergoing a rewrite to be 100% based on tree-sitter rather than regexps. The new code runs way faster and is so much nicer to work with. Once all the kinks are gone, I can’t imagine going back. [1] https://github.com/emacs-csharp/csharp-mode/blob/master/csha...

This looks awesome! Do you mind elaborating on any kinks which you found?

Re: Tree-sitter: an incremental parsing system for programming tools

#93

Earlier quoted context omitted.

Worth calling out that the syntax highlighting support is used to highlight several languages in github.com. (Linguist is still used for the long tail of languages, but we plan to migrate more and more over to tree-sitter-based highlighting over time.) The query language is also what's used to drive the fuzzy/ctags-like Code Navigation feature. Both of those are powered by tree-sitter query files defined in each lang…

Awesome to hear that amazing tech like tree-sitter lives on even though Atom, the product it was built for, is pretty much on life support at this point. Curious if there's any efforts to bring tree-sitter to VSCode? Exposing tree-sitter to extensions could open up so many possibilities like OP mentioned.

https://github.com/microsoft/vscode/issues/77140

Re: Tree-sitter: an incremental parsing system for programming tools

#95
So far it's the amazing tool and we are happy to use it in our projects. The only two complaints I have is the dependency on JavaScript[1] and missing Rust runtime option[2].

[1] https://github.com/tree-sitter/tree-sitter/issues/465

[2] https://github.com/tree-sitter/tree-sitter/issues/465

Re: Tree-sitter: an incremental parsing system for programming tools

#96
post #32

Next steps: incrementally resolve symbols and type-check?

We're currently working on a more precise version of the Code Nav that's shipped on github.com, which is very similar in spirit to this!

Hi, can you consider adding Kotlin to the list of supported languages? Since the feature launched there is now a Kotlin tree sitter implementation https://github.com/fwcd/tree-sitter-kotlin (but maybe that it needs some improvments)

Re: Tree-sitter: an incremental parsing system for programming tools

#97

We've been using tree-sitter for Semgrep and it's nothing short of incredible. Amazing work by Max and team.

We really appreciate the contributions you all have sent back to tree-sitter and the various language grammars, too!

Re: Tree-sitter: an incremental parsing system for programming tools

#98

Earlier quoted context omitted.

We're currently working on a more precise version of the Code Nav that's shipped on github.com, which is very similar in spirit to this!

Hi, can you consider adding Kotlin to the list of supported languages? Since the feature launched there is now a Kotlin tree sitter implementation https://github.com/fwcd/tree-sitter-kotlin (but maybe that it needs some improvments)

That’s great, thanks for the link to the grammar repo! I can’t commit to a specific timeline but I’ll definitely put this on the list.

Re: Tree-sitter: an incremental parsing system for programming tools

#99

Earlier quoted context omitted.

Hi, can you consider adding Kotlin to the list of supported languages? Since the feature launched there is now a Kotlin tree sitter implementation https://github.com/fwcd/tree-sitter-kotlin (but maybe that it needs some improvments)

That’s great, thanks for the link to the grammar repo! I can’t commit to a specific timeline but I’ll definitely put this on the list.

Thanks, that would be really great :)

Re: Tree-sitter: an incremental parsing system for programming tools

#100
post #72

Tree Sitter is amazing. The parsing is fast enough to run on every keystroke. The parse tree is extremely concise and readable. It resembles an AST more than a parse tree (ie no 11 levels of binary op precedence rules in the tree). The parse tree emits specific ERROR nodes, so you can get a semi-functional tree even with broken syntax. I can't wait for the tools to get built with this. Paredit for TypeScript. Syntax-…

> "Paredit for TypeScript" Is there a list of ideas for Structural Editing in C-like languages? I can think of `extend-selection, `move to parent block`, `add arg to function`

Don't have a list, but Dark is doing some really cool things with an editor that depends pretty much exclusively on structural editing (i.e. you can't even make a syntax error if you tried): https://darklang.com/
Post reply on HN