emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using incremental parsing in Emacs


From: arthur miller
Subject: Re: Using incremental parsing in Emacs
Date: Sun, 5 Jan 2020 15:16:09 +0000

Alan Third <address@hidden> writes:

> On Sat, Jan 04, 2020 at 02:46:14PM +0000, arthur miller wrote:
>> 
>> There is a very good presentation of tree-sitter on YT by its author:
>> 
>> https://www.youtube.com/watch?v=Jes3bD6P0To
>> 
>> Looks much better then what I got a picture by just reading on the
>> website:
>
> I watched this video and it looks to me like tree sitter is trying to
> solve a fundamentally different problem than LSP servers.
>
> Most of the conversation in this thread seems to make the assumption
> that tree sitter and LSP are mutually exclusive, which is clearly not
> true.
>
> Tree sitter provides a fast and accurate parse tree to the editor
> which it can then use for syntax highlighting, moving by syntax
> element, code folding, expand region, etc.
>
> LSP does not provide that and possibly never will:
>
> https://github.com/Microsoft/language-server-protocol/issues/682#issuecomment-486676262
>
> Tree sitter does not provide error checking (although it does some
> basic syntax checking simply through being a parser), language aware
> refactoring, completion, etc. Things that LSP DOES provide.
>
> One of the things that interested me the most in that presentation was
> the discussion of syntax highlighting on very long lines. Perhaps it
> couldn’t help Emacs, but it certainly made me think.

Yesterday evening after thinking for a while, I also got to conclusion
that tree-sitter provides just syntax coloring. However it does
provide an AST so question is if that AST can be used for more than just
syntax coloring.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]