This repository has been archived on 2024-10-06. You can view files and clone it, but cannot push or open issues or pull requests.
neovim/lua/utils.lua

11 lines
213 B
Lua
Raw Normal View History

2024-03-20 12:49:43 +01:00
local utils = {}
2021-11-25 22:10:31 +01:00
2024-03-20 12:49:43 +01:00
local scopes = { o = vim.o, b = vim.bo, w = vim.wo }
2021-11-25 22:10:31 +01:00
function utils.opt(scope, key, value)
scopes[scope][key] = value
if scope ~= 'o' then scopes['o'][key] = value end
end
return utils