[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New jrpc.el JSONRPC library
From: |
Josh Elsasser |
Subject: |
Re: New jrpc.el JSONRPC library |
Date: |
Sun, 20 May 2018 20:32:38 -0700 |
Clément Pit-Claudel <address@hidden> wrote:
> Thanks for the positive feedback, and indeed creating a clean API was a
> design goal, but notice that:
>
> (cl-defun eglot--server-myLangServer/customMethodName
> (proc &key param1 param2)
> ...)
>
> has two dashes in it. It isn't (yet) a part of the official eglot.el LSP
> API, and your particular example might very well become something like:
Ah, fair. I was mostly thinking aloud about extending the current GitHub master
with cquery support, which'd mean hideifdef support (if I was going to use it
at my day job, at least). May’ve been getting a little ahead of myself :)
>
> (cl-defmethod eglot-handle-notification
> (proc (method (eql :myLangServer/customMethodName)) &key param1 param2)
> ...)
>
> or, for requests
>
> (cl-defmethod eglot-handle-request
> (proc id (method (eql :myLangServer/customMethodName)) &key param1 param2)
> ...)
>
> This seems cleaner than the "automagical" function names, although it
> has two minor drawbacks:
IMHO the cl-defmethod approach looks a lot nicer for someone hoping to build off
eglot. Took a bit of headscratching to make the connection between the intern +
fboundp and having the various handler functions, and I could see it being a
pain
to manage scores of magic functions scattered throughout files.
Can’t wait to give eglot a spin, though! I’ll try and implement / test basic
cquery
support in the next couple days. I’ll need to add an extra per-proc variable to
pass
a required initialzationOptions param (persistent cache directory), but that
shouldn’t
prove too difficult.
-- Josh
- Re: [ELPA] New package: eglot, (continued)
- Re: [ELPA] New package: eglot, João Távora, 2018/05/11
- New jrpc.el JSONRPC library (Was: [ELPA] New package: eglot), João Távora, 2018/05/18
- Re: New jrpc.el JSONRPC library (Was: [ELPA] New package: eglot), Eli Zaretskii, 2018/05/19
- Re: New jrpc.el JSONRPC library, João Távora, 2018/05/20
- Re: New jrpc.el JSONRPC library, Eli Zaretskii, 2018/05/20
- Re: New jrpc.el JSONRPC library, João Távora, 2018/05/28
- Re: New jrpc.el JSONRPC library, Clément Pit-Claudel, 2018/05/20
- Re: New jrpc.el JSONRPC library, Josh Elsasser, 2018/05/20
- Re: New jrpc.el JSONRPC library, João Távora, 2018/05/20
- Re: New jrpc.el JSONRPC library,
Josh Elsasser <=
- Re: New jrpc.el JSONRPC library, João Távora, 2018/05/20
- Re: New jrpc.el JSONRPC library, Clément Pit-Claudel, 2018/05/20
- Re: New jrpc.el JSONRPC library (Was: [ELPA] New package: eglot), Philipp Stephani, 2018/05/19
- Re: New jrpc.el JSONRPC library (Was: [ELPA] New package: eglot), Eli Zaretskii, 2018/05/19
- Re: New jrpc.el JSONRPC library, João Távora, 2018/05/20
- Re: New jrpc.el JSONRPC library, Eli Zaretskii, 2018/05/20
- Re: New jrpc.el JSONRPC library, João Távora, 2018/05/20
- Re: New jrpc.el JSONRPC library, Aaron Ecay, 2018/05/21
- Re: New jrpc.el JSONRPC library, João Távora, 2018/05/21
- Re: New jrpc.el JSONRPC library, Aaron Ecay, 2018/05/21