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

New command: Type of dynamic selection #1675

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

voodoos
Copy link
Collaborator

@voodoos voodoos commented Dec 5, 2024

This PR adds three new commands that can be used to get the type of a selection, and the ones of growing enclosings of this selection. At each step it is possible to ask for more verbose results.

The following videos show how the types of the growing selection are shown in a hover popup, with the selection growing, then shrinking, and lastly with an increased verbosity:

Screen.Recording.2024-12-04.at.11.28.03.mp4

The type history is also logged to an output channel which can be configured to show up automatically and clear itself to show only the last result.

I have been through a lot of back and forth to get to this result, because it is not possible (to the extent of my knowledge) to easily disable the standard hover provider from the client side due to how the official LSP client from Microsoft behaves. I tried multiple alternatives but I know think having a configuration option to mute the output of the standard hover from the server to be the most robust one.

Todo

  • This feature relies on a new server option to temporary disable the standard hover results
  • Rationalize the new configuration options

cc @awilliambauer

New commands allow showing the type of the current selection, and grow / shrink
that selection. Another commands increases the verbosity on demand.
@voodoos voodoos marked this pull request as ready for review December 17, 2024 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants