vscode-cmake-tools icon indicating copy to clipboard operation
vscode-cmake-tools copied to clipboard

Bundled 'CMake' extension overrides 'CMake Language Support'

Open CalebAdrianXYZ opened this issue 1 year ago • 2 comments

Brief Issue Summary

Installing the CMake Tools extension automatically installs CMake^1. Unfortunately this conflicts with the CMake Language Support^2 extension in that VS Code will use CMake to perform highlighting and code completion. This requires manually uninstalling CMake after the fact, and in some cases potentially reloading the window.

If the user has these extensions installed to their profile, this isn't a problem as it is rare that they would need to take action. However, for workflows that rely on Dev Containers, this must be done each time the container is initially setup or rebuilt (and after all the extensions have been installed). This means that the experience of Clone -> Open in VS Code -> Reload in Dev Container is a bit less seamless than one would hope. Unfortunately Dev Containers have no means of disabling/uninstalling extensions, either directly via devcontainers.json or it's lifecycle hooks ^3.

CMake Tools Diagnostics

No response

Debug Log

No response

Additional Information

While I am not suggesting that this extension should switch to bundling CMake Language Support (as discussed in #2267), I do feel that some level of control can be given back to the user here. If CMake Tools were to bundle neither extension, then the user could freely pick their CMake LSP of choice. An extension pack can be provided which bundles both CMake Tools and CMake to keep the existing behavior. This also has the benefit of side-stepping the above issue with automated installs entirely. Additionally, the C/C++ Extension Pack^5 already bundles these two for users that want a one-click install of their C++ environment. Alternatively, a slightly modified version of this extension could be provided under a different extension identifier, which only provides the core features, without the bundled LSP. This would avoid breaking existing setups.

CalebAdrianXYZ avatar Sep 05 '23 20:09 CalebAdrianXYZ

@CalebAdrianXYZ Thanks for the suggestion! We will take it into consideration.

gcampbell-msft avatar Sep 12 '23 13:09 gcampbell-msft

This is indeed annoying for those that frequently spin up new dev containers.

AnElectricalEngineer avatar Jan 16 '24 20:01 AnElectricalEngineer