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

Over does not display help correctly #670

Open
PMassicotte opened this issue Jun 28, 2024 · 5 comments
Open

Over does not display help correctly #670

PMassicotte opened this issue Jun 28, 2024 · 5 comments

Comments

@PMassicotte
Copy link

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:

image

In Python:

image

However, while this kinda works with R, the information is displayed as Markdown/HTML:

image

Anyone know if this could be easily fixed?

@rumichaska
Copy link

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.

@PMassicotte
Copy link
Author

cool let me try!

@PMassicotte
Copy link
Author

PMassicotte commented Jul 2, 2024

I was able to get it working (I think) by adding languageserver.rich_documentation = FALSE, in my .Rprofile.

image

cc @jalvesaq for future reference (adding information in R.nvim).

@jalvesaq
Copy link

jalvesaq commented Jul 2, 2024

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).

@PMassicotte
Copy link
Author

I think this is a good suggestion. Would that require a lot of work? Happy to help if needed.

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

3 participants