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

Add SignatureInformation activeParameter support. #4643

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

Conversation

brownts
Copy link
Contributor

@brownts brownts commented Dec 16, 2024

No description provided.

@wyuenho
Copy link
Contributor

wyuenho commented Dec 18, 2024

Does lsp-mode and friends currently have the ability to highlight the active parameter?

@brownts
Copy link
Contributor Author

brownts commented Dec 19, 2024

Does lsp-mode and friends currently have the ability to highlight the active parameter?

Yes, it does, although simply moving the cursor over a parameter won't activate it (like what happens in Elisp), unfortunately. It seems you have to either trigger it to appear (based on the lsp-signature-auto-activate setting), or manually activate it (via M-x lsp-signature-activate), although even if you manually activate it, lsp-mode will automatically deactivate it again when you move off the line.

Oddly, Eglot behaves similar to Elisp in that you only have to move the cursor over the parameter for the signature to appear. To be honest, I wish lsp-mode behaved like that, but it doesn't seem to be setup that way.

Copy link
Contributor

@eval-exec eval-exec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need this.

@wyuenho
Copy link
Contributor

wyuenho commented Jan 19, 2025

lsp-mode will automatically deactivate it again when you move off the line

That probably has to do with the various mouse-movement handlers lsp-mode registers.

Oddly, Eglot behaves similar to Elisp in that you only have to move the cursor over the parameter for the signature to appear.

That's because lsp-mode's eldoc-documentation-functions is only setup to use textDocument/hover, whereas eglot uses both textDocument/hover and textDocument/signatureHelp. lsp-mode's signature help is only setup to trigger after self-insert or triggered from the server.

@wyuenho
Copy link
Contributor

wyuenho commented Jan 19, 2025

@jcs090218 @kiennq this PR should be good to go

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

Successfully merging this pull request may close these issues.

3 participants