Skip to content
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

Use the progress indicator when IntelliSense is running #5021

Open
2 tasks done
MartinGC94 opened this issue Aug 3, 2024 · 6 comments
Open
2 tasks done

Use the progress indicator when IntelliSense is running #5021

MartinGC94 opened this issue Aug 3, 2024 · 6 comments
Labels
Area-UI Issue-Enhancement A feature request (enhancement).

Comments

@MartinGC94
Copy link
Contributor

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all issues to ensure it has not already been reported.

Summary

IntelliSense can sometimes be slow to show up because it has to import a module but there's no way to know if it's currently running when it gets autotriggered by typing. This means that if the completion request for whatever reason gets cancelled while I expect it to open I will sit there waiting for nothing for a few moments before manually triggering it.

Proposed Design

There is already a progress indicator that shows if a script is running. Just make it run when IntelliSense is running as well.

@MartinGC94 MartinGC94 added Issue-Enhancement A feature request (enhancement). Needs: Triage Maintainer attention needed! labels Aug 3, 2024
@JustinGrote
Copy link
Collaborator

@MartinGC94 thanks for your submission! (And all of your PowerShell contributions, I'm never going to miss an opportunity to thank you)

Can you let me know which indicator you mean with a screenshot? When I do something like sleep a script I don't see anything in vscode that I can think of, or are you referring to the OSC indicator that shows up in Windows Terminal with write-progress?

@JustinGrote JustinGrote added Area-UI and removed Needs: Triage Maintainer attention needed! labels Aug 5, 2024
@MartinGC94
Copy link
Contributor Author

In the bottom right corner next to the the PowerShell version:
image
it only shows up while code is running. Ideally there would also be status text like in ISE and Visual Studio:
image
though I don't know if VS code supports that.

@JustinGrote
Copy link
Collaborator

Ah I see, I have the additional detail normally hidden which is why I didn't see it, it's now hidden by default behind the language ellipsis because that's what the vscode team wants.

We have full control over that dialog so it would be possible to wire in the same handler that we use for pipeline activities to the completion requests as well. I can't remember if that control has the ability to tooltip highlight.

@andyleejordan for additional thoughts/input

@andyleejordan
Copy link
Member

That is a great question and I'd have to dig into it. Actually turning the spinner on and off is fairly simple: it's a pair of LSP notifications. But knowing when to do so (especially if we start doing it in more than one place) is a different matter.

@MartinGC94
Copy link
Contributor Author

Runspaces have 2 events AvailabilityChanged and StateChanged. Maybe you could just subscribe to one of those events and start the spinner whenever it signals that it's busy?

@JustinGrote
Copy link
Collaborator

Might need to debounce it to 500ms or something so it doesn't tweak out on every completion call

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-UI Issue-Enhancement A feature request (enhancement).
Projects
None yet
Development

No branches or pull requests

3 participants