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

From: Mitchell <m.att.foicica.com>
Date: Mon, 17 Sep 2018 21:27:16 -0400 (EDT)

Hi,

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.

Over the last year or two, the LSP appears to have become the defacto standard for editors and IDEs to support smart language features like autocompletion and go to definition. The idea is to write a single language server that communicates over the LSP protocol, and any editor or IDE that implements the protocol can communicate with that language server. This solves the need for separate editor and IDE-specific autocompletion frameworks. (Some of you may recall Textadept's defunct Adeptsense[3], which was a Textadept-specific Lua framework.)

Right now there are over 50 LSP language servers[4] that Textadept could theoretically communicate with. I've only tested with cquery[5] and lua-lsp[6].

Note that this module does not support every feature defined in the LSP (e.g. workspaces and refactoring).

**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.**

For those of you that are curious, Textadept's existing autocompletion and documentation features will remain, particularly for Lua. I do not see LSP as a replacement for Textadept's existing advanced language features, but a complement. I also do not believe in requiring such additional dependencies as language servers for one to be productive with Textadept.

Please feel free to report bugs and/or give feedback.

Cheers,
Mitchell

[1]: https://foicica.com/wiki/lsp
[2]: https://microsoft.github.io/language-server-protocol/
[3]: https://foicica.com/wiki/adeptsense
[4]: http://langserver.org/
[5]: https://github.com/cquery-project/cquery
[6]: https://github.com/Alloyed/lua-lsp

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Mon 17 Sep 2018 - 21:27:16 EDT

This archive was generated by hypermail 2.2.0 : Tue 18 Sep 2018 - 06:33:08 EDT