diff options
author | Christian Clason <c.clason@uni-graz.at> | 2022-05-09 11:23:51 +0200 |
---|---|---|
committer | Christian Clason <c.clason@uni-graz.at> | 2022-05-09 16:31:55 +0200 |
commit | aefdc6783cb77f09786542c90901a9e7120bea42 (patch) | |
tree | ddce6de8f084ab96270f6111d8e423d0b1533171 /runtime/lua/vim/keymap.lua | |
parent | 676e9e9334043ce74af74f85f889b0327a443d0b (diff) | |
download | rneovim-aefdc6783cb77f09786542c90901a9e7120bea42.tar.gz rneovim-aefdc6783cb77f09786542c90901a9e7120bea42.tar.bz2 rneovim-aefdc6783cb77f09786542c90901a9e7120bea42.zip |
chore: format runtime with stylua
Diffstat (limited to 'runtime/lua/vim/keymap.lua')
-rw-r--r-- | runtime/lua/vim/keymap.lua | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/runtime/lua/vim/keymap.lua b/runtime/lua/vim/keymap.lua index d07232f52f..f4c2b507a9 100644 --- a/runtime/lua/vim/keymap.lua +++ b/runtime/lua/vim/keymap.lua @@ -49,20 +49,20 @@ local keymap = {} --- Default `false`. ---@see |nvim_set_keymap()| function keymap.set(mode, lhs, rhs, opts) - vim.validate { - mode = {mode, {'s', 't'}}, - lhs = {lhs, 's'}, - rhs = {rhs, {'s', 'f'}}, - opts = {opts, 't', true} - } + vim.validate({ + mode = { mode, { 's', 't' } }, + lhs = { lhs, 's' }, + rhs = { rhs, { 's', 'f' } }, + opts = { opts, 't', true }, + }) opts = vim.deepcopy(opts) or {} - local is_rhs_luaref = type(rhs) == "function" - mode = type(mode) == 'string' and {mode} or mode + local is_rhs_luaref = type(rhs) == 'function' + mode = type(mode) == 'string' and { mode } or mode if is_rhs_luaref and opts.expr then local user_rhs = rhs - rhs = function () + rhs = function() local res = user_rhs() if res == nil then -- TODO(lewis6991): Handle this in C? @@ -118,14 +118,14 @@ end ---@see |vim.keymap.set()| --- function keymap.del(modes, lhs, opts) - vim.validate { - mode = {modes, {'s', 't'}}, - lhs = {lhs, 's'}, - opts = {opts, 't', true} - } + vim.validate({ + mode = { modes, { 's', 't' } }, + lhs = { lhs, 's' }, + opts = { opts, 't', true }, + }) opts = opts or {} - modes = type(modes) == 'string' and {modes} or modes + modes = type(modes) == 'string' and { modes } or modes local buffer = false if opts.buffer ~= nil then |