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
fix(session-picker): support previews across picker backends
- Unify custom preview rendering behind a backend-neutral preview target so
session previews work consistently with Telescope, fzf-lua, and Snacks.
- Normalize picker plugin aliases such as fzf-lua, telescope.nvim, and
snacks.nvim to their internal backend names, and add regression coverage for
custom preview behavior across the picker integrations.
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -116,7 +116,7 @@ Install the plugin with your favorite package manager. See the [Configuration](#
116
116
```lua
117
117
-- Default configuration with all available options
118
118
require('opencode').setup({
119
-
preferred_picker=nil, -- 'telescope', 'fzf', 'mini.pick', 'snacks', 'select', if nil, it will use the best available picker. Note mini.pick does not support multiple selections
119
+
preferred_picker=nil, -- 'telescope'/'telescope.nvim', 'fzf'/'fzf-lua', 'mini.pick', 'snacks'/'snacks.nvim', 'select', if nil, it will use the best available picker. Note mini.pick does not support multiple selections
120
120
preferred_completion=nil, -- 'blink', 'nvim-cmp','vim_complete' if nil, it will use the best available completion
121
121
default_global_keymaps=true, -- If false, disables all default global keymaps
122
122
default_mode='build', -- 'build' or 'plan' or any custom configured. @see [OpenCode Agents](https://opencode.ai/docs/modes/)
@@ -18,10 +18,16 @@ local Promise = require('opencode.promise')
18
18
---@fieldwidth? number Optional width for the picker (defaults to config or current window width)
19
19
---@fieldmulti_selection? table<string, boolean> Actions that support multi-selection
20
20
---@fieldpreview? "file"|"custom"|"none"|false Preview mode: "file" for file preview, "custom" for custom preview via preview_fn, "none" or false to disable
21
-
---@fieldpreview_fn? fun(item: any, bufnr: integer): nil Custom preview function, called when preview = 'custom' and a selection changes
21
+
---@fieldpreview_fn? fun(item: any, target: PickerPreviewTarget): nil Custom preview function, called when preview = 'custom' and a selection changes
22
22
---@fieldlayout_opts? OpencodeUIPickerConfig
23
23
---@fieldclose? fun() Close the picker programmatically (set by the backend)
0 commit comments