[Top][All Lists]

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

Re: Tracking buffer positions across time, without markers (was Re: PL s

From: Clément Pit-Claudel
Subject: Re: Tracking buffer positions across time, without markers (was Re: PL support)
Date: Mon, 11 May 2020 11:33:35 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

On 11/05/2020 11.16, João Távora wrote:
> On Mon, May 11, 2020 at 3:18 PM Clément Pit-Claudel
> <address@hidden> wrote:
>> Yes, eactly, that's what I meant when I wrote "Visual Studio has a nice API 
>> for this: there is a way to snapshot a buffer, and to translate positions 
>> between two snapshots.  In my example, this allows you to translate 0:3 in 
>> the original buffer to 7:10 in the new one."
> Well, if I understand correctly, you can still do this with markers.
> You just need to register, somehow, somewher, at the time you
> make the request  to the  server that "3" means "that marker there".
> Then recover this  information. In the worse case, this means this
> means a table of markers that is as the number of positions in the
> buffer, which is probably a performance no-no :-(

Indeed :(

> By the way the way LSP deals with this is by not fixing it. It temporarily
> misaligns the syntax errors.  But that's because it doesn't take 1 minute
> to syntax-check :-), rather around 1 second or so in the common cases.

Same in Flycheck :) People who write very slow typecheckers don't blame me, 
they blame their typecheckers ^^

reply via email to

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