support changing border and other options

Open
#70 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
lua
Domain
tooling

Research direction

Start by locating the float-window creation code and the buffer and window option handling described in the issue, including vim.api.nvim_buf_set_option and vim.api.nvim_win_set_option. Determine how user-supplied options, borders, and border-buffer colors should be exposed, then verify that float windows retain their defaults while accepting the requested overrides.

Written by the indexing model from the issue text.

Description

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
Dominant language
Lua
Stars
3.5k
Forks
340
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nvim-lua/plenary.nvim

All issues in nvim-lua/plenary.nvim

Similar issues

More Lua issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.