[TxMt] Re: Language Server Protocol (LSP)

f1nnix ilya at rusanen.co.uk
Mon Dec 16 14:11:03 UTC 2019


Thanks everyone for interest! I'm really happy someone else find this project
useful.

Right now it's nearly impossible to use this bundle unless you *exactly*
know, how it works and what can fail. Soon I'll describe, how to run this
project "as-is". And then we'll try to implement some kind of settings to be
able to launch it somewhere except my own machine :).

Please, note two things:

1. For now I've developed it mostly to use with one particular Language
server — https://github.com/palantir/python-language-server. That means, I
rely on Python-specific things like PYTHONPATH, venv, etc. I'll try to dig
other language servers' transport interfaces and adopt this bundle to it.
But for now you will probably need to install and configure appropriate
Language servers yourself. For example, for TypeScript you'll need to
install https://github.com/theia-ide/typescript-language-server manually,
etc.
2. Right now Textmate communicates with LS over dual-bound socket proxy.
I've decided to make an intermediate proxy to handle persistent connection,
as Textmate can't run async code in a way we need — not just disconnect from
stdin/stdout, but be able to print something «back» if LS event occurs. That
adds one additional step — you'll need to lauch LSP proxy yourself in
separate terminal. I'll take a look closer on next week, maybe we would be
able to drop proxy and rely just on PID of created LS process, saved
somewhere on filesystem.

And obviously, there is just a limited subset of LS capabilities, that we
physically can implement:

* Code completion — via DIALOG popup.
* Go to definition — via `mate <file> <line>`
* Hover — via DIALOG tooltip.
* Document diagnostics — via some kind of internal HTML preview, rendered in
modal window.

But for example, we won't be able go highlight errors in code as Jacob
Carlborg stated above.



--
Sent from: http://textmate.1073791.n5.nabble.com/textmate-users-f3.html


More information about the TextMate mailing list