Replies: 1 comment 1 reply
-
Technically,
Let me think for some time whether we want to have that configurable for on hover. We have such a configuration for signature help. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've stumbled upon a minor inconvenience in regard to the way eldoc displays the
document/onHover
text.Currently, there is a choice between showing 1 line and showing the entire text via
lsp-eldoc-render-all
.Metals (the language server for Scala) sometimes shows the signature on one line, and at other times it's a fully formatted Markdown text, having as first line
Expression type:
.Here as one line:
![image](https://private-user-images.githubusercontent.com/41124670/291894421-8fdaba6e-3de9-408c-8eed-46b5dbdca4b0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MzQxNjIsIm5iZiI6MTczOTUzMzg2MiwicGF0aCI6Ii80MTEyNDY3MC8yOTE4OTQ0MjEtOGZkYWJhNmUtM2RlOS00MDhjLThlZWQtNDZiNWRiZGNhNGIwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDExNTEwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTYxMGZiNGRjZWUyMmU3YjVhN2Y0MTRiNWVjOGRjOWZiNGRlNzQ3NDc2NTI2YjZhOWM1ZDg0Njg0ZDBlNWE5NWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.eJJI1S9-xLCjkOQiEPnLYw_WKYFdrz2Dtn2oMUHmqZo)
Here as formatted text:
![image](https://private-user-images.githubusercontent.com/41124670/291894740-c3506790-adc1-4412-a54c-31b6744d50d9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MzQxNjIsIm5iZiI6MTczOTUzMzg2MiwicGF0aCI6Ii80MTEyNDY3MC8yOTE4OTQ3NDAtYzM1MDY3OTAtYWRjMS00NDEyLWE1NGMtMzFiNjc0NGQ1MGQ5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDExNTEwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM5NDI5ZjNjMTVlODJiNmQ4MjliNjQwNzEzM2VhMjBkNDJmYjY2ZDRlZDQxZmJhZTQzNzI3MzIxOGFmMjlmOGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.tMcQRu67rgpJK4soAGmGVBp98Uc3-QNVVGX8FFjpvh0)
I don't really like the minibuffer taking so much space to display hover, I prefer just having the signature, and when I need more documentation, calling
lsp-ui-doc-glance
.So, I have tweaked the
lsp-clients-extract-signature-on-hover
to show a user-defined number of lines. Somewhat following #2613, this could be a way to accommodate to the format imposed by the LSP (if it's non-"standard"), effectively letting users tweak "on-the-fly" the quantity of information given by eldoc.Would this change be appreciated in lsp-mode? (I can submit a PR.)
Many thanks to everyone involved in the project for this great suite of packages.
Beta Was this translation helpful? Give feedback.
All reactions