Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added inherit option and inheritDefault setting #3547

Merged
merged 2 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ Improvements:

- Improve when the "Configure with Debugger" popup appears and allow for "Do Not Show Again". [#3343](https://github.com/microsoft/vscode-cmake-tools/issues/3343)
- Add option to disable "Not all open documents were saved" popup. [#2889](https://github.com/microsoft/vscode-cmake-tools/issues/2889)
- Allow overriding of CMakePresets cache variables and arguments [#1836](https://github.com/microsoft/vscode-cmake-tools/issues/1836)
- Allow overriding of CMakePresets cache variables and arguments. [#1836](https://github.com/microsoft/vscode-cmake-tools/issues/1836)
- Improve advanced status bar options configuration by adding an `inherit` option to the `statusBarVisibility` setting and by adding the `inheritDefault` setting. Look at the CMake Options Visibility Configuration docs for more information. [#3452](https://github.com/microsoft/vscode-cmake-tools/issues/3452)

Bug Fixes:

Expand Down
48 changes: 32 additions & 16 deletions docs/cmake-options-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ The default settings will be set to the following:
"cmake.options.statusBarVisibility": "hidden"
"cmake.options.advanced": {
"build": {
"statusBarVisibility": "visible"
"statusBarVisibility": "inherit"
},
"launch": {
"statusBarVisibility": "visible"
"statusBarVisibility": "inherit"
},
"debug": {
"statusBarVisibility": "visible"
"statusBarVisibility": "inherit"
}
}
```
Expand All @@ -34,7 +34,11 @@ To revert to the prior experience and have all of your presets display in the st

You can configure settings for each of the following CMake actions in your settings.json to either be `visible` or `hidden` in the status bar through the `statusBarVisibility` variable. Settings that are available to be hidden from the project status view side bar can be configured to be `visible` or `hidden` through the `projectStatusVisibility` variable.

To make options visible in the status bar take up less space, you can configure certain options to be only the respective icon through the `icon` option in `statusBarVisibility` or specify a given character length through the `compact` option in `statusBarVisibility`. If a `statusBarVisibility` option is set to `compact` you can then specify an integer length for how many characters you want an option to take up through the `statusBarLength` option. It will truncate your existing status bar option to that specified character length. The default option is 20 characters.
To make options visible in the status bar take up less space, you can configure certain options to be only the respective icon through the `icon` option in `statusBarVisibility`, inherit the more general `Cmake > Options : Status Bar Visibility` setting or the `inheritDefault` setting through the `inherit` option in `statusBarVisibility`, or specify a given character length through the `compact` option in `statusBarVisibility`.

If a `statusBarVisibility` option is set to `inherit`, it will inherit the more general `Cmake > Options : Status Bar Visibility` setting if it is not set to `hidden`. If the more general `Cmake > Options : Status Bar Visibility` setting is set to `hidden`, then the `inherit` option will default to what is set in the `inheritDefault` setting. The default option for `inheritDefault` is `visible`.

If a `statusBarVisibility` option is set to `compact` you can then specify an integer length for how many characters you want an option to take up through the `statusBarLength` option. It will truncate your existing status bar option to that specified character length. The default option for `statusBarLength` is 20 characters. Note, if the `statusBarVisibility` option is set specifically for `variant`, `compact` will remove the status message completely instead of truncating (there is no corresponding `statusBarLength` setting).

You can also configure options to be `visible` or `hidden` in the Project Status View in the CMake Tools sidebar. The options that allow for this customization are:
*`folder`
Expand All @@ -53,56 +57,68 @@ The full level of options for the CMake status can be seen below:
"cmake.options.advanced": {

"folder": {
"statusBarVisibility": "visible", "icon", "compact", "hidden",
"statusBarVisibility": "visible", "icon", "compact", "hidden", "inherit",
"inheritDefault": "visible", "icon", "compact", "hidden",
"statusBarLength": 20,
"projectStatusVisibility": "visible", "hidden"
},
"configure": {
"projectStatusVisibility": "visible", "hidden"
},
"configurePreset": {
"statusBarVisibility": "visible", "icon", "compact", "hidden",
"statusBarVisibility": "visible", "icon", "compact", "hidden", "inherit",
"inheritDefault": "visible", "icon", "compact", "hidden",
"statusBarLength": 20
},
"kit": {
"statusBarVisibility": "visible", "icon", "compact", "hidden",
"statusBarVisibility": "visible", "icon", "compact", "hidden", "inherit",
"inheritDefault": "visible", "icon", "compact", "hidden",
"statusBarLength": 20
},
"variant": {
"statusBarVisibility": "visible", "icon", "compact", "hidden"
"statusBarVisibility": "visible", "icon", "compact", "hidden", "inherit",
"inheritDefault": "visible", "icon", "compact", "hidden",
},
"build": {
"statusBarVisibility": "visible", "icon", "hidden",
"statusBarVisibility": "visible", "icon", "hidden", "inherit",
"inheritDefault": "visible", "icon", "hidden",
"projectStatusVisibility": "visible", "hidden"
},
"buildPreset": {
"statusBarVisibility": "visible", "icon", "compact", "hidden",
"statusBarVisibility": "visible", "icon", "compact", "hidden", "inherit",
"inheritDefault": "visible", "icon", "compact", "hidden",
"statusBarLength": 20
},
"buildTarget": {
"statusBarVisibility": "visible", "compact", "hidden",
"statusBarVisibility": "visible", "compact", "hidden", "inherit",
"inheritDefault": "visible", "compact", "hidden",
"statusBarLength": 20
},
"ctest": {
"statusBarVisibility": "visible", "icon", "compact", "hidden",
"statusBarVisibility": "visible", "icon", "compact", "hidden", "inherit",
"inheritDefault": "visible", "icon", "compact", "hidden",
"statusBarLength": 20,
"color": true, false,
"projectStatusVisibility": "visible", "hidden"
},
"testPreset": {
"statusBarVisibility": "visible", "icon", "compact", "hidden",
"statusBarVisibility": "visible", "icon", "compact", "hidden", "inherit",
"inheritDefault": "visible", "icon", "compact", "hidden",
"statusBarLength": 20
},
"launchTarget": {
"statusBarVisibility": "visible", "compact", "hidden",
"statusBarVisibility": "visible", "compact", "hidden", "inherit",
"inheritDefault": "visible", "icon", "compact", "hidden",
"statusBarLength": 20
},
"debug": {
"statusBarVisibility": "visible", "hidden",
"statusBarVisibility": "visible", "hidden", "inherit",
"inheritDefault": "visible", "icon", "compact", "hidden",
"projectStatusVisibility": "visible", "hidden"
},
"launch": {
"statusBarVisibility": "visible", "hidden",
"statusBarVisibility": "visible", "hidden", "inherit",
"inheritDefault": "visible", "icon", "compact", "hidden",
"projectStatusVisibility": "visible", "hidden"
}
}
Expand Down
Loading
Loading