@theia/cpp without clangd

Hi, I would like to use @theia/cpp extension, but i believe that when a C file is opened, an error is shown indicating that clangd cant be invoked (if clangd is not installed). How can we change the error or behavior ?

[original thread by rs]

[rs]

Hi @anton-kosyakov , all.

I tried to override te method createOptions() in CppLanguageClientContribution, so that i can supress the “clangd not found” error. Please review the following code snippet:

export default new ContainerModule((bind, unbind, isBound, rebind) => {

    unbind(CppLanguageClientContribution);
    unbind(LanguageClientContribution);
    bind(MyTestCppLanguageClientContribution).toSelf().inSingletonScope();
    bind(LanguageClientContribution).toService(MyTestCppLanguageClientContribution);
    bind(CppLanguageClientContribution).toService(MyTestCppLanguageClientContribution);

    /* some other code */
});

cc @marc-dumais @vince-fugnitto

@che-theia-new I’m not sure how useful the @theia/cpp extension would be without clangd as it requires it for language-features.

@che-theia-new FYI @theia/cpp will be deprecated soon, along with the ability to contribute language support through Theia extensions. Going forward VS Code extensions will use used instead. We’ve been experimenting with vscode-clangd and it works well with next Theia (not yet with latest).

That aside, like @vince-fugnitto I do not see you’d gain much by allowing @theia/cpp to run without clangd.