plenary.nvim icon indicating copy to clipboard operation
plenary.nvim copied to clipboard

support changing border and other options

Open kkharji opened this issue 4 years ago • 0 comments

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

kkharji avatar Feb 11 '21 21:02 kkharji