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 custom lsp-clients-extract-signature-on-hover #187

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

Conversation

slotThe
Copy link

@slotThe slotThe commented Aug 17, 2024

It seems like emacs-lsp/lsp-mode#4362 didn't get any traction, so I'm following what was discussed in #151 and am creating an individual PR here instead.

Before:
2024-08-17-144642_1108x206_scrot

After:
2024-08-17-144117_903x177_scrot


Commit Summary

Add custom lsp-clients-extract-signature-on-hover

This fixes a case where a type signature would be broken up over multiple lines, and we only display the first of these.

Fixes: #151
Related: emacs-lsp/lsp-mode#4362
Related: emacs-lsp/lsp-mode#1740

This fixes a case where a type signature would be broken up over
multiple lines, and we only display the first of these.

Fixes: emacs-lsp#151
Related: emacs-lsp/lsp-mode#4362
Related: emacs-lsp/lsp-mode#1740
"Display the type signature of the function under point."
(let* ((groups (--filter (s-equals? "```haskell" (car it))
(-partition-by #'s-blank?
(->> (lsp-get contents :value)
Copy link
Author

@slotThe slotThe Aug 17, 2024

Choose a reason for hiding this comment

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

I hope I did this right, but this should be agnostic wrt the chosen lsp-mode configuration. Still, I've only tested it with use-plists, so it would be nice if someone using hashtables could also test this

@michaelpj
Copy link
Collaborator

I wonder if a PR to upstream might get more traction?

@slotThe
Copy link
Author

slotThe commented Aug 27, 2024

This is essentially what emacs-lsp/lsp-mode#1740 was, but that sadly also went nowhere :/

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.

Document (?) how to change the eldoc signature
2 participants