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

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

Closed
lervag opened this issue Apr 14, 2024 · 8 comments · Fixed by #98
Closed

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

lervag opened this issue Apr 14, 2024 · 8 comments · Fixed by #98

Comments

@lervag
Copy link

lervag commented Apr 14, 2024

The hover options are set here:

local winid = vim.api.nvim_open_win(bufnr, false, {
relative = "win",
win = relative_winid,
width = win_width,
height = win_height,
col = col,
row = cursor_row - 1,
anchor = anchor,
border = "rounded",
style = "minimal",
})

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.

@kndndrj kndndrj mentioned this issue Apr 22, 2024
@petobens
Copy link

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
Copy link
Owner

kndndrj commented Apr 23, 2024

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

@kndndrj
Copy link
Owner

kndndrj commented Apr 23, 2024

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

@kndndrj
Copy link
Owner

kndndrj commented Apr 23, 2024

@petobens should be fixed now

@petobens
Copy link

Thanks!

@lervag
Copy link
Author

lervag commented Apr 23, 2024

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

@lervag
Copy link
Author

lervag commented Apr 23, 2024

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
Copy link
Author

lervag commented Apr 23, 2024

And also for the "Select a query" menu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants