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

doc-render issue in 29 #742

Closed
seagle0128 opened this issue Dec 18, 2022 · 6 comments · Fixed by emacs-lsp/lsp-mode#3867
Closed

doc-render issue in 29 #742

seagle0128 opened this issue Dec 18, 2022 · 6 comments · Fixed by emacs-lsp/lsp-mode#3867

Comments

@seagle0128
Copy link
Contributor

seagle0128 commented Dec 18, 2022

  • Emacs 29.0.60
  • macOS 13.1
  • lsp-mode-20221217.1815

lsp-ui-doc is not rendered correctly, as the screenshots below.

clangd
image

pyright
image

@ianyepan
Copy link

ianyepan commented Dec 18, 2022

Same thing in Emacs 28.2. Happens with the clangd server. Those faces inherit markdown-code-face, by the way.

Edit: this happened only very recently. It was working well for the past few years.

@jcs090218
Copy link
Member

jcs090218 commented Dec 18, 2022

Was it working earlier? The recent relevant commit is emacs-lsp/lsp-mode@e2a1b5f; not sure if this is the cause. 😕

@def-SpaceWar
Copy link

def-SpaceWar commented Dec 18, 2022

I also have Emacs 28.2 and I get the same error in CSharp.

  • OS: Linux
  • Distro: Gentoo
  • Emacs: 28.2
  • Lsp-ui: Built off of master using straight.el.

image

But it also sometimes works.

image

And this error is only recent, not something I was experiencing before.

@stonekyx
Copy link

stonekyx commented Dec 19, 2022

Looks like emacs-lsp/lsp-mode@e2a1b5f (emacs-lsp/lsp-mode#3844) is indeed related. Removing the following function call in lsp--fontlock-with-mode fixes it for me:

(when (eq mode 'lsp--render-markdown)
              (lsp--fix-markdown-links))

@jcs090218
Copy link
Member

@vspinu Can you help us here?

jcs090218 referenced this issue in emacs-lsp/lsp-mode Dec 19, 2022
… buffers (#3844)

* Fix markdown link navigation in *lsp-help* buffers

  Fix emacs-lsp/lsp-ui#452

* Treat all markdown link types the same

  - markdown-link-face, markdown-url-face and markdown-plain-url-face

* Inhibit read-only in lsp--fix-markdown-links

  for Emacs27

* Use markdown-find-next-prop instead of text-property-search-forward

 which is missing on Emacs26

* Start searching from point-min in lsp--fix-markdown-links
@vspinu
Copy link

vspinu commented Dec 19, 2022

Something is throwing there and you get the plain string instead. To be frank I think that try error logic could be improved. Falling back to plain str is too conservative IMO. I think the buffer string should be returned regardless, in case of errors the buffer string is likely to be better formatted anyhow.

vspinu added a commit to vspinu/lsp-mode that referenced this issue Dec 19, 2022
vspinu added a commit to vspinu/lsp-mode that referenced this issue Dec 19, 2022
yyoncho pushed a commit to emacs-lsp/lsp-mode that referenced this issue Dec 19, 2022
* Make sure `end` is not nil in lsp--fix-markdown-links

  Fixes emacs-lsp/lsp-ui#742

* Use with-demoted-errors during doc fontlocing

  Also display the buffer string and not the unformated string
  regardless of the errors.
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 a pull request may close this issue.

6 participants