-
Notifications
You must be signed in to change notification settings - Fork 511
Add commands to set and unset ISE Compatibility features #2335
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
Conversation
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.
Looking awesome.
I will say that this is probably the easiest feature to write tests for.
Look at other feature tests for examples.
All you wanna test is:
- call Enable ISE Mode method, verify settings changed
- call Disable ISE Mode method, verify settings changed
I will definitely see what I can do. I wasn't sure on this because when I was initially testing this my code was something like: console.log(vscode.workspace.getConfiguration("workbench.activityBar").get("visible"));
vscode.workspace.getConfiguration("workbench.activityBar").update("visible", false, true);
console.log(vscode.workspace.getConfiguration("workbench.activityBar").get("visible")); and the output in the console was true both times, so I didn't think it was setting. I suspect if our testing is waiting for the function to end before testing then it should be ok. |
You need to use async/await like this: |
Some formatting changes due to vscode format document. Remove option to hide PSIC Check that user hasn't modified settings from ISE settings before returning them to default.
Add interface for settings.
Caveat: This is sometimes inconsistent if there were compile errors. Sometimes need to run Invoke-Build Clean before Invoke-Build Test will pick up code changes.
Ok there we go. The macOS test failure is from API rate limiting that I need to fix. @rjmholt can you rereview? |
PR Summary
Someone on twitter suggested automating setting the ISE Compatibility settings. This adds a "PowerShell: Set ISE Compatibility" and "PowerShell: Unset ISE Compatibility" command. These commands will globally set the settings mentioned in the document.
Currently it does not set the keybindings. I've haven't yet explored if they are settable from code, or if they have to be set through the
package.json
.Marking as WIP for now as I would like to explore the keybindings thing.I don't see any documentation that even implies we can dynamically set keybindings, only that they can be set throughpackage.json
.PR Checklist
Note: Tick the boxes below that apply to this pull request by putting an
x
between the square brackets.Please mark anything not applicable to this PR
NA
.WIP:
to the beginning of the title and remove the prefix when the PR is ready