Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Long term idea: Move to clangd or Arduino LSP. #24

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

Open
M0JXD opened this issue Sep 3, 2024 · 7 comments
Open

Long term idea: Move to clangd or Arduino LSP. #24

M0JXD opened this issue Sep 3, 2024 · 7 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@M0JXD
Copy link

M0JXD commented Sep 3, 2024

Hello,

First and foremost - thank you for this community edition of the Arduino extension.

I'm wondering if you might consider changing this extension to no longer depend on Microsoft's C/C++ Extension?

I ask this because I like to use VSCodium, but due to the Microsoft's extension having proprietary parts and licensing it can't easily be used with open builds such as VSCodium. A popular alternative is the clangd extension.

Of course when this was under Microsoft's jurisdiction that would never happen, but it is a possibility for the community edition!

Thank you.

@lersi
Copy link

lersi commented Sep 3, 2024

I will keep that in mind, but the current mindset is to keep things working without changing things too much, until there will be room for biger changes

@per1234
Copy link

per1234 commented Sep 3, 2024

Just in case it will be relevant, I'll mention that Arduino IDE 2.x uses clangd. This is done via a wrapper tool named "Arduino Language Server", which provides the necessary interpretation between the Arduino sketch framework and the standard C++ that clangd needs:

https://github.com/arduino/arduino-language-server

@M0JXD
Copy link
Author

M0JXD commented Sep 3, 2024

Thanks, I didn't realise that Arduino was using its own customised clangd LSP in its latest editor, it'd probably be better to use that.

I can edit the issue's title to say something like "Long term idea: use the Arduino LSP" if so desired?

@per1234
Copy link

per1234 commented Sep 3, 2024

its own customised clangd LSP

To be clear, Arduino doesn't make any modifications to the clangd application itself. We run the stock clangd from LLVM (we do build the clangd binary from source for ease of distribution, but without any modifications at all to the source code). But the separate "Arduino Language Server" tool sits between Arduino IDE and clangd.

@M0JXD
Copy link
Author

M0JXD commented Sep 4, 2024

Oh right, sorry!

I noticed the README says this:

"The Arduino Language Server is the tool that powers the auto-completion of the new Arduino IDE 2. It implements the standard Language Server Protocol so it can be used with other IDEs as well."

I imagine that would still make using Arduino's wrapper the best choice? That way should Arduino team choose to make any customisations/extensions/whatever they would be easily brought to VS Code/ium.

@M0JXD M0JXD changed the title Long term idea: move to clangd lsp Long term idea: Move to clangd LSP or Arduino LSP. Sep 4, 2024
@M0JXD M0JXD changed the title Long term idea: Move to clangd LSP or Arduino LSP. Long term idea: Move to clangd or Arduino LSP. Sep 4, 2024
@rambros3d
Copy link

@M0JXD You're right. This is throwing up an error when I use with VScodium.
Is there any way to bypass this error, I just want the auto format feature
image

@lersi thank you for keeping this extension alive

@lersi lersi added enhancement New feature or request help wanted Extra attention is needed labels Sep 11, 2024
@ghost
Copy link

ghost commented Sep 29, 2024

I was going to come here to request the same thing, to keep it as foss as possible and compatible with codium. It's worth considering as an option even if it would be in beta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants