@@ -114,7 +114,7 @@ vim.g.opencode_opts = {
114114
115115### 🗣️ Prompt — ` require("opencode").prompt() ` | ` :[range]OpencodePrompt `
116116
117- Send a prompt.
117+ Send a prompt to ` opencode ` .
118118
119119Replaces placeholders with the corresponding context:
120120
@@ -131,9 +131,25 @@ Replaces placeholders with the corresponding context:
131131| ` @diff ` | Git diff |
132132| ` @grapple ` | [ grapple.nvim] ( https://github.com/cbochs/grapple.nvim ) tags |
133133
134+ Or pass a prompt name from ` opts.prompts ` to review, explain, and improve your code:
135+
136+ | Name | Prompt |
137+ | ------------------------------------| -----------------------------------------------------------|
138+ | ` ask ` | * ...* |
139+ | ` explain ` | Explain ` @this ` and its context |
140+ | ` optimize ` | Optimize ` @this ` for performance and readability |
141+ | ` document ` | Add comments documenting ` @this ` |
142+ | ` test ` | Add tests for ` @this ` |
143+ | ` review ` | Review ` @this ` for correctness and readability |
144+ | ` diagnostics ` | Explain ` @diagnostics ` |
145+ | ` fix ` | Fix ` @diagnostics ` |
146+ | ` diff ` | Review the following git diff for correctness and readability: ` @diff ` |
147+ | ` buffer ` | ` @buffer ` |
148+ | ` this ` | ` @this ` |
149+
134150### ✍️ Ask — ` require("opencode").ask() `
135151
136- Input a prompt.
152+ Input a prompt to send to ` opencode ` .
137153
138154- Highlights placeholders.
139155- Completes placeholders.
@@ -143,7 +159,7 @@ Input a prompt.
143159
144160### 🧑🏫 Command — ` require("opencode").command() `
145161
146- Send a [ command] ( https://opencode.ai/docs/keybinds ) to control ` opencode ` :
162+ Send a [ command] ( https://opencode.ai/docs/keybinds ) to ` opencode ` :
147163
148164| Command | Description |
149165| ---------------------------| ----------------------------------------------------------|
@@ -173,48 +189,9 @@ Toggle `opencode` via `opts.provider.toggle`. Usually not explicitly needed —
173189
174190A single entrypoint to all ` opencode.nvim ` functionality 😄
175191
176- #### Prompt
177-
178- Select from ` opts.prompts ` to review, explain, and improve your code:
179-
180- | Name | Prompt |
181- | ------------------------------------| -----------------------------------------------------------|
182- | ` ask ` | * ...* |
183- | ` explain ` | Explain ` @this ` and its context |
184- | ` optimize ` | Optimize ` @this ` for performance and readability |
185- | ` document ` | Add comments documenting ` @this ` |
186- | ` test ` | Add tests for ` @this ` |
187- | ` review ` | Review ` @this ` for correctness and readability |
188- | ` diagnostics ` | Explain ` @diagnostics ` |
189- | ` fix ` | Fix ` @diagnostics ` |
190- | ` diff ` | Review the following git diff for correctness and readability: ` @diff ` |
191- | ` buffer ` | ` @buffer ` |
192- | ` this ` | ` @this ` |
193-
194- #### Command
195-
196- Select from ` opts.commands ` to control ` opencode ` :
197-
198- | Command | Description |
199- | ---------------------------| ----------------------------------------------------------|
200- | ` session_new ` | Start a new session |
201- | ` session_share ` | Share the current session |
202- | ` session_interrupt ` | Interrupt the current session |
203- | ` session_compact ` | Compact the current session (reduce context size) |
204- | ` messages_copy ` | Copy the last message in the session |
205- | ` messages_undo ` | Undo the last message in the session |
206- | ` messages_redo ` | Redo the last message in the session |
207- | ` agent_cycle ` | Cycle the selected agent |
208-
209- #### Provider
210-
211- Manage ` opts.provider ` :
212-
213- | Name | Function |
214- | ------| ----------|
215- | ` toggle ` | Toggle ` opencode ` |
216- | ` start ` | Start ` opencode ` |
217- | ` show ` | Show ` opencode ` |
192+ - Prompt library (` opts.prompts ` )
193+ - Command library (` opts.commands ` )
194+ - Manage provider (` opts.provider ` )
218195
219196## 👀 Events
220197
0 commit comments