Skip to content

Commit 4a76b1d

Browse files
committed
fix(ui): respect custom user layout for all snacks pickers
1 parent 4d17c30 commit 4a76b1d

3 files changed

Lines changed: 4 additions & 0 deletions

File tree

lua/opencode/model_picker.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ function M.select(cb)
8787
base_picker.pick({
8888
title = 'Select model',
8989
items = models,
90+
layout_opts = config.ui.picker,
9091
format_fn = function(item, width)
9192
local icon = item.icon or ''
9293
local item_width = width or vim.api.nvim_win_get_width(0)

lua/opencode/ui/mcp_picker.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ function M.pick(callback)
178178
callback = default_callback,
179179
title = 'MCP Servers',
180180
width = 65,
181+
layout_opts = config.ui.picker,
181182
})
182183
end
183184

lua/opencode/variant_picker.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
local M = {}
22
local base_picker = require('opencode.ui.base_picker')
33
local state = require('opencode.state')
4+
local config = require('opencode.config')
45
local config_file = require('opencode.config_file')
56
local model_state = require('opencode.model_state')
67
local util = require('opencode.util')
@@ -64,6 +65,7 @@ function M.select(callback)
6465
base_picker.pick({
6566
title = 'Select variant',
6667
items = variants,
68+
layout_opts = config.ui.picker,
6769
format_fn = function(item, width)
6870
local item_width = width or vim.api.nvim_win_get_width(0)
6971
local is_current = state.current_variant == item.name

0 commit comments

Comments
 (0)