Fildo7525 / pretty_hover

A small and customizable neovim plugin for pretty printing the hover information from LSP servers
MIT License
171 stars 3 forks source link

One line of padding on both top and bottom of pretty hover #24

Closed philocalyst closed 1 month ago

philocalyst commented 1 month ago

Hey! I find this plugin to make things more pretty! But I am running into a specific difficulty regarding that padding, as shown below. For very small definitions it can literally triple the size of the popup. If this is a stylistic choice, could an option be added to turn it off?

image
iguanacucumber commented 1 month ago

It's because under the hood it's just hidden markdown image

iguanacucumber commented 1 month ago

( i forgot to say that vanilla neovim works like that, and it's noice.nvim which removes the padding by removing the markdown text )

philocalyst commented 1 month ago

I suspected this but didn't understand the need -- in the term it's all just plaintext, modified by colors and font-options, so wouldn't it be easy enough to just convert the source markdown into text with the equivalent formatting? I could help!

iguanacucumber commented 1 month ago

i'm not a lua dev but the issue seems to be in either core/util.lua or references.lua

Fildo7525 commented 1 month ago

Hi, to clarify. Would you like to remove it just from the one-line statements? If yes and you do not care about the highlighting it would be easier (i.e. the number color)

iguanacucumber commented 1 month ago

Hi, i just want to remove the "padding" above and below "22 bytes" I don't really care about the highlighting

Fildo7525 commented 1 month ago

Hi, can you confirm that it works also for your usecase?

iguanacucumber commented 1 month ago

works perfectly