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

Allow to set title in winopts for widgets #973

Closed
lervag opened this issue Jun 14, 2023 · 1 comment
Closed

Allow to set title in winopts for widgets #973

lervag opened this issue Jun 14, 2023 · 1 comment

Comments

@lervag
Copy link
Contributor

lervag commented Jun 14, 2023

Problem Statement

I want to apply some global window option configuration for widgets. The main intent is to make it more clear which window I have opened and to have a streamlined UI (I customize other types of windows as well). In particular, I want to put the title of the window into the border.

Possible Solutions

I know I can do this by using the .build mechanism, but then I will need to use this more verbose mechanism for every mapping. And there is already support for passing window options such as the border:

nvim-dap/lua/dap/ui.lua

Lines 18 to 19 in 7c1d47c

elseif k == 'border' then
api.nvim_win_set_config(win, {[k]=v})

I propose adding an additional:

    elseif k == 'title' then
      api.nvim_win_set_config(win, {[k]=v})

Of course, this could possibly be improved e.g. by doing something like (pseudocode):

elseif k in valid_options then

where valid_options was a list of the valid floating window options (see :help nvim_open_win for the list of options).

Considered Alternatives

No response

@lervag
Copy link
Contributor Author

lervag commented Jun 14, 2023

Closed by #974.

@lervag lervag closed this as completed Jun 14, 2023
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

No branches or pull requests

1 participant