You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-11Lines changed: 9 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,8 +112,6 @@ Install the plugin with your favorite package manager. See the [Configuration](#
112
112
113
113
## ⚙️ Configuration
114
114
115
-
> **Note**: The keymap configuration structure has been updated. Old keymaps (`keymap.global` and `keymap.window`) will be mapped to the new format (`keymap.editor`, `keymap.input_window`, `keymap.output_window`) but you should update your config to the new format. See [Keymap Configuration](#keymap-configuration) below for details.
116
-
117
115
```lua
118
116
-- Default configuration with all available options
119
117
require('opencode').setup({
@@ -298,7 +296,7 @@ require('opencode').setup({
298
296
},
299
297
diagnostics= {
300
298
info=false, -- Include diagnostics info in the context (default to false
301
-
warn=true, -- Include diagnostics warnings in the context
299
+
warning=true, -- Include diagnostics warnings in the context
302
300
error=true, -- Include diagnostics errors in the context
303
301
only_closest=false, -- If true, only diagnostics for cursor/selection
304
302
},
@@ -345,7 +343,7 @@ require('opencode').setup({
345
343
},
346
344
quick_chat= {
347
345
default_model=nil, -- works better with a fast model like gpt-4.1
348
-
default_agent='plan', --plan ensure no file modifications by default
346
+
default_agent=nil, --Uses the current mode when nil
349
347
instructions=nil, -- Use built-in instructions if nil
350
348
},
351
349
})
@@ -360,7 +358,7 @@ The keymap configuration has been restructured for better organization and clari
360
358
-**`output_window`**: Keymaps specific to the output window
361
359
-**`permission`**: Special keymaps for responding to permission requests (available in input/output windows when there's a pending permission)
362
360
363
-
**Backward Compatibility**: The plugin automatically maps configurations that use `keymap.global` and `keymap.window` to the new structure. A deprecation warning will be shown during migration. Update your configuration to use the new structure to remove the warning.
361
+
Configure keymaps with the current nested tables directly: `keymap.editor`, `keymap.input_window`, and `keymap.output_window`.
364
362
365
363
Each keymap entry is a table consising of:
366
364
@@ -670,7 +668,7 @@ You can pass additional options when running a prompt via command or API:
670
668
-`current_file`
671
669
-`selection`
672
670
-`diagnostics.info`
673
-
-`diagnostics.warn`
671
+
-`diagnostics.warning`
674
672
-`diagnostics.error`
675
673
-`cursor_data`
676
674
@@ -680,7 +678,7 @@ Run a prompt in a new session using the Plan agent and disabling current file co
680
678
681
679
```vim
682
680
:Opencode run new_session "Please help me plan a new feature" agent=plan context.current_file.enabled=false
683
-
:Opencode run "Fix the bug in the current file" model=github-copilot/claude-sonned-4
681
+
:Opencode run "Fix the bug in the current file" model=github-copilot/claude-sonnet-4
684
682
```
685
683
686
684
## 👮 Permissions
@@ -694,8 +692,8 @@ Opencode can issue permission requests for potentially destructive operations (f
694
692
695
693
### Responding to Permission Requests
696
694
697
-
-**Respond via keys:**In the input window press `a` to accept once, `A` to accept and remember (accept all), or `d` to deny. These window keys are configurable in `ui.keymap.window.permission_*`.
698
-
-**Global keymaps:**There are also global keymaps to respond outside the input window: `<leader>opa` (accept once), `<leader>opA` (accept all), `<leader>opd` (deny). These are configurable in `keymap.global.permission_*`.
695
+
-**Respond via the dialog:**Focus the Opencode window, move with `j`/`k` or arrow keys, then confirm with `<CR>`. Number shortcuts `1-3` also work for the visible options.
696
+
-**Command:**Use `:Opencode permission accept`, `:Opencode permission accept_all`, or `:Opencode permission deny`. You can pass an index to target a specific queued permission.
699
697
-**API:** Programmatic responses are available: `require('opencode.api').permission_accept()`, `require('opencode.api').permission_accept_all()`, `require('opencode.api').permission_deny()` which map to responses `"once"`, `"always"`, and `"reject"` respectively.
700
698
-**Behavior:**`accept once` allows the single requested action, `accept all` grants persistent permission for similar requests in the current session, and `deny` rejects the request.
701
699
@@ -722,7 +720,7 @@ Supported pickers include [`fzf-lua`](https://github.com/ibhagwan/fzf-lua), [`te
722
720
723
721
### Context bar
724
722
725
-
You can quiclkly see the current context items in the context bar at the top of the input window:
723
+
You can quickly see the current context items in the context bar at the top of the input window:
0 commit comments