eclipse-cdt-cloud / vscode-clangd

Fork of the VS Code extension for clangd with added support for multiple projects
https://eclipse.dev/cdt-cloud
MIT License
0 stars 2 forks source link

Initial contribution for multi language client support #1

Closed tortmayr closed 6 months ago

tortmayr commented 8 months ago

Extends the vscode-clangd extension by adding support for multiple clients/projects in one workspace/folder. To achieve this each project is managed by a dedicated clangd client/server. This ensures that all resources that are associated with one project are handled in an isolated context and keeps project indexes strictly separated from each other.

A central ProjectService is used to identify each project in an open workspace/folder base on a defined ProjectResolution strategy. Adopters can define custom resolution strategies tailored to their needs (configurable via settings) The project service also keeps track of the currently active project and exposes API to listen to project changes and/or manually change the active project.

The multi-project support is fully opt-in and can be deactivated. If deactivated this extension will behave like the upstream clangd-vscode extension.

Note that at the moment this project should be rather seen as a proof-of-concept implemenation an is not (yet) a fullfledged replacement for vscode-clangd. The focus has been set on providing the core clangd LSP functionality. Customizations on top like the Type Hierarchy View, Memory Usage etc. haven been disabled for now and do not working in clangd-vscode-multi-project.

Contributed on behalf of STMicroelectronics

planger commented 8 months ago

Looks good, thanks! However, I think we want to merge this into the branch main (which shall be the main branch of this PR), right?