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

Blank line at the top(or bottom) of lsp window and no way remove it #158

Closed
leaxoy opened this issue Oct 29, 2022 · 10 comments · Fixed by #639
Closed

Blank line at the top(or bottom) of lsp window and no way remove it #158

leaxoy opened this issue Oct 29, 2022 · 10 comments · Fixed by #639
Labels
enhancement New feature or request upstream Issue is caused by a dependency (like Neovim)

Comments

@leaxoy
Copy link

leaxoy commented Oct 29, 2022

Hover

image

Signature

image

Completion

image

@leaxoy leaxoy added the bug Something isn't working label Oct 29, 2022
@pBorak
Copy link

pBorak commented Oct 29, 2022

I think those blank lines aren't that blank after all. Those are code blocks with language not visible in the markdown preview. Nevertheless, it would be good to get rid of them :D

Screenshot 2022-10-29 at 09 22 05

@leaxoy
Copy link
Author

leaxoy commented Oct 29, 2022

You are right, that makes sense.

@folke
Copy link
Owner

folke commented Oct 29, 2022

In the default Neovim lsp markdown renderer, we strip the begininig and end of code blocks and use syn-region to highlight the syntax.

The new Noice markdown renderer uses Treesitter under the hood, since it is by far superior in terms of highlighting and concealing, but the Treesitter highlighter currently doesn't support highlighting regions.

I'm planning to make a PR upstream to make this possible.

Once that's done, I can use that to strip those lines.

@folke folke added enhancement New feature or request upstream Issue is caused by a dependency (like Neovim) and removed bug Something isn't working labels Oct 29, 2022
@leaxoy
Copy link
Author

leaxoy commented Oct 29, 2022

Another issue maybe also related to this.
image
The last row in this case is a markdown link.
Window's width is not rendering correctly.
It's should same with the length second last row.

@folke
Copy link
Owner

folke commented Oct 29, 2022

There's no way to caculate the concealed str width as far as I know. So that's why the window width is wider

@leaxoy
Copy link
Author

leaxoy commented Oct 30, 2022

Indeed, it's a small problem, does't affecting the rest of the awesome features

@max397574
Copy link
Contributor

couldn't this be done with injections @folke or have I missunderstood something?

@folke
Copy link
Owner

folke commented Nov 8, 2022

@max397574 what do you mean?

The markdown code blocks are using injections.

Either we need anti-conceal to remove lines from the buffer, or we need a way to highlight a region with treesitter. The last option is what I'm going to see to implement upstream.

@max397574
Copy link
Contributor

I thought with the "highlight a region" you meant sth like injections

@TomLebeda
Copy link

Sorry to comment on an old issue, but what is the current state of this?

Judging by the "Closed" status I guess it's solved somehow, but I can't seem to configure it properly.

I've been trying to figure it out for several hours now, but I still get the empty (concealed) lines in the hover pop-ups (in Rust, with rustaceanvim) no matter what configuration I try.

Right now I use the default config that is used in LazyVim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request upstream Issue is caused by a dependency (like Neovim)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants