Open MartinGC94 opened 9 months ago
@MartinGC94 is the new empty file set to PowerShell language?
@andyleejordan Yes. I get completions as soon as I press space, but if I backspace and press Ctrl+Space the results are empty.
Interesting. Have you tried other languages, like can you get C# completions in an empty file? I'm wondering if it's a VS Code thing in general or something we're doing.
I just tried opening an empty .cs file and I got keyword completions so it must be related to the extension/editor services.
@MartinGC94 in the latest extension prerelease version there's a language server trace
setting in the powershell options, can you enable that, reproduce the behavior, and send the logs from the PowerShell Editor Services Client
output pane? That can go a decent way to help troubleshoot what's going on.
EDIT: Sorry I forgot that change hasn't landed yet, you can install this latest commit VSIX: https://github.com/PowerShell/vscode-powershell/actions/runs/7763944519/artifacts/1216865107
Also this step in your repro process:
From VS code, type in Enter-PSHostProcess <PID from before>
I'm not 100% the LSP is gonna use that pwsh instance with the language client once you do that? @andyleejordan?
Good to know, we'll take a look at it.
I'm not 100% the LSP is gonna use that pwsh instance with the language client once you do that? @andyleejordan?
No, not it is not. Good catch 😄
@JustinGrote Logs:
To my untrained eyes there's nothing interesting in that log.
As for Enter-PSHostProcess
that was just for convenience. On my machine I've added my custom build as one of the PowerShell version options. I've tried using Enter-PSHostProcess
from the normal extension version of pwsh and I get my new completions as expected so it doesn't matter if you add a custom executable, or use Enter-PSHostProcess
.
Prerequisites
Summary
In this PR: https://github.com/PowerShell/PowerShell/pull/21171 I've added the ability to complete keywords without having to write a partial name, this works great except when the file is completely empty in VS code. The console host and even ISE handles completely empty input without any problems.
PowerShell Version
Visual Studio Code Version
Extension Version
Steps to Reproduce
$pid
Enter-PSHostProcess <PID from before>
Visuals
No response
Logs
No response