Occasionally when opening the chat window I get this error notification:
Error fetching Opencode config: "...l/share/nvim/lazy/opencode.nvim/lua/opencode/promise.lua:290: No server base url"
It keeps getting sent as a notification upon every input keystroke.
Closing and reopening neovim seems to be the only fix.
Loading the plugin with lazyvim:
return {
'sudo-tee/opencode.nvim',
config = function()
require('opencode').setup {
keymap = {
input_window = {
['jk'] = { 'close' }, -- Close UI windows
['<tab>'] = { 'switch_mode' }, -- Switch between modes (build/plan)
},
output_window = {
['jk'] = { 'close' }, -- Close UI windows
},
},
context = {
enabled = true, -- Enable automatic context capturing
cursor_data = {
enabled = false, -- Include cursor position and line content in the context
},
diagnostics = {
info = false, -- Include diagnostics info in the context (default to false
warn = false, -- Include diagnostics warnings in the context
error = false, -- Include diagnostics errors in the context
},
current_file = {
enabled = true, -- Include current file path and content in the context
},
selection = {
enabled = false, -- Include selected text in the context
},
},
}
end,
dependencies = {
'nvim-lua/plenary.nvim',
{
'MeanderingProgrammer/render-markdown.nvim',
opts = {
anti_conceal = { enabled = false },
file_types = { 'opencode_output' },
},
ft = { 'opencode_output' },
},
},
}
My opencode.jsonc:
{
"model": "zai-coding-plan/glm-4.7",
"$schema": "https://opencode.ai/config.json"
}
Occasionally when opening the chat window I get this error notification:
It keeps getting sent as a notification upon every input keystroke.
Closing and reopening neovim seems to be the only fix.
Loading the plugin with lazyvim:
My opencode.jsonc:
{ "model": "zai-coding-plan/glm-4.7", "$schema": "https://opencode.ai/config.json" }