emacs-devel
[Top][All Lists]
Advanced

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

Re: [SPAM UNSURE] Maybe we're taking a wrong approach towards tree-sitte


From: Arthur Miller
Subject: Re: [SPAM UNSURE] Maybe we're taking a wrong approach towards tree-sitter
Date: Fri, 30 Jul 2021 16:52:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Ergus <spacibba@aol.com> writes:

> On Fri, Jul 30, 2021 at 03:30:42PM +0200, Arthur Miller wrote:
>>�scar Fuentes <ofv@wanadoo.es> writes:
>>
>>> Arthur Miller <arthur.miller@live.com> writes:
>>>
>>>> I undestand that having specialized regex matcher is more efficient than
>>>> some generalized regular matcher current font-locking in Emacs relies
>>>> upon, but is it *that* more efficient to be worth the extra troubles?
>>>
>>> AFAIU this is not about efficience, but mainly about correctness (modern
>>> languages are increasingly more difficult to analyze)
>>
>>Ok, I understand, and I can buy that one. Question is if it is still
>>worth just for the syntax hightlight and indentation? If I get some
>>spurious color here or there sometimes not colored, do I care?
>>
>
> Yes, we care. Syntax highlight for an editor is a basic feature in 2021.
Of course, but I didn't meant Emacs should be without one, wtf, it's not
all or nothing :). What I said is do I really care if a file of 10k
source lines has a word here or there not highlighted, which I haven't
noticed with current implementation either.

>>Can that syntax tree of TS be exposed to lisp and used for some other
>>purposes,
>
> This is the idea. use the tree for navigations like up-list or
> goto-defun for example. Maybe not the tree directly, but the information
> it provides (maybe calling TS function wrappers or setting the TS
> information as text properties).
Ok, that might be useful.

> Indeed. As I mentioned before web developers are using VScode or neovim
> because Angular, React, Nodejs and Python are painfully supported
> (compared to VScode or Sublime). Rust is very limited supported in
> emacs, so users rely on external packages like rust-mode, elpy or
> anaconda that introduce different bindings, collisions and require some
> complex setups for the basics.
Don't we rely on external packages for lots of things. Almost all of
external packages you mentioned provide more than just syntax highlight,
and indentation, so we will probably continue to use those for other
reasons  even wen TS enters Emacs.

>        Unless we expect all the users to be advanced lisp hackers to
> customize their fontlocking, indentation and navigation functions for
> every single prog-mode.

Is it considered advanced lisp hackery to add extra keywords to
font-lock in their init file? I always think of myself as an elisp
noob. Thanks for boosting my ego :-).

Don't take me wrong, I mean nothing bad, I just find answers a tad bit
too extreme for my taste, but thanks for the input, it is interesting read.

I guess I'll be less sceptical and see what TS brings, anyway, thanks
for the all the work to all of you who work on it.





reply via email to

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