-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Support PowerShell intellisense in the terminal #154662
Comments
@cpendery has started some contributions in this area so we can start testing this again 👏 With |
@Tyriar How exactly does this work? I have found zero documentation available about this, and if I google terminal.integrated.shellIntegration.suggestEnabled pretty much nothing comes up? I have enabled both |
@alessandro-newzoo it will only work on the latest insiders build released today, just setting that should make it work. It's triggered by typing Here's roughly how it works:
vscode/src/vs/platform/terminal/node/terminalEnvironment.ts Lines 149 to 151 in faacc5f
That's read by shell integration and enabled some special pwsh key handlers, including for the vscode/src/vs/workbench/contrib/terminal/browser/media/shellIntegration.ps1 Lines 156 to 157 in faacc5f
Some vscode-side keybindings send custom sequences to pwsh which are understood by the key handlers (this ctrl+space keybinding seems to have broken somehow since I initially added it: vscode/src/vs/workbench/contrib/terminal/browser/terminal.contribution.ts Lines 204 to 208 in faacc5f
When suggest is triggered, we trigger vscode/src/vs/workbench/contrib/terminal/browser/media/shellIntegration.ps1 Lines 183 to 205 in faacc5f
This is handled by vscode here: vscode/src/vs/workbench/contrib/terminalContrib/suggest/browser/terminalSuggestAddon.ts Lines 123 to 125 in faacc5f
The completions are fed into a suggest widget derived from the editor's intellisense widget. |
oh okay I see, thank you so much for the thorough explaination! |
@alessandro-newzoo sorry about the slow response, but it's been available as an experimental setting for some time but I was pulled off the project to work on some other things. In retrospect it should have remained as an Insiders-only setting back then, but now thanks to @cpendery's work it's becoming more reliable. @cpendery I switched it on and it still had some problems where it would brick input where you could not interact with the suggest widget or the terminal and not close it. Not sure if that's been fixed yet but that's why it was switched off. I've got it enabled now and I was seeing that problem so hopefully I'll hit it again and be able to diagnose. It's also not clear if we will have it enabled by default in the future and it might be too disruptive for users to enable it in Insiders. I want suggest to be available as a discoverable option but not necessarily the default experience. The best next step to get more self-hosting will probably be to enable it in the vscode repo, I'll try get some testing in over the next week and we can maybe create a test plan item to get some new eyes on it for this release. |
Created a test plan item: #210394 |
A lot of good feedback from testing: https://github.com/microsoft/vscode/issues?q=is%3Aopen+is%3Aissue+label%3Aterminal-suggest |
No description provided.
The text was updated successfully, but these errors were encountered: