feat: limit the terminal width

Also add the possibility of configuring it.
This commit is contained in:
2026-06-11 22:15:15 +02:00
parent 9609afd731
commit 1445303411
2 changed files with 49 additions and 6 deletions
+15 -3
View File
@@ -10,6 +10,18 @@ Run:
:OpenCodeToggle
```
The command opens `opencode` in a right-side terminal window. Running the command
again closes only the window; the terminal buffer and `opencode` session stay
alive. Run `:OpenCodeToggle` again to show the same session.
The command opens `opencode` in a right-side terminal window sized to 40% of the
screen width. Running the command again closes only the window; the terminal
buffer and `opencode` session stay alive. Run `:OpenCodeToggle` again to show the
same session.
## Configuration
```lua
require("opencode").setup({
width = 0.4,
})
```
`width` is the fraction of the screen width used by the terminal window. The
default is `0.4`.