-
Notifications
You must be signed in to change notification settings - Fork 201
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
Don't strip invisible text when formatting hover string #866
Conversation
Why not keep the string-trim and use simply buffer-substring? |
This was introduced in joaotavora#482 due to a bad interaction with a specific server. But this solution makes hyperlinks in Eldoc buffers unclickable, because the markdown-mode function that visits a link relies on the invisible text. Fixes joaotavora#865. * eglot.el (eglot--format-markup): Don't use 'filter-buffer-substring'; instead, keep invisible text.
I seemed a bit more idiomatic to not allocate one or two extra strings, but I change it as you suggested (we can also use trim-left to only allocate 0 or 1 extra strings :-)). |
I see what you mean, yes, we could save a string allocation, but the current solution is "no worse" than what we currently have in that department. And my guess is it won't matter much. If you want to change it to |
OK, thanks! Now do you think you can look at |
All right, I can say 3 things: (1) passing a string with invisible attributes to I suspect the problem is in the line-counting logic of But actually, since pylsp apparently changed, it might make sense to wait and see if anyone complains again. I think servers should behave reasonably with editors with zero or crippled markdown rendering capabilities. |
…hover string This was introduced in joaotavora/eglot#482 due to a bad interaction with a specific server. But this solution makes hyperlinks in Eldoc buffers unclickable, because the markdown-mode function that visits a link relies on the invisible text. Per joaotavora/eglot#866 * eglot.el (eglot--format-markup): Use buffer-string instead of filter-buffer-substring
…hover string This was introduced in joaotavora/eglot#482 due to a bad interaction with a specific server. But this solution makes hyperlinks in Eldoc buffers unclickable, because the markdown-mode function that visits a link relies on the invisible text. Per joaotavora/eglot#866 * eglot.el (eglot--format-markup): Use buffer-string instead of filter-buffer-substring
This was introduced in #482 due to a bad interaction with a specific server. But this solution makes hyperlinks in Eldoc buffers unclickable, because the markdown-mode function that visits a link relies on the invisible text. Per #866 * eglot.el (eglot--format-markup): Use buffer-string instead of filter-buffer-substring #865: joaotavora/eglot#865 #482: joaotavora/eglot#482 #866: joaotavora/eglot#866
This was introduced in joaotavora/eglot#482 due to a bad interaction with a specific server. But this solution makes hyperlinks in Eldoc buffers unclickable, because the markdown-mode function that visits a link relies on the invisible text. Per joaotavora/eglot#866 * eglot.el (eglot--format-markup): Use buffer-string instead of filter-buffer-substring GitHub-reference: fix joaotavora/eglot#865
This was introduced in joaotavora/eglot#482 due to a bad interaction with a specific server. But this solution makes hyperlinks in Eldoc buffers unclickable, because the markdown-mode function that visits a link relies on the invisible text. Per joaotavora/eglot#866 * eglot.el (eglot--format-markup): Use buffer-string instead of filter-buffer-substring GitHub-reference: fix joaotavora/eglot#865
This was introduced in #482 due to a bad interaction with a specific
server. But this solution makes hyperlinks in Eldoc buffers
unclickable, because the markdown-mode function that visits a link
relies on the invisible text.
Fixes #865.
'filter-buffer-substring'; instead, keep invisible text.