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

[hover] ParseLSPResult sets language 'text' for missing spec #4699

Conversation

oliverralbertini
Copy link
Contributor

@oliverralbertini oliverralbertini commented Dec 26, 2023

I have an LSP that is returning markdown code blocks on Hover with no language specified, e.g.

```
Foobar
```

As a result, you get "```" in the message line which is not that useful.

I made the regex to catch the first code fence accept empty language as well, and if it's empty, we set it to "text".

This makes it so that LSPs that return no language still produce legible restuls on the message line.

Fixes #4698

I have an LSP that is returning markdown code blocks on Hover with no
language specified, e.g.

````
```
Foobar
```
````

As a result, you get "```" in the message line which is not that useful.

I made the regex to catch the first code fence accept empty language as
well, and if it's empty, we set it to "text".

This makes it so that LSPs that return no language still produce legible
restuls on the message line.
Copy link
Contributor

@hsanson hsanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@hsanson hsanson merged commit 506d392 into dense-analysis:master Feb 22, 2024
7 checks passed
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.

Markdown hover text without language spec keep code fences
2 participants