-
Notifications
You must be signed in to change notification settings - Fork 25
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
Seek advice on the formatting of eldoc buffer #61
Comments
I can't test this, but try
You can even make |
Yeah, in eldoc-box-hover-mode, eldoc gives us a list of docs and we combine them into a single string ourselves, so your modification wouldn't take effect. I added a variable Unfortunately this new variable wouldn't affect As for the disappearing function name, it should be fixed now! |
This is not a bug of eldoc-box, but rather a minor but annoying formatting issue caused by markdown-mode used by elgot. I've raised jrblevin/markdown-mode#754 to markdown-mode, but while waiting I'd like to ask some advice from you to find a temporary workaround since you are more familiar with eldoc and eglot.
To give you a background about what I was trying to do:
I set
![image](https://user-images.githubusercontent.com/12388970/223349449-d65d4b96-3793-4065-99ff-32603a1eddcf.png)
eldoc-documentation-strategy
toeldoc-documentation-compose
to show multiple source of eldoc. For example below buffer has 4 source (elisp-eldoc-var-docstring
elisp-eldoc-funcall
flymake-eldoc-function
embark-eldoc-first-target
):By default there is no blank line to separate each source in eldoc buffer, so I override function
![image](https://user-images.githubusercontent.com/12388970/223350578-de68fb04-3361-496f-950a-84a597befb66.png)
eldoc--format-doc-buffer
to add one (just add one more\n
in the line ofwhen rest do...
). This looks nice:Until I open a buffer with eglot sources (
![image](https://user-images.githubusercontent.com/12388970/223352057-d8bd9eda-d509-4ece-a099-7169348691e5.png)
eglot-signature-eldoc-function
eglot-hover-eldoc-function
python-eldoc-function
flymake-eldoc-function
emabark-eldoc-first-target
):As you may see, there is one extra blank line from
eglot-hover-eldoc-function
, which is inconsistent with other sources. This is because of the issue that I've raised to markdown-mode.eglot-hover-eldoc-function
use the view mode from markdown-mode to format the code in the lsp documentation with markdown format. And when markdown-mode hides the markup when enabling the view mode, it leaves an extra blank line if the "```" close mark is at the end of the buffer.I was trying for several days to figure out a work-around to remove the extra blank line for
eglot-hover-eldoc-function
, but still not find out the correct. Hence I'd like to ask for some advice on how to modify this. Ideally it should be a more general solution to modify theeldoc-buffer
oreglot-hover-eldoc-function
but a eldoc-box specific method would also be great enough.Sorry for bothering you with such a wall of text only for a minor format issue. I hope you may have some insight that can save me from this rabbit hole :)
The text was updated successfully, but these errors were encountered: