Mbed Studio 1.3 clangd issue

Hi everyone!

Is anyone else having the issue where Mbed Studio says it cannot find “clangd”?

This is the exact error message:
Error starting C/C++ language server. Please make sure ‘clangd’ is installed on your system. You can refer to the clangd page for instructions.

I haven’t had any problems using Mbed Studio 1.2.1 but I tried downloading the clandg.exe binary anyway, and I added it to the path to the Mbed Studio preference file. Error message still shows up. This, of course, breaks the code autocomplete and live checking.

Is there a link where I can download previous versions? I can’t seem to find them online.

Any help will be appreciated!

Bruno

Hello,

please be so kind and try to this Help>>Check for tools Updates..>>Update now

Time to time is good to check this. It include Clang, ARMC and so on…
The Mbed Studio have included some “plugins” to avoid some unnecessary issues with installation of required apps.

BR, Jan

Hi Bruno,

Jan is correct. It is most likely due to the fact that after auto-update from version 1.2.1 to version 1.3.0 you haven’t updated tools. Mbed Studio detects on each start-up that tools are out of date and show a dialog with tools update. You can also access it by clicking Help-> Check for tools updates... in the menu.
After updating clangd from version 8+ to version 10.0.0 this issue should be resolved.

The split of application and tools auto-update was done on purpose. It allows making each update quite small when no tools need updating.

Mbed Studio 1.3 brings quite many improvements to C/C++ IntelliSense functionality. Including support for linting, using Clang-Tidy — Extra Clang Tools 10 documentation
We are finishing documentation for this new functionality. It will be available soon.

Thanks,
Arek - Mbed Studio team

Hi @JohnnyK and @arekzaluski!

I was skipping the pop up on startup which was working fine until v1.3.0, my mistake. Thank you for the solution and extra info, that fixed it immediately!

Best
Bruno

Same story here but impossible to upgrade the tools… running forever. To remove the V1.3.0 version and to reinstall has solved the issue.

Just FYI, it took me ~1 hour for the tools to finish updating.

Hi Alain,

Thank you for reporting it. We will investigate it. Clangd tools are quite small so it should not take longer than 1-2 minutes to download.
@binux14 Has it taken 1 hour to download or install? Install happens after Studio restarts and Studio is blocked on the loading screen.

Thanks,
Arek - Studio team

I haven’t updated anything (not just clangd) in a while, that might be why. I did it from the pop-up screen and I was able to use Studio in the meantime.

Edit: So, I guess it was download

Hello Arek,
Just for clarification. It is normal, when the intellisense not show the parameters of Constructors or Methods? I think that is related to this change and I also reported this in MbedStudio Online.
In the past when I typed DigitalOut led() then was showed a small window where I saw some overload variants of constructor and its parameters what were need to be fill or chose. But now not.

Thank you
BR, Jan

Hi Jan,

No, it is not normal. Thank you for reporting it. I confirm that we can reproduce it and it is a regression. We will provide a patch for it as soon as possible. Intellisense should show parameters of constructors and methods while you type.

Thanks,
Arek - Studio team

1 Like

@arekzaluski a bit out of topic, but I was wondering if you could share the config for clangd and clang-tidy you use for mbed studio.

I used to work with vim and I’d like to setup YouCompleteMe which is using clangd.

The arguments used with mbed studio would be very helpful!

Hi Jan,

Mbed Studio 1.3.1 has just been released today. Unfortunately it doesn’t contain fix for this issue. This regression was not simple to fix. Instead we decided to switch to vscode-clangd extension from version 1.4.0. It fixes this issue and adds even better support for C/C++ intellisense.

Thanks,
Arek - Mbed Studio team

1 Like

Hi @ladislas,

Unfortunately at the moment, Mbed Studio is not allowing many modifications to clangd. We are however planning to change it in 1.4.0 release.
We will most likely allow to:

  • Pass a path to your own version of clangd server
  • Pass arguments to clangd server
  • Enable C/C++ intellisense for all program in the workspace (instead of active program only)

Thanks,
Arek - Mbed Studio team

Thanks for the reply! I was actually not looking to modify the config in Mbed Studio, but to access the config so that I can use it elsewhere.

After several attempts to updatinge Mbed Studio, I still get the message:
"
Error starting C/C++ language server. Please make sure ‘clangd’ is installed on your system. You can refer to the clangd page for instructions.
Couldn’t start client C/C++
"

The tools status update table look like this:

Appearantly the link activated by pushing the “instructions” button in the error message pop-up, points to an obsolete url causing rerouting to the clangd startup page.

Any help would be appreciated.

Geir Helge

I do not know if this i relevant, but when compiling an Mbed program, I get these error messages:

Geir Helge