From 5ccdba3fac6b148ad5c3601c27df79797cc3332e Mon Sep 17 00:00:00 2001 From: hlstwizard Date: Mon, 30 Mar 2026 09:06:40 +0800 Subject: [PATCH] opencode size --- lua/custom/plugins/opencode.lua | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/lua/custom/plugins/opencode.lua b/lua/custom/plugins/opencode.lua index 68b7fd4d..9a61f6cf 100644 --- a/lua/custom/plugins/opencode.lua +++ b/lua/custom/plugins/opencode.lua @@ -27,7 +27,23 @@ return { config = function() ---@type opencode.Opts vim.g.opencode_opts = { - -- Your configuration, if any; goto definition on the type or field for details + server = { + start = function() + require("opencode.terminal").open("opencode --port", { + split = "right", + width = math.max(40, math.floor(vim.o.columns * 0.25)), + }) + end, + stop = function() + require("opencode.terminal").close() + end, + toggle = function() + require("opencode.terminal").toggle("opencode --port", { + split = "right", + width = math.max(40, math.floor(vim.o.columns * 0.25)), + }) + end, + }, } vim.o.autoread = true -- Required for `opts.events.reload`