We’re excited to announce that an replace to the PowerShell Extension for Visible Studio Code is now obtainable on the extension market.
This launch fixes numerous points associated to IntelliSense and allows updates to PowerShell Editor Providers (the engine of the VS Code extension) for different shoppers, resembling Emacs and Vim with LSP plug-ins.
Updates from the June releases
Some highlights of June releases:
For the complete checklist of modifications please seek advice from our changelog.
On this launch we have now made numerous enhancements to IntelliSense (the overall time period for varied code enhancing options together with: code completion, parameter information, tool-tip hovers, and so forth.).
Mark completion request handler as serial
Beforehand, in the event you typed
Get- in a short time, you’d get no outcomes in any respect. This stops completion from being cancelled at any time when a
DidChangeTextDocument notification is shipped. This additionally lets completion cancel another costly requests like code lenses, which implies every part is each speedier and fewer flaky.
Repair duties by no means finishing if cancelled shortly
We have been exiting
SynchronousTask.ExecuteSynchronously early if the cancellation was already requested. This was not setting our state accurately, inflicting the caller to only fall off with out warning. This made some issues like
utilizing disposals by no means occur, which led to lots of erratic habits!
Make alias discovery attainable on idle
The usage of
Runspace.SessionStateProxy whereas the pipeline thread is busy (even in case you are on the pipeline thread) leads to an exception. By fixing this we will additionally cancel
GetAliasesAsync (a sluggish operation) when wanted, and do it whereas idling as an alternative of startup.
Add “house” character to completion set off characters
Including the “house” character to completion triggers lets us routinely give completion outcomes for parameter values. This additionally required constructing in some help for marking completion outcomes as “incomplete”. Because of this the shopper won’t cache outcomes when normal identifier characters are typed.
Primarily, this solves the situation the place you sort
house, get file completion outcomes, after which sort
-. You anticipate to then get parameter names, however with out marking “incomplete”, it’ll as an alternative filter the file outcomes.
Additionally mounted a situation the place you sort
$script: and on typing the
: it might not replace to obtainable script scope variables.
Make completion requests cancellable
Now any completion outcomes from customized argument completers may be cancelled in the event that they take too lengthy and the person retains typing. In non-remote runspaces, we will additionally use it as a completion supply that we will cancel by means of issuing a pipeline cease request.
What’s subsequent for the challenge?
We’re at present constructing out regression checks for the extension to cowl every part we broke and subsequently mounted through the main rewrite earlier this yr. Now we have a robust concentrate on high quality, and need to guarantee we proceed to ship a production-ready, high-quality extension to you, our customers. Now we have made a big funding in bettering the extension so we would like to have the ability to confidently proceed to iterate on this challenge with out inadvertently impacting the efficiency, stability, or characteristic set. We’ve begun this work already, and are monitoring in our GitHub repository.
Getting help and giving suggestions
Whereas we hope the brand new implementation supplies a significantly better person expertise, there are sure to be points. Please tell us in the event you run into something.
When you encounter any points with the PowerShell Extension in Visible Studio Code or have characteristic requests, the very best place to get help is thru our GitHub repository.