[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New jrpc.el JSONRPC library
From: |
João Távora |
Subject: |
Re: New jrpc.el JSONRPC library |
Date: |
Sun, 20 May 2018 16:54:42 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Eli Zaretskii <address@hidden> writes:
>> From: João Távora <address@hidden>
>> Cc: address@hidden, address@hidden, address@hidden
>> Date: Fri, 18 May 2018 17:27:54 +0100
>>
>> So, off-list Stefan likewise suggested that some level of LSP
>> "infrastructure" is integrated into Emacs, which could lead to merging
>> eglot.el and other LSP clients like lsp-mode.el in the future.
>>
>> As JSONRPC support is a mandatory component of LSP, I've extracted a
>> library implementing the JSONRPC spec (see www.jsonrpc.org) out of
>> eglot.el.
>>
>> I propose this library, jrpc.el, for Emacs core (or GNU ELPA, or
>> both). I hope people can review it, comment on it, and propose changes,
>> particularly developers of other existing LSP-modes. I attach to the
>> end of this mail with a reasonably complete ";;; Commentary" header,
>> including a simple usage example.
>>
>> JSONRPC is apparently also used for other non-LSP applications. See
>> http://json-rpc.info/.
>
> Thanks, this sounds like a good addition. Does it (or can it) work
> with the built-in JSON support we have on the master branch?
Not yet. I didn't know about that, but indeed it has to be on the
roadmap, so I'll start looking into it.
> And I still wonder whether more of eglot's LSP support should be in
> core. After all, only customizing LSP for a specific language should
> be left for the major modes, the rest of interaction with LSP is
> probably language-agnostic, right?
In fact, no. At least not ideally. *All* of LSP is
language-agnostic. The only two things eglot.el does mode-locally are:
1. a very small tweak for `rust-mode', whose not-entirely-compliant RLS
server has some trouble that eglot works around and
2. a global `eglot-server-programs' variable mapping major-modes to
server-launching commands.
The first should go into rust-mode.el (not currently in Emacs/ELPA). The
second one could be replaced by a (setq eglot-server-program <program>)
int he mode hook.
So again, if LSP support is wanted, eglot.el fits that bill (and better
that others IMNSHO :-) But I'd let it mature out of core for a little
while more.
João
- [ELPA] New package: eglot, João Távora, 2018/05/10
- Re: [ELPA] New package: eglot, Eli Zaretskii, 2018/05/11
- 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, 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, 2018/05/20
- 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