You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
342 B
16 lines
342 B
local utils = { }
|
|
|
|
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
|
|
end
|
|
|
|
function utils.map(mode, lhs, rhs, opts)
|
|
opts = opts or { noremap = true }
|
|
vim.api.nvim_set_keymap(mode, lhs, rhs, opts)
|
|
end
|
|
|
|
return utils
|