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

Fix jdtls, rust-analyzer documentation issues. #846

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

zhoupen9
Copy link
Contributor

@zhoupen9 zhoupen9 commented Feb 2, 2024

current jdtls lsp server textDocument/hover response contains a dict and then a plaintext, such as

{
   "contents": [
     {
        "language": "java",
        "value": "org.springframework.boot.SpringBootApplication"
     },
     "Class that can be used to bootstrap ....."
   ]
}

Lsp-bridge renders a text block with plaintext.

This patch checks response for "language": "java", and render doc contents without modification when java found, since responding doc already in "markdown" format.

Configure "jdtls" and "rust-analyzer" to request "markdown" format content in textDocument/hover requests.

current jdtls lsp server textDocument/hover response contains a dict
and then a plaintext, such as
```json
{
   "contents": [
     {
        "language": "java",
        "value": "org.springframework.boot.SpringBootApplication"
     },
     "Class that can be used to bootstrap ....."
   ]
}
```
Lsp-bridge renders a ```text``` block with plaintext.

This patch checks response for "language": "java", and render doc
contents without modification when java found, since responding doc
already in "markdown" format.

Configure "jdtls" and "rust-analyzer" configurations to request
"markdown" format content in textDocument/hover requests.
@manateelazycat manateelazycat merged commit a220ada into manateelazycat:master Feb 2, 2024
1 check passed
@zhoupen9 zhoupen9 deleted the fix-jdtls-doc branch February 4, 2024 01:51
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

Successfully merging this pull request may close these issues.

2 participants