Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lua/astrocommunity/ai/opencode-nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ return {
local prefix = "<Leader>O"
maps.n[prefix] = { desc = require("astroui").get_icon("OpenCode", 1, true) .. "OpenCode" }
maps.n[prefix .. "t"] = {
function() require("opencode").toggle() end,
desc = "Toggle embedded",
function() require("opencode").start() end,
desc = "Start & Toggle embedded",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be just Start embedded?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calling start again toggles it, so I thought most people would understand the toggle word despite the api call being start, and including both would be more clear to users.

I don't mind what it is called really but I do think it is better to include both. If I had to choose one I would stick with toggle since that is the user-friendly word for the more important aspect of the action.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@josh-dix the start() command was removed fro the public api before your PR was opened: nickjvandyke/opencode.nvim@49b3418

}
maps.n[prefix .. "a"] = {
function() require("opencode").ask("@this: ", { submit = true }) end,
Expand Down
Loading