lspsaga.nvim
lspsaga.nvim copied to clipboard
`Lspsaga hover_doc` displays weird `\`s
Description
Lspsaga's hover doc command doesn't escape some characters properly.
Expected Behavior
It escapes the characters properly.
Actual Behavior
As you can see lot of \
are present in the hover doc. This is a screenshot of :Lspsaga hover_doc
Neovim Built in Behavior
This is vim.lsp.buf.hover()
, it escapes the characters properly.
Details
Reproduce
- Open a python file with Pyright LSP for example
- Compare the doc shown between
Lspsaga hover_doc
andvim.lsp.buf.hover()
Environment
- nvim --version output: https://sourceb.in/KnkjM67EKH
- Operating system: Pop!_OS 20.04
- lspsaga commit: Latest (https://github.com/tami5/lspsaga.nvim/commit/9f7ee18f79baed76c648f79ee7352b8fe65f2933)
Yah, I noticed that with one other server I forgot about. I believe it should be an easy fix, hopefully soon, but by all mean a pr is welcomed
Yah, I noticed that with one other server I forgot about. I believe it should be an easy fix, hopefully soon, but by all mean a pr is welcomed
Thank you, but I would prefer the Lspsaga team to fix it.
This seems can be fixed by changing the syntax type of the hover window from markdown
into lsp_markdown
and set conceallevel=2
, as shown in the following screenshots.
Before:
After:
Or maybe we could just reuse vim.lsp.util.stylize_markdown()
? It has lots of similarities to the lspsaga's fancy_floating_markdown()
. What's your idea? @tami5
It has lots of similarities to the lspsaga's fancy_floating_markdown().
some stuff in lsp core is inspired by Lspsaga .
🤔 lsp_markdown makes sense to use as users may have bunch of autocmd tied with markdown filetype like I do. I'm with making and reusing our own thing, so that in the future we will have the flexibility of adding features.
@againxx with the above mentioned, feel free to choice whatever makes more sense to you
reuse vim.lsp.util.stylize_markdown()
I'm right now looking into and I guess @glepnir copied it over and made few adjustments, I'm experimenting with new version right now
@tami5
I have a similar problem, but a little bit different from @againxx.
- MacOS 12.3
- Nvim 0.6.1
- latest lspsaga
How should I fix this?