kndndrj / nvim-dbee

Interactive database client for neovim
GNU General Public License v3.0
606 stars 39 forks source link

[feat] Allow to configure window options for the hovers, such as borders #102

Closed lervag closed 2 months ago

lervag commented 2 months ago

The hover options are set here:

https://github.com/kndndrj/nvim-dbee/blob/8e557d8fb2aee41769104f1ceef1a69aac733ce1/lua/dbee/ui/common/floats.lua#L253-L263

I would very much want to pass some config here to have the hovers consistent with my personal config. E.g., I want to adjust the borders and possibly the title.

petobens commented 2 months ago

Hi @kndndrj. I tried your latest PR that should close this issue. One thing I noticed is that if I add something like:

        window_options = {
            number = true,
            relativenumber = true,
        },

then the first time I run dbee.toggle() line numbers are shown but if I toggle db again then the line numbers disappear. Can the window option settings be made persistent? (i.e survive toggling)? Thanks!

kndndrj commented 2 months ago

Hey @petobens thanks for testing, I'll look into it.

kndndrj commented 2 months ago

@petobens btw, which UI element is in question? Or is it all of them?

kndndrj commented 2 months ago

@petobens should be fixed now

petobens commented 2 months ago

Thanks!

lervag commented 2 months ago

Thanks for this, I'll be testing it now - sorry for not being in time to test before the merge!

lervag commented 2 months ago

This seems to work very well, thanks! However, I found a case where the custom float options were not passed - probably best explained with a simple screenshot:

image

I.e.: The hover for database picker.

lervag commented 2 months ago

And also for the "Select a query" menu.