Skip to content

feat(event_manager): fire User autocmds for server-sent events#219

Merged
sudo-tee merged 7 commits intosudo-tee:mainfrom
disrupted:autocmds
Feb 2, 2026
Merged

feat(event_manager): fire User autocmds for server-sent events#219
sudo-tee merged 7 commits intosudo-tee:mainfrom
disrupted:autocmds

Conversation

@disrupted
Copy link
Contributor

coming from the other opencode.nvim plugin, this was something that I missed. currently we only have a select few hooks that the user can leverage.

with this PR we emit all server-side events from Opencode as a custom User autocmd. I find it generally useful when plugins provide these to trigger custom logic. It can also be used to integrate with other plugins and enable advanced workflows.

simple example from my config: I set up custom keymaps only when Opencode requests permissions, then clear those up after replying.

Copy link
Owner

@sudo-tee sudo-tee left a comment

Choose a reason for hiding this comment

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

I left a couple of little comments.

But overall this seem like a good feature to have.

@sudo-tee sudo-tee merged commit abbf5f7 into sudo-tee:main Feb 2, 2026
5 checks passed
@disrupted disrupted deleted the autocmds branch February 2, 2026 20:18
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