1
Fork 0
satellite/dotfiles/neovim/ftplugin/tex.lua

58 lines
1.1 KiB
Lua
Raw Normal View History

local A = require("my.abbreviations")
2022-09-12 13:50:02 +02:00
require("my.helpers.wrapMovement").setup()
vim.opt.conceallevel = 1
vim.opt.wrap = true
vim.g.tex_conceal = "abdmg"
local abbreviations = {
-- Greek chars
{ "eps", "\\epsilon" },
{ "delta", "\\delta" },
2022-09-12 13:50:02 +02:00
{ "nuls", "\\varnothing" },
-- Exponents
{ "en1", "^{-1}" },
{ "e1", "^{0}" },
{ "e1", "^{1}" },
{ "e2", "^{2}" },
{ "e3", "^{3}" },
{ "e4", "^{4}" },
{ "en", "^{n}" },
2022-09-12 13:50:02 +02:00
{ "enn", "^{-}" },
{ "epp", "^{+}" },
-- Subscripts
{ "s0", "_{0}" },
{ "s1", "_{1}" },
{ "s2", "_{2}" },
{ "s3", "_{3}" },
{ "s4", "_{4}" },
{ "sn", "_{n}" },
-- Function calls
{ "fx", "f(x)" },
{ "gx", "g(x)" },
{ "hx", "h(x)" },
{ "Px", "P(x)" },
-- Basic commands
{ "leq", "\\leq" },
2022-09-12 13:50:02 +02:00
{ "sst", "\\subset" },
{ "sseq", "\\subseteq" },
{ "neq", "\\neq" },
{ "nin", "\\not\\in" },
{ "iin", "\\in" },
{ "tto", "\\to" },
2022-09-12 13:50:02 +02:00
{ "iip", "\\implies" },
{ "iff", "\\iff" },
{ "land", "\\land" },
{ "lor", "\\lor" },
{ "frl", "\\forall" },
{ "exs", "\\exists" },
}
A.manyLocalAbbr(abbreviations)