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

Interactions between these 3 plugins are confusing: langserver, underlines, hover #1491

Open
Akuli opened this issue Mar 31, 2024 · 0 comments

Comments

@Akuli
Copy link
Owner

Akuli commented Mar 31, 2024

The way how these 3 plugins interact together is confusing:

  • langserver
  • underlines
  • hover

If I understand it correctly:

  • Let's say you hover a linter warning message, like an unused import. The langserver plugin tells the underlines plugin to display that yellow underline you see, and when hovered, the underlines plugin tells the hover plugin to display the popup message.
  • Let's say you hover a function name. The hover plugin emits a virtual event saying that something was hovered, and later, the langserver plugin responds with a message to be shown in that hover.

Hovering URLs in the code is similar to hovering linter warning messages, but with urls plugin instead of langserver plugin.

I want to simplify this somehow, but I'm not sure how. If I merge the underlines and hover plugins, it will likely become impossible to show a hover that doesn't come from an underline. I could add a temporary/dummy underline just for the hover, but that works nicely only if the langserver tells me where the hovered function name starts and ends. I'm not sure if it does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant