Description
When a custom configuration provider is reconfigured, cpptools first clears all custom configurations, which resets all TUs and triggers recreation of the TU for only the active file (without a custom configuration). Then, it provides custom configurations separately for each open file. Assuming there is still (or is now) a custom configuration for the active file, its TU gets recreated again.
The clearing and updating could be consolidated into a single operation, to avoid creating the unnecessary TU. Updating all files at once might require a bit of refactoring of the logic that provides custom configurations, as it currently delivers configs for each file using separate messages.
Alternatively, reconfiguration could instead check if there is an updated configuration for the active file and, if so, update that file first and include a bool indicating that all other TUs should be reset. (Or, if no new config for the active file, use the existing logic.) That should be sufficient as only the active file's TU is automatically recreated when custom configurations are cleared. Custom configurations for all other open files should be delivered before their TUs get recreated.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status