Re: [code] [textadept] New Language Server Protocol client module

From: Mitchell <>
Date: Mon, 1 Oct 2018 16:47:32 -0400 (EDT)

Hi Chris,

On Sun, 30 Sep 2018, Chris Emerson wrote:

> Hi Mitchell,
> On Mon, Sep 17, 2018 at 09:27:16PM -0400, Mitchell wrote:
>> I've been working on an experimental client module[1] for Textadept that
>> communicates over the Language Server Protocol[2] (LSP) with language
>> servers in order to provide autocompletion, calltips, go to definition, and
>> more.
> Nice! I've been wanting to try out the Rust Language Server[1], but haven't
> really got on with IDEs I've tried so far. :-)
> [1]
>> **Also note that some buggy language servers that do not respect the
>> protocol may cause this module and Textadept to hang, waiting for a
>> response. There is no recourse other than to force-quit Textadept and
>> restart. You have been warned.**
> I've experienced this, but I'm not sure who's at fault. :-)
> The attached rough patch (against b5beae87e409, or at least that's the name
> of the ZIP file I got from hg) gets through that, though might not do it
> the best way. The changes are:
> 1. The 'initialized' message seems to need an empty object rather than
> nothing. Otherwise the RLS returns an error.

Okay, thanks. I'll apply that.

> 2. The lines come back with \r\n line endings, and the lines end up with
> '\r' at the end and don't match the "Content-Length" pattern, plus
> `#line > 0` is always true.

I probably forgot to mention that a nightly build was needed because the lspawn module was not correctly handling '\r\n' line endings correctly when reading by line. This has been fixed in Textadept 10.1. Sorry about that.


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Mon 01 Oct 2018 - 16:47:32 EDT

This archive was generated by hypermail 2.2.0 : Tue 02 Oct 2018 - 06:29:27 EDT