You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have updated this plugin to the latest version using my plugin manager
I have provided the text contained in all screenshots as raw text in this issue. This means if there is a screenshot below it is the copy pasted contents of the file in the screenshot. I understand that my issue will be closed if I have not.
Additional information
I can reproduce this behaviour with the following steps:
## Details
Request: #384
Since the `conceal_lines` directive is enabled in the default highlights
neovim actively handles reducing the height of LSP hover doc windows to
remove unnecessary vertical space.
This happens here:
https://github.com/neovim/neovim/blob/master/runtime/lua/vim/lsp/util.lua#L1657-L1661
```lua
-- Reduce window height if TS highlighter conceals code block backticks.
local conceal_height = api.nvim_win_text_height(floating_winnr, {}).all
if conceal_height < api.nvim_win_get_height(floating_winnr) then
api.nvim_win_set_height(floating_winnr, conceal_height)
end
```
Since our decorations are added separately from highlights and behave
very differently there would be no way for neovim to practically pickup
highlights added by this plugin.
To get around this we essentially re-implement this same logic as part
of this plugin. After the first load of a buffer when we are just about
to add our `extmark`s check if the buffer is related to LSP hover docs
and if it is adjust the height taking into account the concealed lines
that will be added (removed) by this plugin.
I don't see this as a bug, since adjusting windows to fit their content
is not something this plugin ever intended to do and supporting every
feature in neovim is not the goal. However, since this is for a very
specific scenario and the implementation is straightforward I've added
it.
> [!CAUTION]
> We'll likely need to update how we identify LSP hover doc buffers over
> time since the current approach is tied to internal undocumented behavior.
> [!NOTE]
> See if we can add a marker on LSP buffers that is a documented feature
> others can rely on, if such a thing doesn't already exist.
MeanderingProgrammer
changed the title
bug: extra lines at the bottom of LSP hover windows
feature: support resizing LSP hover windows based on concealed lines
Mar 31, 2025
MeanderingProgrammer
changed the title
feature: support resizing LSP hover windows based on concealed lines
feature: resize LSP hover windows based on concealed lines
Mar 31, 2025
Neovim version (nvim -v)
0.11.0
Neovim distribution
N/A
Operating system
Linux
Terminal emulator / GUI
Kitty
Describe the bug
I've noticed that even though the backticks for code blocks are concealed, there is still an additional two lines at the end of hover windows:
Without this plugin:
With this plugin:
Expected behavior
The hover window should not have this extra lines, just like the first capture.
Healthcheck output
Plugin configuration
Plugin error log
Confirmations
Additional information
I can reproduce this behaviour with the following steps:
nvim-linux-x86_64.appimage
is the official appimage build.a.lua
init.lua
:The text was updated successfully, but these errors were encountered: