Backup
This commit is contained in:
parent
73e033c904
commit
104ae1ec42
|
@ -1,7 +1,8 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
function M.setup()
|
function M.setup()
|
||||||
require("luasnip.loaders.from_vscode").lazy_load({})
|
-- require("luasnip").config.setup({ enable_autosnippets = false })
|
||||||
|
require("luasnip.loaders.from_vscode").lazy_load()
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
8
dotfiles/neovim/lua/my/snippets/tex.lua
Normal file
8
dotfiles/neovim/lua/my/snippets/tex.lua
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
local luasnip = require("luasnip")
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.setup()
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
|
|
|
@ -12,7 +12,10 @@
|
||||||
"Absolute value": {
|
"Absolute value": {
|
||||||
"prefix": "abs",
|
"prefix": "abs",
|
||||||
"description": "Absolute values",
|
"description": "Absolute values",
|
||||||
"body": "|$1|$0"
|
"body": "|$1|$0",
|
||||||
|
"luasnip": {
|
||||||
|
"autotrigger": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"Lemma": {
|
"Lemma": {
|
||||||
"prefix": "lemma",
|
"prefix": "lemma",
|
||||||
|
@ -56,17 +59,26 @@
|
||||||
"Subscript": {
|
"Subscript": {
|
||||||
"prefix": "ss",
|
"prefix": "ss",
|
||||||
"description": "Subscript",
|
"description": "Subscript",
|
||||||
"body": "_{$1}$0"
|
"body": "_{$1}$0",
|
||||||
|
"luasnip": {
|
||||||
|
"autotrigger": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"Exponent": {
|
"Exponent": {
|
||||||
"prefix": "ee",
|
"prefix": "ee",
|
||||||
"description": "Exponent",
|
"description": "Exponent",
|
||||||
"body": "^{$1}$0"
|
"body": "^{$1}$0",
|
||||||
|
"luasnip": {
|
||||||
|
"autotrigger": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"Nth derivative": {
|
"Nth derivative": {
|
||||||
"prefix": "dd",
|
"prefix": "dd",
|
||||||
"description": "Nth derivative",
|
"description": "Nth derivative",
|
||||||
"body": "^{($1)}$0"
|
"body": "^{($1)}$0",
|
||||||
|
"luasnip": {
|
||||||
|
"autotrigger": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"Section": {
|
"Section": {
|
||||||
"prefix": "section",
|
"prefix": "section",
|
||||||
|
@ -121,47 +133,74 @@
|
||||||
"Sigma sum": {
|
"Sigma sum": {
|
||||||
"prefix": "bsum",
|
"prefix": "bsum",
|
||||||
"description": "Create a sum using sigma notation",
|
"description": "Create a sum using sigma notation",
|
||||||
"body": "\\sum_{$1 = $2}^{$3}$0"
|
"body": "\\sum_{$1 = $2}^{$3}$0",
|
||||||
|
"luasnip": {
|
||||||
|
"autotrigger": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"Pi product": {
|
"Pi product": {
|
||||||
"prefix": "bproduct",
|
"prefix": "bproduct",
|
||||||
"description": "Create a produt using pi notation",
|
"description": "Create a produt using pi notation",
|
||||||
"body": "\\product_{$1 = $2}^{$3}$0"
|
"body": "\\prod_{$1 = $2}^{$3}$0",
|
||||||
|
"luasnip": {
|
||||||
|
"autotrigger": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"Fraction": {
|
"Fraction": {
|
||||||
"prefix": "frac",
|
"prefix": "frac",
|
||||||
"description": "Create a fraction",
|
"description": "Create a fraction",
|
||||||
"body": "\\frac{$1}{$2}$0"
|
"body": "\\frac{$1}{$2}$0",
|
||||||
|
"luasnip": {
|
||||||
|
"autotrigger": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"Choose": {
|
"Choose": {
|
||||||
"prefix": "binom",
|
"prefix": "binom",
|
||||||
"description": "Create a (n choose k) thingy",
|
"description": "Create a (n choose k) thingy",
|
||||||
"body": "\\binom{$1}{$2}$0"
|
"body": "\\binom{$1}{$2}$0",
|
||||||
|
"luasnip": {
|
||||||
|
"autotrigger": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"Limit": {
|
"Limit": {
|
||||||
"prefix": "lim",
|
"prefix": "lim",
|
||||||
"description": "Create a limit",
|
"description": "Create a limit",
|
||||||
"body": "\\lim _{$1 \\to $2}$0"
|
"body": "\\lim _{$1 \\to $2}$0",
|
||||||
|
"luasnip": {
|
||||||
|
"autotrigger": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"Limit to infinity": {
|
"Limit to infinity": {
|
||||||
"prefix": "ilim",
|
"prefix": "ilim",
|
||||||
"description": "Create a limit as a variable goes to infinity",
|
"description": "Create a limit as a variable goes to infinity",
|
||||||
"body": "\\lim _{$1 \\to \\infty}$0"
|
"body": "\\lim _{$1 \\to \\infty}$0",
|
||||||
|
"luasnip": {
|
||||||
|
"autotrigger": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"Limit to negative infinity": {
|
"Limit to negative infinity": {
|
||||||
"prefix": "nlim",
|
"prefix": "nlim",
|
||||||
"description": "Create a limit as a variable goes to negative infinity",
|
"description": "Create a limit as a variable goes to negative infinity",
|
||||||
"body": "\\lim _{$1 \\to -\\infty}$0"
|
"body": "\\lim _{$1 \\to -\\infty}$0",
|
||||||
|
"luasnip": {
|
||||||
|
"autotrigger": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"Limit to zero": {
|
"Limit to zero": {
|
||||||
"prefix": "zlim",
|
"prefix": "zlim",
|
||||||
"description": "Create a limit as a variable goes to 0",
|
"description": "Create a limit as a variable goes to 0",
|
||||||
"body": "\\lim _{$1 \\to 0}$0"
|
"body": "\\lim _{$1 \\to 0}$0",
|
||||||
|
"luasnip": {
|
||||||
|
"autotrigger": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"Sqrt": {
|
"Sqrt": {
|
||||||
"prefix": "sqrt",
|
"prefix": "sqrt",
|
||||||
"description": "Create a sqrt",
|
"description": "Create a sqrt",
|
||||||
"body": "\\sqrt[$1]{$2}$0"
|
"body": "\\sqrt[$1]{$2}$0",
|
||||||
|
"luasnip": {
|
||||||
|
"autotrigger": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"Sin": {
|
"Sin": {
|
||||||
"prefix": "sin",
|
"prefix": "sin",
|
||||||
|
@ -183,10 +222,15 @@
|
||||||
"description": "Create an aligned environment",
|
"description": "Create an aligned environment",
|
||||||
"body": ["\\begin{aligned}", "\t$0", "\\end{aligned}"]
|
"body": ["\\begin{aligned}", "\t$0", "\\end{aligned}"]
|
||||||
},
|
},
|
||||||
"Explanation in math mode": {
|
"Text explanation in math mode": {
|
||||||
"prefix": "texpl",
|
"prefix": "texpl",
|
||||||
|
"description": "Explain a step using text in math mode",
|
||||||
|
"body": "&& \\text{($1)}$0"
|
||||||
|
},
|
||||||
|
"Explanation in math mode": {
|
||||||
|
"prefix": "expl",
|
||||||
"description": "Explain a step in math mode",
|
"description": "Explain a step in math mode",
|
||||||
"body": "&& \\text{$1}$0"
|
"body": "&& ($1) $0"
|
||||||
},
|
},
|
||||||
"Let": {
|
"Let": {
|
||||||
"prefix": "let",
|
"prefix": "let",
|
||||||
|
|
Loading…
Reference in a new issue