languageserver
languageserver copied to clipboard
Over does not display help correctly
I am using lspsaga to enhance LSP in neovim (https://github.com/nvimdev/lspsaga.nvim).
One interesting feature is the over (https://nvimdev.github.io/lspsaga/hover/) function (shift+k) that provides function help. When I use this function in other language, the display looks like this:
In Rust:
In Python:
However, while this kinda works with R, the information is displayed as Markdown/HTML:
Anyone know if this could be easily fixed?
Hi @PMassicotte, you can solve this setting r.lsp.rich_documentation to false in your lspsaga config. I use mason so I don't know how to configure this setting in lspsaga.
cool let me try!
I was able to get it working (I think) by adding languageserver.rich_documentation = FALSE, in my .Rprofile.
cc @jalvesaq for future reference (adding information in R.nvim).
While setting r.lsp.rich_documentation to false avoids formatting problems, it downgrades the user experience by removing the syntax highlighting. It could be better if https://github.com/REditorSupport/languageserver/blob/master/inst/lua/html-to-markdown.lua could be improved to remove the remaining <div> tags and format the Arguments in a different way (not in table format).
I think this is a good suggestion. Would that require a lot of work? Happy to help if needed.