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

support changing border and other options #70

Open
kkharji opened this issue Feb 11, 2021 · 0 comments
Open

support changing border and other options #70

kkharji opened this issue Feb 11, 2021 · 0 comments

Comments

@kkharji
Copy link
Contributor

kkharji commented Feb 11, 2021

It would be cool if the user can have more control over the float windows, such as passing window options to be executed, set border and border buffer colors .. etc.

For example:

local set_buf_opts = function(bufnr, buf_opts)
  for k, v in pairs(vim.tbl_extend("keep", buf_opts, { -- defaults 
    bufhidden = "wipe",
    buflisted = false,
    swapfile = false,
    buftype = "nofile"
  })) do vim.api.nvim_buf_set_option(bufnr, k, v) end
end
local set_win_opts = function(win_id, win_opts)
  for k, v in pairs(vim.tbl_extend("keep", win_opts, { -- defaults
    signcolumn = 'no',
    foldenable = false,
    list = false,
    wrap = false,
    spell = false,
    number = false,
    relativenumber = false,
    winhl = "NormalFloat:Normal"
  })) do vim.api.nvim_win_set_option(win_id, k, v) end
end
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