-
Notifications
You must be signed in to change notification settings - Fork 282
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
feat(keybindings): add binding for opening config #3352
Conversation
Hi @LiHRaM , Sorry for the slow reply! Thank you for the PR, really appreciate the contribution 🎉 Made a couple small tweaks; but when CI is green, will merge. |
let command = Commands.openConfigurationFile.id; | ||
|
||
let openConfigOnMac = | ||
bind(~key="<D-,>", ~condition="isMac" |> WhenExpr.parse, ~command); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the condition is case-sensitive (which may be a bug itself) - flipped from IsMac
-> isMac
.
bind(~key="<D-,>", ~condition="isMac" |> WhenExpr.parse, ~command); | ||
|
||
let openConfigOnOther = | ||
bind(~key="<C-,>", ~condition="!isMac" |> WhenExpr.parse, ~command); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was worried this might conflict with a default Vim keybinding, but doesn't appear that it does 👍
@@ -31,6 +31,7 @@ let defaultKeyBindings = | |||
), | |||
] | |||
@ Feature_SideBar.Contributions.keybindings | |||
@ Feature_Configuration.Contributions.keybindings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for wiring this up!
Looks like the CI failure isn't related to this change; it's a bug with loading the cache. So I'll bring it now. Thanks for the contribution, @LiHRaM - much appreciated! |
Listed in #1423 as a good place to get started as adding a keybinding for the "Open Settings" shortcut. Hope it's okay!
(I accidentally force pushed to master when tracking upstream, so setting this to a different branch now. Unfortunately GitHub doesn't seem to allow me to change the tracking downstream branch after opening an issue...)