Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clangd installation clarification #105

Closed
Gerriko opened this issue Jul 10, 2020 · 2 comments
Closed

Clangd installation clarification #105

Gerriko opened this issue Jul 10, 2020 · 2 comments

Comments

@Gerriko
Copy link

Gerriko commented Jul 10, 2020

Description

I am seeking some clarification on the correct method to install clangd.

I refer to your page: https://github.com/eclipse-theia/theia-cpp-extensions/tree/d7d1adb9580dfe196670c0fbb1223ab13132222b/packages/cpp#setting-clangd-executable-path-and-arguments

On this page it instructs: To install Clangd on Ubuntu 18.04:

$ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
$ echo "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic main" | sudo tee /etc/apt/sources.list.d/llvm.list
$ sudo apt-get update && sudo apt-get install -y clangd

Yet, if I go to https://clangd.llvm.org/installation.html page it informs me:

Installing the clangd package will usually give you a slightly older version.
Try to install the latest packaged release (9.0): sudo apt-get install clangd-9
This will install clangd as /usr/bin/clangd-9. Make it the default clangd:
sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-9 100

Ok, well the latest release is 10 so you can do the same for 10 as above for 9.

SO, I am a little confused. Does your method install version 10 or does it install an older version?

Additional Information

@Gerriko
Copy link
Author

Gerriko commented Jul 10, 2020

Nothing like diving in and trying it out anyway...
I see your install instructions installs version 11!

@Gerriko Gerriko closed this as completed Jul 10, 2020
@marcdumais-work
Copy link
Contributor

Hi @Gerriko,

Just a quick note in case you're not aware: @theia/cpp will be obsolete soon, like all theia-specific language extensions, following the deprecation of @theia/languages. This may seem like a bad news, but it's because our support for VS Code extensions is now good enough that we can safely use them.

For C/C++ we suggest using vscode-clangd, from the same project as clangd. One potentially interesting thing is that it can install clangd on startup (I haven't tested. Only a couple of vanilla platforms are supported, IIRC).

See for example this example app, where we have made the transition: https://github.com/theia-ide/theia-apps/blob/master/theia-cpp-docker/latest.package.json#L129

P.S. @theia/cpp-debug remains unafected by the above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants