stevearc / dressing.nvim

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

[Feature] Default input string for `vim.ui.input` #66

Closed pidgeon777 closed 7 months ago

pidgeon777 commented 1 year ago

It would be great to add an argument to vim.ui.input to specify the default text when asking the user for input.

stevearc commented 1 year ago

This already exists. Use vim.ui.input({default = "my text"}, function() end). See :help vim.ui.input for more options.

pidgeon777 commented 1 year ago

Would it be possible to do this also for vim.ui.select?

stevearc commented 1 year ago

vim.ui.select doesn't really have a concept of a "default" selection, but you can adjust the ordering of the items you pass in.