2023-01-10 02:38:06 +01:00
|
|
|
local M = {}
|
|
|
|
|
2023-03-14 20:57:07 +01:00
|
|
|
M.no_capitalization = { capitalized = false }
|
|
|
|
|
2023-01-10 02:38:06 +01:00
|
|
|
function M.localAbbr(lhs, rhs)
|
|
|
|
-- Create abbreviation
|
|
|
|
vim.cmd(":iabbrev <buffer> " .. lhs .. " " .. rhs)
|
|
|
|
end
|
|
|
|
|
|
|
|
function M.manyLocalAbbr(abbreviations)
|
|
|
|
for _, value in pairs(abbreviations) do
|
|
|
|
M.localAbbr(value[1], value[2])
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
function M.abbr(lhs, rhs)
|
|
|
|
-- Create abbreviation
|
|
|
|
vim.cmd(":iabbrev " .. lhs .. " " .. rhs)
|
|
|
|
end
|
|
|
|
|
2023-02-19 02:41:22 +01:00
|
|
|
function M.manyGlobalAbbr(abbreviations)
|
|
|
|
for _, value in pairs(abbreviations) do
|
|
|
|
M.abbr(value[1], value[2])
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
function M.setup()
|
|
|
|
require("my.abbreviations.global").setup()
|
|
|
|
end
|
|
|
|
|
2023-01-10 02:38:06 +01:00
|
|
|
return M
|