{"id":19039,"date":"2021-06-02T15:18:17","date_gmt":"2021-06-02T23:18:17","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/powershell\/?p=19039"},"modified":"2021-08-05T13:40:20","modified_gmt":"2021-08-05T21:40:20","slug":"powershell-for-visual-studio-code-may-2021-update","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/powershell-for-visual-studio-code-may-2021-update\/","title":{"rendered":"PowerShell for Visual Studio Code May 2021 Update"},"content":{"rendered":"<div class=\"markdown-body\">\n<hr \/>\n<p>We are excited to announce that an update to our <a href=\"https:\/\/aka.ms\/psvscode\" rel=\"nofollow\">PowerShell extension<\/a> is now available on the <a href=\"https:\/\/marketplace.visualstudio.com\/vscode\" rel=\"nofollow\">Visual Studio Code Marketplace<\/a>. This blog will explain what is new in this release as well as what you can expect from the extension in the coming months.<\/p>\n<h2><a id=\"user-content-whats-new-in-the-powershell-extension-release\" class=\"anchor\" href=\"#whats-new-in-the-powershell-extension-release\" aria-hidden=\"true\"><\/a>What&#8217;s new in the PowerShell Extension release<\/h2>\n<p>This incremental release incorporates a major update to <a href=\"https:\/\/github.com\/OmniSharp\/csharp-language-server-protocol\">OmniSharp<\/a>, the Language Server Protocol library we use (like many other VSCode extensions).\u00a0Behind the scenes there has also been a concerted effort to improve our build and release processes, with the intention of accelerating our release cadence.<\/p>\n<p>Some highlights of the release include:<\/p>\n<ul>\n<li>Disable semantic highlighting by default <a href=\"https:\/\/github.com\/PowerShell\/vscode-powershell\/pull\/3377\">vscode-powershell #3221<\/a><\/li>\n<li>Exclude <code>-<\/code> and <code>$<\/code> from PowerShell <code>wordSeparators<\/code> <a href=\"https:\/\/github.com\/PowerShell\/vscode-powershell\/pull\/3359\">vscode-powershell #3359<\/a><\/li>\n<li>Stop prompting to save untitled PowerShell files when debugging <a href=\"https:\/\/github.com\/PowerShell\/vscode-powershell\/pull\/3357\">vscode-powershell #3338<\/a><\/li>\n<li>Upgrade OmniSharp to <code>v0.19.2<\/code> <a href=\"https:\/\/github.com\/PowerShell\/PowerShellEditorServices\/pull\/1491\">PowerShellEditorServices #1491<\/a><\/li>\n<li>Fix duplicated command registrations (Thanks @MartinGC94!) <a href=\"https:\/\/github.com\/PowerShell\/vscode-powershell\/pull\/3329\">vscode-powershell #3320<\/a><\/li>\n<li>Fix unintentional module import triggered by completions (Thanks @MartinGC94!) <a href=\"https:\/\/github.com\/PowerShell\/PowerShellEditorServices\/pull\/1484\">vscode-powershell #715<\/a><\/li>\n<\/ul>\n<p>Since we have disabled semantic highlighting by default now, if you wish to re-enable it, use:<\/p>\n<div class=\"highlight highlight-source-json\">\n<pre><span class=\"pl-s\"><span class=\"pl-pds\">\"<\/span>[powershell]<span class=\"pl-pds\">\"<\/span><\/span>: {\r\n    <span class=\"pl-s\"><span class=\"pl-pds\">\"<\/span>editor.semanticHighlighting.enabled<span class=\"pl-pds\">\"<\/span><\/span>: <span class=\"pl-c1\">true<\/span>\r\n}<\/pre>\n<\/div>\n<p>The intention of this change is to reduce issues while the semantic highlighting backend is improved.<\/p>\n<p>We now also remove <code>-<\/code> and <code>$<\/code> from the word separators by default for PowerShell files. To add them back, use:<\/p>\n<div class=\"highlight highlight-source-json\">\n<pre><span class=\"pl-s\"><span class=\"pl-pds\">\"<\/span>[powershell]<span class=\"pl-pds\">\"<\/span><\/span>: {\r\n    <span class=\"pl-s\"><span class=\"pl-pds\">\"<\/span>editor.wordSeparators<span class=\"pl-pds\">\"<\/span><\/span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"<\/span>`~!@#$%^&amp;*()-=+[{]}<span class=\"pl-cce\">\\\\<\/span>|;:'<span class=\"pl-cce\">\\\"<\/span>,.&lt;&gt;\/?<span class=\"pl-pds\">\"<\/span><\/span>\r\n}<\/pre>\n<\/div>\n<p>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 <code>:<\/code> as a word separator).<\/p>\n<p>For the full list of updates please refer to the <a href=\"https:\/\/github.com\/PowerShell\/vscode-powershell\/blob\/master\/CHANGELOG.md\">changelog<\/a>.<\/p>\n<h2><a id=\"user-content-more-about-the-omnisharp-update\" class=\"anchor\" href=\"#more-about-the-omnisharp-update\" aria-hidden=\"true\"><\/a>More about the OmniSharp update<\/h2>\n<p>The most significant change is the update to OmniSharp <a href=\"https:\/\/github.com\/OmniSharp\/csharp-language-server-protocol\/releases\/tag\/v0.19.2\">v0.19.2<\/a>, 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,\u00a0and 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.<\/p>\n<p>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 <a href=\"https:\/\/github.com\/OmniSharp\/csharp-language-server-protocol\/pull\/567\">serialization bug<\/a> in the Debug Adapter Protocol which would have broken the extension&#8217;s debugger,\u00a0and a <a href=\"https:\/\/github.com\/OmniSharp\/csharp-language-server-protocol\/pull\/589\">race condition<\/a> 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.<\/p>\n<h2><a id=\"user-content-whats-next-for-the-extensions\" class=\"anchor\" href=\"#whats-next-for-the-extensions\" aria-hidden=\"true\"><\/a>What&#8217;s next for the extensions<\/h2>\n<p>Over the coming months we plan to continue work on the <a href=\"https:\/\/github.com\/PowerShell\/vscode-powershell\/projects\/14\">Editor Services pipeline stability (intellisense, formatting, etc.)<\/a>, work to maintain <a href=\"https:\/\/github.com\/PowerShell\/vscode-powershell\/projects\/15\">compatibility with changes to Visual Studio Code<\/a>, and improve <a href=\"https:\/\/github.com\/PowerShell\/vscode-powershell\/projects\/10\">testing infrastructure (to allow for more community contribution and more predictability with preview releases)<\/a>.\u00a0You can track the progress on all of these projects, and others on our roadmap, in our <a href=\"https:\/\/github.com\/PowerShell\/vscode-powershell\/projects\">GitHub repository<\/a>.<\/p>\n<h2><a id=\"user-content-getting-support-and-giving-feedback\" class=\"anchor\" href=\"#getting-support-and-giving-feedback\" aria-hidden=\"true\"><\/a>Getting support and giving feedback<\/h2>\n<p>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 <a href=\"https:\/\/github.com\/PowerShell\/vscode-powershell\/\">GitHub repository<\/a>.<\/p>\n<p>Sydney Smith, Andy Schwartzmeyer, Rob Holt<\/p>\n<p>PowerShell Team<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>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&#8217;s new in the PowerShell Extension release This incremental release [&hellip;]<\/p>\n","protected":false},"author":62819,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[3175],"class_list":["post-19039","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell","tag-visual-studio-code"],"acf":[],"blog_post_summary":"<p>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&#8217;s new in the PowerShell Extension release This incremental release [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/19039","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/62819"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=19039"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/19039\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=19039"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=19039"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=19039"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}