Platformio-vscode-ide: Publish extensions to open-vsx

Created on 18 Jun 2020  路  14Comments  路  Source: platformio/platformio-vscode-ide

Reason

Microsoft does not allow to use C/C++ extension with other editors. See https://github.com/microsoft/vscode-cpptools/issues/6388#issuecomment-720719298

We are working on an alternative solution for C/C++ code completion and navigation.


Temporary solution 1

You will need to install manually these extensions:

  1. Open extension in the Microsoft Marketplace following the link above
  2. Download extension's VSIX file by clicking on "Download Extension" in "Resources" section (right sidebar)
  3. Navigate to VSCodium Extensions view and click "...", select "Install from ".VSIX".
  4. Repeat for each VSIX/Extension.

Restart VSCodium.

Temporary solution 2

See https://github.com/platformio/platformio-vscode-ide/issues/1802#issuecomment-710683116


Hi!

I'm a VS Codium user, a FLOSS version of VS Code, it's the same code but without the Microsoft's telemetry and branding.

I want to request if possible to add the PlatformIO IDE extension on the open-vsx.org market so that we doesn't need to works with the Microsoft marketplace as it is unclear if it's legal to use it on VS Code forks, see here.

This is how to publish a new extension.

Thanks.

feature

Most helpful comment

I believe the Microsoft vscode-cpp extension you guys are using for code completion is incompatible with open-vsx. The linked discussions seem to imply that it's not legal to use the Microsoft C/C++ extension in any other product than VSCode.

I was able to use the clang language server instead and getting it working (in Eclipse Theia), by

  1. Deleting the ms cpp extension
  2. Removing it from platformio-vscode-ide 's package.json as a dependency
  3. Installing the clang extension
  4. Creating a compile_commands.json from the PIO terminal, and putting it in the root of the project.

PlatformIO is still complaining about the incompatibility but all code completion functionality seems to work. Note that I'm using clang only as a language server, and the builds are still being handled by PIO.

This suggests to me that it is possible to separate the build and language server tools, and with small configurations, PlatformIO can actually play well with the clangd language server and therefore be open-vsx compatible.

All 14 comments

I am with the same "problem". It would be really nice to have it published to work with VSCodium.

It is technically possible:

@ivankravets Do you think platformio extension for codium is also legal?

PlatformIO extension for VSCode depends on C/C++ extension by Microsoft. We use it for code completion/navigation. How to resolve this issue?

@rafacouto Yes, is it possible to have it in the open-vcs registry as well?

it was already merged here https://github.com/open-vsx/publish-extensions/pull/54 but it doesn't appear on open-vsx.org Probably because it isn't build correctly? Could you help me with fixing that #1884 please?

I updated this issue and added temporary solution https://github.com/platformio/platformio-vscode-ide/issues/1802

I believe the Microsoft vscode-cpp extension you guys are using for code completion is incompatible with open-vsx. The linked discussions seem to imply that it's not legal to use the Microsoft C/C++ extension in any other product than VSCode.

I was able to use the clang language server instead and getting it working (in Eclipse Theia), by

  1. Deleting the ms cpp extension
  2. Removing it from platformio-vscode-ide 's package.json as a dependency
  3. Installing the clang extension
  4. Creating a compile_commands.json from the PIO terminal, and putting it in the root of the project.

PlatformIO is still complaining about the incompatibility but all code completion functionality seems to work. Note that I'm using clang only as a language server, and the builds are still being handled by PIO.

This suggests to me that it is possible to separate the build and language server tools, and with small configurations, PlatformIO can actually play well with the clangd language server and therefore be open-vsx compatible.

@yunuscukran Thank you so much for your solution! I added it to the top of post.

We already have started research around C/C++ extension and replacement for it. Indeed, we use noly 5% functionality of that extension - just code completion and navigation. So, we would be happy to switch to something open source with better peformance and clang should be a great candidate here.

@yunuscukran what is your feedback about clangd server? Do you like how does it work?

This one? It is MIT licensed.

That one called vscode-cpptools is under Microsoft License, not MIT, which made this issue-There is no a c/c++ extension on VSCodium marketplace #6518

@yunuscukran what is your feedback about clangd server? Do you like how does it work?

Hi,

The functionality regarding language features is good!

One aspect which I think is hacky is that the default place forcompile_commands.json must be redefined in the project settings, and the actual act of creating the file with a PIO command must be called somewhere, via a post-build script for example. So right now clangs works with a modified PIO project.

Any updates on switching to clangd for the language server? It seems to me what is needed is simply the generation of a compile_commands.json file on project creation and occasional re-creations after builds.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Zukatomo picture Zukatomo  路  7Comments

tovine picture tovine  路  4Comments

jenokizm picture jenokizm  路  3Comments

LaBus3 picture LaBus3  路  7Comments

GeorgeFlorian picture GeorgeFlorian  路  3Comments