microsoft / vscode-cmake-tools

CMake integration in Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=vector-of-bool.cmake-tools
MIT License
1.43k stars 430 forks source link

fix cmake-tools-schema #3720

Closed gcampbell-msft closed 2 months ago

gcampbell-msft commented 2 months ago

This change addresses item #3651

This changes our activation to help fix the issues where we weren't providing the localized schema.

This adds the onFileSystem:cmake-tools-schema activation event. If any file that has that schema is opened, we activate.

In short, because we possibly aren't activated yet when someone looks at a CMakePresets.json, the provideTextDocumentContent method isn't called once our extension is activated. Therefore, if we slightly fix our url for the presets and our activation events, this will fix the issues with the schema for CMakePresets.json