feat: add 'location' config option

This commit is contained in:
2026-06-16 21:11:20 +02:00
parent 21d75ab601
commit 95dd54336a
3 changed files with 61 additions and 11 deletions
+12 -4
View File
@@ -13,7 +13,7 @@ CONTENTS *opencode.nvim-contents*
===============================================================================
INTRODUCTION *opencode.nvim*
opencode.nvim toggles an `opencode` terminal in a right-side split.
opencode.nvim toggles an `opencode` terminal in a configurable split.
The terminal buffer is hidden instead of deleted when closed, so the same
`opencode` session is shown the next time the window is toggled open.
@@ -38,6 +38,7 @@ Using lazy.nvim: >lua
"agj/opencode.nvim",
opts = {
width = 0.3,
location = "right",
},
}
<
@@ -55,7 +56,7 @@ USAGE *opencode.nvim-usage*
*:OpenCodeToggle*
:OpenCodeToggle
Toggle the right-side opencode terminal window.
Toggle the opencode terminal window.
If the terminal window is visible, this closes only the window. The
terminal buffer and running `opencode` process remain alive. If the
@@ -67,6 +68,7 @@ CONFIGURATION *opencode.nvim-configuration*
Call setup with an optional table: >lua
require("opencode").setup({
width = 0.3,
location = "right",
})
<
@@ -74,8 +76,14 @@ Options: *opencode.nvim-options*
*opencode.nvim-width*
width number, default: 0.3
Fraction of the screen width used by the terminal split. Must be
greater than 0 and less than or equal to 1.
Fraction of the screen width used by the terminal split for left and
right locations, or the screen height for top and bottom locations.
Must be greater than 0 and less than or equal to 1.
*opencode.nvim-location*
location string, default: "right"
Side of the screen where the terminal split opens. Must be one of
"left", "right", "top", or "bottom".
===============================================================================
LICENSE *opencode.nvim-license*