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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1ODM4OTgsIm5iZiI6MTczOTU4MzU5OCwicGF0aCI6Ii80MTEyNDY3MC8yOTE4OTQ0MjEtOGZkYWJhNmUtM2RlOS00MDhjLThlZWQtNDZiNWRiZGNhNGIwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDAxMzk1OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThlMGJlYTc5NzY4NWU5ZTFjY2FkNDI1YzFkYmVkNWRiYTQ3NTE5OTQ4YzUyNTI3NzU2ZGRlYTBhMDRhNTYyNmUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.DpHScxmyuLogkZ8p0i-fUYMiicUi1UxyjU55AyFB_3c)
Here as formatted text:
![image](https://private-user-images.githubusercontent.com/41124670/291894740-c3506790-adc1-4412-a54c-31b6744d50d9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1ODM4OTgsIm5iZiI6MTczOTU4MzU5OCwicGF0aCI6Ii80MTEyNDY3MC8yOTE4OTQ3NDAtYzM1MDY3OTAtYWRjMS00NDEyLWE1NGMtMzFiNjc0NGQ1MGQ5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDAxMzk1OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTAwOGE4MzBmNzZkODI5NmVmN2Q2YjZiZmIwMDljMTY3NTgxYjAwOGM3Mzc0NTlhMDU1YTA4YjBhMGE3ZDA4N2QmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.GV6MQJfGQO5tipRMH7_D16dXnwANRCridPYZrhqAcWI)
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