Use the org.eclipse.lsp4e.languageServer extension in plugin.xml to define a language server (ie how to start it and connect to it) and to associate it with one or many content-types.
See multiple examples in the test.
-
Use the
ProcessStreamConnectionProviderif your LS is accessible as a process. -
To handle LSP Commands (e.g. associated with
CodeLensmessages) in the IDE, register a sub-class oforg.eclipse.lsp4e.command.LSPCommandHandlerin theplugin.xmlfile of your plug-in via theorg.eclipse.ui.handlersextension. The handler has to be registered for thecommandIdequal to theCommand.commandattribute of an LSP message. Note that client side handlers will not be triggered, if the language server is capable of executing commands of the samecommandId.