noice.nvim
noice.nvim copied to clipboard
Blank line at the top(or bottom) of lsp window and no way remove it
Hover
Signature
Completion
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
You are right, that makes sense.
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.
Another issue maybe also related to this. 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.
There's no way to caculate the concealed str width as far as I know. So that's why the window width is wider
Indeed, it's a small problem, does't affecting the rest of the awesome features
couldn't this be done with injections @folke or have I missunderstood something?
@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.
I thought with the "highlight a region" you meant sth like injections