stevearc / dressing.nvim

Neovim plugin to improve the default vim.ui interfaces
MIT License
1.69k stars 32 forks source link

insert_only applies to input but not select boxes #152

Closed rbjorklin closed 2 months ago

rbjorklin commented 2 months ago

Describe the bug I have set insert_only = true for inputs but the same option does not exist for select boxes causing inconsistent behaviour. It would be fantastic to have both boxes behave the same by either a global toggle or one per type.

System information

-- Paste your call to require("dressing").setup(...) in here

To Reproduce Steps to reproduce the behavior:

1. 2. 3.

If possible, provide a minimal file that will trigger the issue (see tests/manual for examples of short ways to call vim.ui.*):

minimal code here

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

rbjorklin commented 2 months ago

Nevermind. I think the right place to configure this is in telescope itself. I can get the desired behaviour (even without touching insert_only ) by doing the following:

local status, telescope = pcall(require, "telescope")
if (not status) then return end

telescope.setup({
    defaults = {
        mappings = {
          i = {
            ["<esc>"] = require('telescope.actions').close,
          },
        }
    }
})