Skip to content

fix(opencode-nvim): Update api call for toggle function in opencode - #1792

Open
josh-dix wants to merge 1 commit into
AstroNvim:mainfrom
josh-dix:patch-1
Open

fix(opencode-nvim): Update api call for toggle function in opencode#1792
josh-dix wants to merge 1 commit into
AstroNvim:mainfrom
josh-dix:patch-1

Conversation

@josh-dix

@josh-dix josh-dix commented Jul 28, 2026

Copy link
Copy Markdown

📑 Description

Due to opencode plugin api being modified this requires updating.

https://github.com/nickjvandyke/opencode.nvim/blob/7749a034db61258ece828df70a89ff31bb27ff47/CHANGELOG.md?plain=1#L70

📖 Additional Information

@github-actions

Copy link
Copy Markdown

Review Checklist

Does this PR follow the [Contribution Guidelines](development guidelines)? Following is a partial checklist:

Proper conventional commit scoping:

  • If you are adding a new plugin, the scope would be the name of the category it is being added into. ex. feat(utility): added noice.nvim plugin

  • If you are modifying a pre-existing plugin or pack, the scope would be the name of the plugin folder. ex. fix(noice-nvim): fix LSP handler error

  • Pull request title has the appropriate conventional commit type and scope where the scope is the name of the pre-existing directory in the project as described above

  • README is properly formatted and uses fenced in links with <url> unless they are inside a [title](url)

  • Entry returns a single plugin spec with the new plugin as the only top level spec (not applicable for recipes or packs).

  • Proper usage of opts table rather than setting things up with the config function.

  • Proper usage of specs table for all specs that are not dependencies of a given plugin (not applicable for recipes or packs).

@josh-dix josh-dix changed the title Update api call for toggle fix(opencode): Update api call for toggle Jul 28, 2026
@josh-dix josh-dix changed the title fix(opencode): Update api call for toggle fix(api deprecation): Update api call for toggle function in opencode Jul 28, 2026
@josh-dix josh-dix changed the title fix(api deprecation): Update api call for toggle function in opencode fix(opencode-nvim): Update api call for toggle function in opencode Jul 28, 2026
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants