Skip to content

Commit

Permalink
feat: built-in select has winblend option
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed Dec 3, 2021
1 parent 106dfb9 commit f57f0f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/dressing/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ local default_config = {
col = 0,
border = "rounded",

-- Window options
winblend = 10,

-- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
width = nil,
max_width = 0.8,
Expand Down
1 change: 1 addition & 0 deletions lua/dressing/select/builtin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ M.select = function(config, items, opts, on_choice)
style = "minimal",
}
local winnr = vim.api.nvim_open_win(bufnr, true, winopt)
vim.api.nvim_win_set_option(winnr, "winblend", config.winblend)
vim.api.nvim_win_set_option(winnr, "cursorline", true)
if vim.fn.exists("&cursorlineopt") ~= 0 then
vim.api.nvim_win_set_option(winnr, "cursorlineopt", "both")
Expand Down

0 comments on commit f57f0f3

Please sign in to comment.