On 20 Dec 2019, at 17:06, f1nnix <ilya@rusanen.co.uk> wrote:

And this means unless we are able notify server on every content change of
opened document in realtime, we can't make completion requests for major
part for Language Server implementations. Is there a way to run command on
every content change?

Have a look at this changelog entry [1].

3. The same as 1. When document is closed, we need to notify LS about it. I
can't find any info about document.close callback
(https://github.com/textmate/textmate/search?q=callback.document.did-close&unscoped_q=callback.document.did-close&type=Commits).
Is it true there is no such callback?

No there’s no such callback. I asked about that recently. But, if you look at [1], there’s DocumentClosed, which might work.

As Allan mentioned [2], I think it’s better if the LSP support is natively implemented inside TextMate and not as a bundle.

[1] https://github.com/textmate/textmate/blob/master/Applications/TextMate/about/Changes.md#2016-10-03-v20-beta1221
[2] http://textmate.1073791.n5.nabble.com/Language-Server-Protocol-LSP-tp31826p31935.html

-- 
/Jacob Carlborg