We are excited to announce that an update to our PowerShell extension is now available on the Visual Studio Code Marketplace. This blog will explain what is new in this release as well as what you can expect from the extension in the coming months.
What’s new in the PowerShell Extension release
This incremental release incorporates a major update to OmniSharp, the Language Server Protocol library we use (like many other VSCode extensions). Behind the scenes there has also been a concerted effort to improve our build and release processes, with the intention of accelerating our release cadence.
Some highlights of the release include:
- Disable semantic highlighting by default vscode-powershell #3221
- Exclude
-
and$
from PowerShellwordSeparators
vscode-powershell #3359 - Stop prompting to save untitled PowerShell files when debugging vscode-powershell #3338
- Upgrade OmniSharp to
v0.19.2
PowerShellEditorServices #1491 - Fix duplicated command registrations (Thanks @MartinGC94!) vscode-powershell #3320
- Fix unintentional module import triggered by completions (Thanks @MartinGC94!) vscode-powershell #715
Since we have disabled semantic highlighting by default now, if you wish to re-enable it, use:
"[powershell]": {
"editor.semanticHighlighting.enabled": true
}
The intention of this change is to reduce issues while the semantic highlighting backend is improved.
We now also remove -
and $
from the word separators by default for PowerShell files. To add them back, use:
"[powershell]": {
"editor.wordSeparators": "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?"
}
The intention of this change is to increase predictability, as double-clicking PowerShell variables now selects the same portion that the extension highlights (with the exception of scoped variables due to the continued inclusion of :
as a word separator).
For the full list of updates please refer to the changelog.
More about the OmniSharp update
The most significant change is the update to OmniSharp v0.19.2, from the previous version v0.18.3, released in November 2020. OmniSharp is the underlying Language Server Protocol (LSP) and Debug Adapter Protocol (DAP) server library, and as such is our biggest dependency. This update brings us to the LSP 3.16 and DAP 1.48.x specifications, enabling us to start incorporating all the latest LSP changes, and it includes numerous bug fixes and enhancements resulting in a faster and more stable server and extension experience.
After our initial upgrade to OmniSharp v0.19.0, as early adopters we encountered two major bugs in the library. Rob and Andy spent a month identifying and solving a serialization bug in the Debug Adapter Protocol which would have broken the extension’s debugger, and a race condition which temporarily impacted startup reliability in the preview extension. As our fixes went upstream, we improved the OmniSharp library not only for the PowerShell extension, but also for several other Visual Studio Code extensions similarily relying on OmniSharp.
What’s next for the extensions
Over the coming months we plan to continue work on the Editor Services pipeline stability (intellisense, formatting, etc.), work to maintain compatibility with changes to Visual Studio Code, and improve testing infrastructure (to allow for more community contribution and more predictability with preview releases). You can track the progress on all of these projects, and others on our roadmap, in our GitHub repository.
Getting support and giving feedback
If you encounter any issues with the PowerShell extension in Visual Studio Code or have feature requests, the best place to get support is through our GitHub repository.
Sydney Smith, Andy Schwartzmeyer, Rob Holt
PowerShell Team
I guess I have to re-enable it myself then. A couple of built-in themes don’t work well with it, like Dark+, Kimbie Dark, and Monokai Dimmed. But other themes are fine, like “A Touch of Lilac Theme”, “Panda Syntax”, and “Bluloco Dark”.
I hope you do continue to use it! It needs more testing. The main reason we chose to disable it by default is that “sometimes” (but rather often) turns all the highlighting into random colors: https://github.com/PowerShell/vscode-powershell/issues/3295
I am glad to hear so many themes have updated colors for semantic tokens, that’s great! The feature itself is very cool, we just underestimated its readiness.
Yes yes yes! Intellisense and formatting needs huge improvement for both stability and performance, so I am really glad you will focus on that 👍
Thanks for your kind words! Every project at this point is to focus on stability, and as the newest maintainer I’m excited to really get things fixed up and working smoothly.