We've had trouble bringing up a language server using Theia's plugin system.
With Theia 0.6, we see it starting in the logs, but decorations don't appear in the editor.
With Theia master, the logs don't record it starting, either.
Does this look like the right way to set this up in a plugin:
const LS_CONFIG = {
id: 'mbed',
name: 'Mbed',
command: '/Users/thegecko/language-server',
args: [
'-clangd',
'clangd'
],
globPatterns: [ '**/*.mbed' ],
workspaceContains: [ '*' ]
};
theia.languageServer.registerLanguageServerProvider(LS_CONFIG);
cc @akosyakov @benoitf
cc @tolusha @tsmaeder
@thegecko there was an example there: https://github.com/eclipse/che-theia-samples/blob/e50ebe47e1769fa51622bf9c55626b3dfb3d298b/samples/xml-language-server-plugin/src/xml-language-server-backend.ts#L20-L34
If anything @svor would know. But tbh. I would not use this API...the way forward is to use VS Code API and use vscode-language-server-node to hook up the languageserver.
As @tsmaeder mentioned I would recommend to build the proper vscode extension with whatever version of vscode-languageclient you want to use: https://code.visualstudio.com/api/language-extensions/language-server-extension-guide
Besides that you won't depend on monaco-languageclient version anymore, vscode metadata are more flexible in regards of activation events and implemented better for the plugin system, e.g. workspaceContains allows globs then.
@tsmaeder @svor It would be good to verify whether this API still works after changes to latest monaco-languageclient in August.
@thegecko I've just tested xml-language-server-plugin and it works for me. If you still want to follow this API, please take a look at how xml-language-server-plugin was implemented
Thanks @svor
Many thanks for your help, @svor
I was missing some language and grammar contributions.
I have now fixed the problem, closing this issue.