MaskRay / ccls

C/C++/ObjC language server supporting cross references, hierarchies, completion and semantic highlighting
Apache License 2.0
3.73k stars 254 forks source link

hover not parsing comments #779

Open ranjithshegde opened 3 years ago

ranjithshegde commented 3 years ago

Observed behavior

calling doHover does not parse comment strings or doxygen markers in nvim. This is true for language clients of Coc & builtin nvim-lsp

ccls

Expected behavior

this is an output of cland for the same document+word using same language client on nvim

clangd

Steps to reproduce

configure ccls for nvim language clients (coc/nvim-lsp), request hover for a variable/function/class/anything

Temporary solution proposal

if this is not a priority, I would request an option in init_options to disable ccls-hover feature so that clangd-lsp can handle it for now

System information

FelipeLema commented 3 years ago

this implemented getComment() (as an ad-hoc Doxygen-formatted text parser)

https://github.com/MaskRay/ccls/blob/c6686be382da46baed4245c7963f07964575e90c/src/indexer.cc#L411-L465

I will give it a go in the next few days

FelipeLema commented 3 years ago

it seems it parses some doxygen comments, but not all of them...

@ranjithshegde do you have a sample code to test with? a file within a repo? can you point us to the sample code you showed?