feat: add border config for SSH and keymaps help window (#299)

* feat: add config for ssh window border

* chore: add documentation for ssh window border

* feat: add config for keymaps help window border

* chore: add documentatoin for keymaps help window border
This commit is contained in:
Reinder van Bochove 2024-02-20 05:00:49 +01:00 committed by GitHub
parent bf753c3e3f
commit e27cc4e138
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 28 additions and 2 deletions

View file

@ -193,6 +193,10 @@ require("oil").setup({
["g."] = "actions.toggle_hidden",
["g\\"] = "actions.toggle_trash",
},
-- Configuration for the floating keymaps help window
keymaps_help = {
border = "rounded",
},
-- Set to false to disable all of the above keymaps
use_default_keymaps = true,
view_options = {
@ -268,6 +272,10 @@ require("oil").setup({
winblend = 0,
},
},
-- Configuration for the floating SSH window
ssh = {
border = "rounded",
},
})
```

View file

@ -84,6 +84,10 @@ CONFIG *oil-confi
["g."] = "actions.toggle_hidden",
["g\\"] = "actions.toggle_trash",
},
-- Configuration for the floating keymaps help window
keymaps_help = {
border = "rounded",
},
-- Set to false to disable all of the above keymaps
use_default_keymaps = true,
view_options = {
@ -159,6 +163,10 @@ CONFIG *oil-confi
winblend = 0,
},
},
-- Configuration for the floating SSH window
ssh = {
border = "rounded",
},
})
<

View file

@ -1,3 +1,4 @@
local config = require("oil.config")
local layout = require("oil.layout")
local util = require("oil.util")
@ -277,7 +278,7 @@ function SSHConnection:open_terminal()
row = row,
col = col,
style = "minimal",
border = "rounded",
border = config.ssh.border,
})
vim.cmd.startinsert()
end

View file

@ -67,6 +67,10 @@ local default_config = {
["g."] = "actions.toggle_hidden",
["g\\"] = "actions.toggle_trash",
},
-- Configuration for the floating keymaps help window
keymaps_help = {
border = "rounded",
},
-- Set to false to disable all of the above keymaps
use_default_keymaps = true,
view_options = {
@ -142,6 +146,10 @@ local default_config = {
winblend = 0,
},
},
-- Configuration for the floating SSH window
ssh = {
border = "rounded",
},
}
-- The adapter API hasn't really stabilized yet. We're not ready to advertise or encourage people to

View file

@ -1,4 +1,5 @@
local actions = require("oil.actions")
local config = require("oil.config")
local layout = require("oil.layout")
local util = require("oil.util")
local M = {}
@ -111,7 +112,7 @@ M.show_help = function(keymaps)
height = math.min(editor_height, #lines),
zindex = 150,
style = "minimal",
border = "rounded",
border = config.keymaps_help.border,
})
local function close()
if vim.api.nvim_win_is_valid(winid) then