GNU bug report logs -
#76683
[PATCH] Eglot: Implement additionalPropertiesSupport for showMessage
Previous Next
Full log
Message #11 received at 76683 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> * Why did you remove the gh#627 reference? Not relevant anymore?
I think the note about gh#627 warned the reader that a "vector to list
conversion" was necessary. However, mapcar can work with vectors, so
the reference is not relevant anymore.
> * Could eglot--lambda be used for simplicity (I know it wasn't used
> before)
I think it won't be simpler, but it might be easier to understand the
intent of the code. However, I don't know how it is possible to rewrite
the lambda. How can we access the original object from the body of
eglot--lambda?
The patch has this: (lambda (a) (cons (plist-get a :title) a))
It should be turned into something like this:
(eglot--lambda ((MessageActionItem) title)
(cons title orignal-object))
> * Are you 100% we'll return an 'equal' object for servers that don't
> make use of this feature?
The specification says: "result: the selected MessageActionItem". If
the server does not send additional properties, the new version will
return what the original one returns: an object with a single title
property. So this patch should not cause any trouble to servers
following the specification.
Although, there is a corner case when the new version gives different
result. The original version can return (:title "OK") for an empty
action list, which is not in line with the specification. The updated
patch returns :null in this case.
> * In the original version it was obvious the structure returned, now
> not so much. Maybe
> a very short comment showing what the typical object looks like.
I added a comment and extended the docstring.
> After evaluating this, and doing changes (if any), feel free to push.
After your last email, I requested inclusion for the emacs group at
savannah three weeks ago. Nothing happened since then, which I
interpret as polite rejection.
I've attached the updated patch.
Thanks again,
Felicián
[0001-Eglot-Implement-additionalPropertiesSupport-for-show.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
> João
>
> On Sun, Mar 2, 2025 at 1:40 PM Felician Nemeth
> <felician.nemeth <at> gmail.com> wrote:
>>
>> Hi João,
>>
>> This small patch implements a harmless feature introduced in LSP version
>> 3.16:
>> https://microsoft.github.io/language-server-protocol/specifications/lsp/3.18/specification/#window_showMessageRequest
>>
>> It allows me to implement a rust-analyzer feautre in a simple, stateless
>> manner.
>>
>> Thank you,
>> Felicián
>>
This bug report was last modified 153 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.