mirror of
https://github.com/kristoferssolo/SoloVim.git
synced 2026-02-04 06:42:05 +00:00
Update 2025-10-31
update 2025-10-08 chore: update readme Update 2025-10-09 Update 2025-10-15 Update 2025-10-22 Update 2025-10-31
This commit is contained in:
33
snippets/typst.lua
Normal file
33
snippets/typst.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
---@diagnostic disable: undefined-global
|
||||
|
||||
return {
|
||||
s(
|
||||
{ trig = "([^%s]+)t", name = "Superscript", regTrig = true },
|
||||
fmta("(<>)^(<>)", {
|
||||
f(function(_, snip)
|
||||
return snip.captures[1]
|
||||
end),
|
||||
i(0),
|
||||
})
|
||||
),
|
||||
s(
|
||||
{ trig = "([^%s]+)b", name = "Subscript", regTrig = true },
|
||||
fmta("(<>)_(<>)", {
|
||||
f(function(_, snip)
|
||||
return snip.captures[1]
|
||||
end),
|
||||
i(0),
|
||||
})
|
||||
),
|
||||
s(
|
||||
{ trig = "([^%s]+)r", name = "Root", regTrig = true },
|
||||
fmta("sqrt(<>)", {
|
||||
f(function(_, snip)
|
||||
return snip.captures[1]
|
||||
end),
|
||||
})
|
||||
),
|
||||
}, { -- autosnippets
|
||||
s({ trig = "mt", name = "Math Block" }, fmta("$<>$", { i(1) })),
|
||||
s({ trig = "mmt", name = "Multiline Math Block" }, fmta("$ <> $", { i(1) })),
|
||||
}
|
||||
Reference in New Issue
Block a user