Skip to content

Commit

Permalink
feat(view): ensure it's above other floating windows (#442)
Browse files Browse the repository at this point in the history
* feat(view): ensure it's above other floating windows

* feat(view): add user configurable z-index
  • Loading branch information
LoneExile committed Apr 18, 2023
1 parent f82ca7f commit 9443778
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -127,6 +127,7 @@ WhichKey comes with the following defaults:
margin = { 1, 0, 1, 0 }, -- extra window margin [top, right, bottom, left]. When between 0 and 1, will be treated as a percentage of the screen size.
padding = { 1, 2, 1, 2 }, -- extra window padding [top, right, bottom, left]
winblend = 0, -- value between 0-100 0 for fully opaque and 100 for fully transparent
zindex = 1000, -- positive value to position WhichKey above other floating windows.
},
layout = {
height = { min = 4, max = 25 }, -- min and max height of the columns
Expand Down
1 change: 1 addition & 0 deletions lua/which-key/config.lua
Expand Up @@ -51,6 +51,7 @@ local defaults = {
margin = { 1, 0, 1, 0 }, -- extra window margin [top, right, bottom, left]. When between 0 and 1, will be treated as a percentage of the screen size.
padding = { 1, 2, 1, 2 }, -- extra window padding [top, right, bottom, left]
winblend = 0, -- value between 0-100 0 for fully opaque and 100 for fully transparent
zindex = 1000, -- positive value to position WhichKey above other floating windows.
},
layout = {
height = { min = 4, max = 25 }, -- min and max height of the columns
Expand Down
1 change: 1 addition & 0 deletions lua/which-key/view.lua
Expand Up @@ -68,6 +68,7 @@ function M.show()
col = margins[4],
style = "minimal",
noautocmd = true,
zindex = config.options.window.zindex
}
if config.options.window.position == "top" then
opts.anchor = "NW"
Expand Down

0 comments on commit 9443778

Please sign in to comment.