-
Notifications
You must be signed in to change notification settings - Fork 91
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
Switch R package development support to commands #772
Conversation
Looks like what we want is |
I know I was the one making the argument that these package management needs should be tasks, but the API is much more complicated compared to commands and I now think the best option in the short term is to offer these as commands. In the long run, we can reevaluate whether tasks are better, because they would allow us to take advantage of the problem matchers infrastructure. |
Should I add some quick-and-dirty keybindings for these commands here, for the private alpha? Or wait for #669? It would look like: "keybindings" : [
{
"command": "r.packageLoad",
"key": "ctrl+shift+l",
"mac": "cmd+shift+l",
"when": "isRPackage"
},
{
"command": "r.packageBuild",
"key": "ctrl+shift+b",
"mac": "cmd+shift+b",
"when": "isRPackage"
},
{
"command": "r.packageTest",
"key": "ctrl+shift+t",
"mac": "cmd+shift+t",
"when": "isRPackage"
},
{
"command": "r.packageCheck",
"key": "ctrl+shift+e",
"mac": "cmd+shift+e",
"when": "isRPackage"
}
] Also, I can quickly add |
I think these keybindings are already taken in VS Code so we shouldn't override them with RStudio keybindings unless the user has intentionally enabled RStudio keybindings. Maybe the default keybindings for these could use some kind of leader sequence? (e.g. VS Code uses Cmd+K a lot as a leader sequence) |
Totally happy to wait on the keybindings but with the |
Agree, we could probably take over the Run Build Task keybinding. The others, though, already have meaning. Cmd+Shift+E focuses the Explorer tab, Cmd+Shift+T focuses the previous editor, etc. |
OK, let's wait on the keybindings then. 👍 |
Yeah, I think we should close #122. |
I actually think that we should bind these keyboard shortcuts, because they are scoped to only exist when the user is working on an R package (a strong signal that they'll use and benefit from these keybindings). A similar example was that I took Cmd+Shift+K for Render in Quarto (even though it is "delete line" in VS Code). If these are bound to mainline, commonly used editing commands that's one thing, but if they are more obscure I think we should take them. |
Addresses #747 and also #735
This isn't quite right yet, because the terminal (pseudoterminal?) takes focus while the task is being run.