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

doxygen documentation is shown in hover window with escaped punctiation #48

Closed
jsholmes opened this issue May 7, 2020 · 16 comments
Closed

Comments

@jsholmes
Copy link

jsholmes commented May 7, 2020

I don't know if this is a coc issue or a coc-clangd issue, but when I get hover information about a symbol, the documentation is shown with escaped punctuation making it quite hard to read. See screenshot.

## versions

vim version: NVIM v0.5.0-dev
node version: v14.1.0
coc.nvim version: 0.0.78-57637bb44c
term: screen-256color
platform: linux

## Output channel: clangd log

I[14:23:11.272] clangd version 9.0.1-8+hrt1hrt9.1

Screen Shot 2020-05-07 at 2 28 43 PM

@sam-mccall
Copy link
Member

Its fundamentally a coc issue: it requests the markdown version of the hover card, but then doesn't unescape the text per markdown rules.

That said, much escaping is optional and latest clangd should be doing much less (though there are common cases where it can't be avoided)

@jsholmes
Copy link
Author

jsholmes commented May 8, 2020

Yeah... I'm working to get my codebase building with clang-10. I'm on clang-8 right now, so maybe that's causing a lot of the excess markdown.

@jsholmes
Copy link
Author

jsholmes commented May 8, 2020

well, clangd-10 still has ample excess markdown.

@sam-mccall
Copy link
Member

I'm sure that's true, but do you have an example?

@jsholmes
Copy link
Author

jsholmes commented May 8, 2020

Same example, but for clangd-10 rather than 9.

Screen Shot 2020-05-08 at 11 44 12 AM

@sam-mccall
Copy link
Member

My mistake, the escaping changes didn't make the clangd-10 release :-(

It looks better at trunk, thought there are still a few backslashes we can't easily drop:

image

(The t%2 typo is bothering me, sorry about that...)

@sam-mccall
Copy link
Member

sam-mccall commented May 8, 2020

The wrapping is still terrible, we do detect the hard breaks after the colons but this is a good example of where assuming short lines imply hard breaks would be a big win.
(Sometime between clangd 9 and 10 we stopped preserving line breaks verbatim)

@jsholmes
Copy link
Author

Why did you guys stop preserving the line breaks? Seems like that could at least be an option.

@talk2drys
Copy link

is there a work around for this?.
clangd_hover_format_error

@kadircet
Copy link
Member

we've improved escaping recently. you can build clangd at head, or use a binary from our weekly releases

@talk2drys
Copy link

talk2drys commented May 24, 2020

thanks @kadircet I tested it with the latest snapshot, and saw improvement. attached is the updated screenshot.

updated_clangd_version

updated_view

@Lythenas
Copy link

Lythenas commented Sep 8, 2020

It looks like they don't want to fix this in coc (neoclide/coc.nvim#2308). I often use markdown in my doc comments so this is really annoying.

Is it possible to tell clangd to do no escaping at all?

@flw-cn
Copy link

flw-cn commented Sep 13, 2020

@jsholmes You can try Plug “flw-cn/vim-markdown” which is a fork for plasticboy/vim-markdown and it automatically hides the backslash. see PR preservim/vim-markdown#515 to see exactly what it does.

@fannheyward
Copy link
Member

coc.nvim has rework document highlights, neoclide/coc.nvim#2497, please upgrade your coc.nvim and try again.

@GopherJ
Copy link

GopherJ commented Jan 14, 2021

I also have some documentation issue with clangd-9 and latest coc.nvim: image

@fannheyward
Copy link
Member

Latest clangd has improved a lot, close for now.

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

No branches or pull requests

8 participants