feat: support top for position

closes #5
This commit is contained in:
amrbashir
2023-01-28 00:42:39 +02:00
parent f16573fe8a
commit 79c518a9d7
2 changed files with 4 additions and 1 deletions

View File

@@ -38,7 +38,7 @@ EOF
## Usage
Use `:DocsViewToggle` to open/close the docs view side panel
Use `:DocsViewToggle` to open/close the docs view panel
## LICENSE

View File

@@ -17,6 +17,9 @@ local function toggle()
if cfg.position == "bottom" then
vim.api.nvim_command("bel new")
width = vim.api.nvim_win_get_width(prev_win)
elseif cfg.position == "top" then
vim.api.nvim_command("top new")
width = vim.api.nvim_win_get_height(prev_win)
elseif cfg.position == "left" then
vim.api.nvim_command("topleft vnew")
height = vim.api.nvim_win_get_height(prev_win)