Skip to content

Commit bd91e08

Browse files
committed
fix(opencode-nvim): update API calls for version ^0.11
1 parent 022df4a commit bd91e08

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

  • lua/astrocommunity/ai/opencode-nvim

lua/astrocommunity/ai/opencode-nvim/init.lua

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
return {
22
"NickvanDyke/opencode.nvim",
3+
version = "^0.11",
34
dependencies = {
45
{
56
"folke/snacks.nvim",
@@ -15,19 +16,19 @@ return {
1516
local prefix = "<Leader>O"
1617
maps.n[prefix] = { desc = require("astroui").get_icon("OpenCode", 1, true) .. "OpenCode" }
1718
maps.n[prefix .. "t"] = {
18-
function() require("opencode").toggle() end,
19-
desc = "Toggle embedded",
19+
function() require("opencode").start() end,
20+
desc = "Start OpenCode",
2021
}
2122
maps.n[prefix .. "a"] = {
22-
function() require("opencode").ask("@this: ", { submit = true }) end,
23+
function() require("opencode").ask "@this:" end,
2324
desc = "Ask about this",
2425
}
2526
maps.n[prefix .. "+"] = {
26-
function() require("opencode").prompt("@buffer", { append = true }) end,
27+
function() require("opencode").prompt "@buffer " end,
2728
desc = "Add buffer to prompt",
2829
}
2930
maps.n[prefix .. "e"] = {
30-
function() require("opencode").prompt("Explain @this and its context", { submit = true }) end,
31+
function() require("opencode").prompt "Explain @this and its context" end,
3132
desc = "Explain this code",
3233
}
3334
maps.n[prefix .. "n"] = {
@@ -49,11 +50,11 @@ return {
4950

5051
maps.v[prefix] = { desc = require("astroui").get_icon("OpenCode", 1, true) .. "OpenCode" }
5152
maps.v[prefix .. "a"] = {
52-
function() require("opencode").ask("@this: ", { submit = true }) end,
53+
function() require("opencode").ask "@this:" end,
5354
desc = "Ask about selection",
5455
}
5556
maps.v[prefix .. "+"] = {
56-
function() require("opencode").prompt "@this" end,
57+
function() require("opencode").prompt "@this " end,
5758
desc = "Add selection to prompt",
5859
}
5960
maps.v[prefix .. "s"] = {

0 commit comments

Comments
 (0)