[Top][All Lists]

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

Re: Why tree-sitter instead of Semantic? (was Re: CC Mode with font-lock

From: Jostein Kjønigsen
Subject: Re: Why tree-sitter instead of Semantic? (was Re: CC Mode with font-lock-maximum-decoration 2)
Date: Sat, 13 Aug 2022 16:40:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0

It seems (as usual) the core question asked in the thread gets burried in lots of other discussion, which while I'm sure is worthwhile, doesn't quite answer the original question.

Specifically I'm referring to the email-topic and the question asked in the email:

On 10.08.2022 02:22, Lynn Winebarger wrote:
I'm curious, though, as to why Semantic/CEDET seems to have been superceded by external solutions like tree-sitter or LSP-based (non-emacs) servers.

Maybe I'm not an average Emacs'er. I'll even be willing to admit that one of the main problems here is my lack of knowledge in this matter.

But I've yet to date seen any case where Semantic or CEDET has provided me with value as a Emacs end-user and programmer. Maybe it works. Maybe it's useful. Maybe it does magical things. But as far as I know, it's a mode you can enable, and then .... nothing happens.

Compare that to LSP... I install a package (lsp-client), add the relevant hook to prog-mode, and instantly every major-mode I interact with gets intelligent, contextually correct, auto-complete. I can do safe renames across projects, and lots of actual useful, observable magic happens. And I get the exact same language support as every other editor out there, and I'm not limited to who is willing to contribute to the Emacs-ecosystem.

This is why LSP has such great adoption "everywhere",  and became the universal standard almost overnight.

If CEDET can do this too... Then why not provide some documentatio or guides on how to set it up to be equally useful? If it can't, then one needs to clarify what CEDETs role is, in a world where everyone else has decided on LSP being the way forward, and provide documentation/guides which helps people exploit what CEDET has to offer. Otherwise what I suspect is already a niche mode will become, if possible, even more niche.

Back to tree-sitter...I'm not saying that the same thing as LSP is guaranteed to happen to tree-sitter, not by far. But it has some of the same great things giving it momentum: It's fast (instant?), editor-external, meaning it gets contributions from lots of developers outside the Emacs ecosystem, and as a result already has parser for pretty much all languages out there.

If I'm making a new major-mode these days, for the same reason, I'm going to be basing it on tree-sitter in one form or the other.

reply via email to

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