diff options
author | Christian Clason <c.clason@uni-graz.at> | 2022-05-11 08:54:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-11 08:54:24 +0200 |
commit | cb7ab98925d6923fffcdecdc7013d33018125b14 (patch) | |
tree | fc5811e862fb40dd59b3e11412eaa956136f4916 /runtime/lua/vim/ui.lua | |
parent | e50b1fe60d87cbe7798ce921f08ea38a4750fa99 (diff) | |
parent | aefdc6783cb77f09786542c90901a9e7120bea42 (diff) | |
download | rneovim-cb7ab98925d6923fffcdecdc7013d33018125b14.tar.gz rneovim-cb7ab98925d6923fffcdecdc7013d33018125b14.tar.bz2 rneovim-cb7ab98925d6923fffcdecdc7013d33018125b14.zip |
Merge pull request #18487 from clason/stylua
CI: format and lint runtime with Stylua
Diffstat (limited to 'runtime/lua/vim/ui.lua')
-rw-r--r-- | runtime/lua/vim/ui.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/runtime/lua/vim/ui.lua b/runtime/lua/vim/ui.lua index 165dada1b8..77bca7f6c4 100644 --- a/runtime/lua/vim/ui.lua +++ b/runtime/lua/vim/ui.lua @@ -37,12 +37,12 @@ local M = {} --- </pre> function M.select(items, opts, on_choice) - vim.validate { + vim.validate({ items = { items, 'table', false }, on_choice = { on_choice, 'function', false }, - } + }) opts = opts or {} - local choices = {opts.prompt or 'Select one of:'} + local choices = { opts.prompt or 'Select one of:' } local format_item = opts.format_item or tostring for i, item in pairs(items) do table.insert(choices, string.format('%d: %s', i, format_item(item))) @@ -83,9 +83,9 @@ end --- end) --- </pre> function M.input(opts, on_confirm) - vim.validate { + vim.validate({ on_confirm = { on_confirm, 'function', false }, - } + }) opts = opts or {} local input = vim.fn.input(opts) |