Skip to content

Conversation

@aweis89
Copy link
Contributor

@aweis89 aweis89 commented Jan 10, 2026

Summary

This PR fixes an issue with Snacks.nvim picker when using vim.ui.select. The bug causes an "Invalid 'height': Number is not integral" depending on the picker's config.

Related issue: folke/snacks.nvim#2539

Changes

  • Added a picker.select() function that uses Snacks.picker directly when Snacks is the preferred picker, bypassing the buggy vim.ui.select implementation
  • For all other pickers (Telescope, FZF-Lua, mini.pick), falls back to vim.ui.select to respect user customizations (e.g., dressing.nvim)
  • Replaced vim.ui.select calls with picker.select() in files that use selection UI

Files Changed

  • lua/opencode/ui/picker.lua - Added select() and _snacks_select() functions
  • lua/opencode/api.lua - Use picker.select for agent selection
  • lua/opencode/provider.lua - Use picker.select for model selection
  • lua/opencode/git_review.lua - Use picker.select for file selection
  • lua/opencode/ui/input_window.lua - Use picker.select for confirmation prompts
  • lua/opencode/ui/ui.lua - Use picker.select for session selection

@aweis89 aweis89 force-pushed the fix/snacks-picker-select branch from 14bbe4e to 7f55828 Compare January 10, 2026 00:41
@sudo-tee
Copy link
Owner

Thanks for the PR.

I will have a look this weekend

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