From 332814e65b3af562dfd9d3cf95896780623daef5 Mon Sep 17 00:00:00 2001 From: pablon <73798198+pablon@users.noreply.github.com> Date: Sat, 7 Mar 2026 07:57:10 +0100 Subject: [PATCH 1/2] feat(nvim): add tmux provider support for OpenCode plugin - Add automatic provider detection based on TMUX environment variable - Configure tmux provider with window focus and passthrough settings - Enhance snacks provider with auto_close and custom filetype - Set provider.enabled dynamically (tmux when inside tmux, snacks otherwise) - Configure tmux.allow_passthrough=false to prevent UI conflicts with nvim - Add explicit window.enter=true for both providers - Set filetype to 'opencode_terminal' for proper syntax highlighting Signed-off-by: pablon <73798198+pablon@users.noreply.github.com> --- GentlemanNvim/nvim/lua/plugins/opencode.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/GentlemanNvim/nvim/lua/plugins/opencode.lua b/GentlemanNvim/nvim/lua/plugins/opencode.lua index 864d0904..f5fe55de 100644 --- a/GentlemanNvim/nvim/lua/plugins/opencode.lua +++ b/GentlemanNvim/nvim/lua/plugins/opencode.lua @@ -103,11 +103,26 @@ return { }, }, config = function() + local provider = vim.env.TMUX and "tmux" or "snacks" vim.g.opencode_opts = { provider = { + enabled = provider, + tmux = { + win = { + enter = true, + }, + focus = true, + allow_passthrough = false, + }, snacks = { + auto_close = true, + focus = true, win = { + enter = true, position = "left", + bo = { + filetype = "opencode_terminal", + }, }, }, }, From e91922d6043a655da5ff39132397eacd5ccc514e Mon Sep 17 00:00:00 2001 From: pablon <73798198+pablon@users.noreply.github.com> Date: Sat, 7 Mar 2026 08:18:52 +0100 Subject: [PATCH 2/2] fix(nvim): add position=left for tmux provider to opencode.lua Signed-off-by: pablon <73798198+pablon@users.noreply.github.com> --- GentlemanNvim/nvim/lua/plugins/opencode.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/GentlemanNvim/nvim/lua/plugins/opencode.lua b/GentlemanNvim/nvim/lua/plugins/opencode.lua index f5fe55de..144f2966 100644 --- a/GentlemanNvim/nvim/lua/plugins/opencode.lua +++ b/GentlemanNvim/nvim/lua/plugins/opencode.lua @@ -110,6 +110,7 @@ return { tmux = { win = { enter = true, + position = "left", }, focus = true, allow_passthrough = false,