1
Fork 0
satellite/dotfiles/neovim/lua/my/abbreviations/fp.lua
2023-03-14 20:57:07 +01:00

32 lines
758 B
Lua

local A = require("my.abbreviations")
local scrap = require("scrap")
local M = {}
M.symols = {
{ "mto", ">>=" }, -- [M]onadic [t]o
{ "oalt", "<\\|>" }, -- [O]peration [A]lternative
{ "omono", "<>" }, -- [O]peration [M]onoid
}
M.types = {
{ "tarr", "Array" },
{ "tlis", "List" },
{ "tmay", "Maybe" },
{ "teff", "Effect" },
{ "taff", "Aff" },
{ "tnea", "NonEmptyArray" },
}
M.functions = {
{ "tfold", "toUnfoldable" }, -- [T]o [f]oldable
{ "ffold", "fromFoldable" }, -- [F]rom un[f]oldable
}
function M.setup()
A.manyGlobalAbbr(scrap.expand_many(M.types, A.no_capitalization))
A.manyGlobalAbbr(scrap.expand_many(M.symols, A.no_capitalization))
A.manyGlobalAbbr(scrap.expand_many(M.functions, A.no_capitalization))
end
return M