update opencode, load env
This commit is contained in:
parent
83d7ea0443
commit
9d2e376259
|
|
@ -25,18 +25,20 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
|
local opencode_cmd = [[zsh -ic 'opencode --port']]
|
||||||
|
|
||||||
---@type opencode.Opts
|
---@type opencode.Opts
|
||||||
vim.g.opencode_opts = {
|
vim.g.opencode_opts = {
|
||||||
server = {
|
server = {
|
||||||
start = function()
|
start = function()
|
||||||
require('opencode.terminal').open('opencode --port', {
|
require('opencode.terminal').open(opencode_cmd, {
|
||||||
split = 'right',
|
split = 'right',
|
||||||
width = math.max(40, math.floor(vim.o.columns * 0.4)),
|
width = math.max(40, math.floor(vim.o.columns * 0.4)),
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
stop = function() require('opencode.terminal').close() end,
|
stop = function() require('opencode.terminal').close() end,
|
||||||
toggle = function()
|
toggle = function()
|
||||||
require('opencode.terminal').toggle('opencode --port', {
|
require('opencode.terminal').toggle(opencode_cmd, {
|
||||||
split = 'right',
|
split = 'right',
|
||||||
width = math.max(40, math.floor(vim.o.columns * 0.4)),
|
width = math.max(40, math.floor(vim.o.columns * 0.4)),
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue