I've started to work on rough implementation: https://github.com/f1nnix/LSP.tmbundle
<https://github.com/f1nnix/LSP.tmbundle> . Completion already ~works.
It would be nice, if someone could take a look at my questions about
Textmate internal bundle mechanism. Thanks.
* To run a command in the background, you need to create a subprocess and close stdout and stderr. See  for more details.
* It’s not possible to highlight arbitrary symbols.
* Regarding diagnostic reporting, It’s not possible highlight symbols. But it’s possible to show an icon in the gutter on a specific line. When the user clicks on the icon a message will be shown. Run “mate —help” and see the “mark” related flags. It would be something like: “mate foo.rb —line 3 —set-mark error:'missing symbol’”
* The callback for open document is called "callback.document.did-open”. Set that as the semantic class of a bundle command
* Regarding your last question: "Is there a way to run a command on file opening?”. I guess it’s the same answer as the previous question. I don’t think there’s a difference between opening a document or a file.
This is a list of semantic class callbacks that I’ve managed to collect from different places:
* callback.mouse-click (old)
For mouse click callbacks, the following modifiers can be used:
The modifiers are set in "Scope Selector".