Theia: [electron] [plugin] [language server]

Created on 15 Oct 2019  路  8Comments  路  Source: eclipse-theia/theia

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

electron lsp plug-in system question

All 8 comments

cc @tolusha @tsmaeder

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jeanlucburot picture jeanlucburot  路  3Comments

akosyakov picture akosyakov  路  3Comments

marechal-p picture marechal-p  路  3Comments

akosyakov picture akosyakov  路  3Comments

pwFoo picture pwFoo  路  3Comments