lua format

This commit is contained in:
2022-03-16 22:56:51 +01:00
parent 4c543d7f44
commit c3deaa45c6
17 changed files with 343 additions and 325 deletions

View File

@ -1,16 +1,20 @@
local utils = { }
local utils = {}
local scopes = {o = vim.o, b = vim.bo, w = vim.wo}
local scopes = { o = vim.o, b = vim.bo, w = vim.wo }
function utils.opt(scope, key, value)
scopes[scope][key] = value
if scope ~= 'o' then scopes['o'][key] = value end
scopes[scope][key] = value
if scope ~= 'o' then
scopes['o'][key] = value
end
end
function utils.map(mode, lhs, rhs, opts)
local options = {noremap = true}
if opts then options = vim.tbl_extend('force', options, opts) end
local options = { noremap = true }
if opts then
options = vim.tbl_extend('force', options, opts)
end
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
end
return utils
return utils