emacs-devel
[Top][All Lists]
Advanced

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

Re: Comments to the new tree sitter implementation


From: Theodor Thornhill
Subject: Re: Comments to the new tree sitter implementation
Date: Sun, 24 Apr 2022 07:36:43 +0200

Theodor Thornhill <theo@thornhill.no> writes:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>>> 1. New parent-beginning-of-line preset
>>>
>>> For typescript-mode more often that not you want to find some close
>>> parent, then go to beginning of line to calculate the offset.  A
>>> suggested implementation of this is:
>>
>> FWIW, I think this is a "quick hack" which gives fairly good results at
>> little effort but doesn't help in the long run because you'll have to
>> refine it sooner or later: it's never actually right, it's only ever
>> right by accident.
>>

BTW, the preset in an of itself is not a quick hack, as far as I can
tell.  It's just that it might not be the best guess in every case given
the example I provided.  But for the case where what you want is to find
the first parent, then move to beginning of indentation, I guess it's
fine?  Or am I wrong here as well?

I mean, for the try_statement, doing this check should be sufficent, I
believe.

Theo



reply via email to

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