feat: add keybindings to toggle settings UI #251466
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds keybindings to toggle between the Settings editor and settings.json file.
I see a few issues with this PR and wanted to request some feedback.
I couldn't get the keybindings to appear in the keybindings editor until I changed SettingsEditorTitleContribution to block startup. This issue is similar to cmd + , does not work for opening settings view on macOS on lastest vscode insiders #159875.
CONTEXT_SETTINGS_JSON_EDITOR isn't actually set anywhere. Instead, I currently use a much longer context key expression, openUserSettingsEditorWhen, around line 1306. I'd like to double-check whether that large context key could cause perf issues, and if so, get the JSON editor context key working properly, first.
I had to set the new keybinding weights to be +1 to prevent SETTINGS_COMMAND_OPEN_SETTINGS, which has no when clause, from always stealing the keybinds. I'm thinking that fixing up CONTEXT_SETTINGS_JSON_EDITOR and using it would be a better solution, but is there something else I should try?