From c28a14df2fdff20c7faee255d7b5530ddc9dbe22 Mon Sep 17 00:00:00 2001 From: joott Date: Thu, 6 Nov 2025 10:18:23 -0500 Subject: slashed --- .config/nvim/snips/tex/symbols.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to '.config/nvim/snips/tex/symbols.lua') diff --git a/.config/nvim/snips/tex/symbols.lua b/.config/nvim/snips/tex/symbols.lua index 9b274c8..6a8a9a3 100644 --- a/.config/nvim/snips/tex/symbols.lua +++ b/.config/nvim/snips/tex/symbols.lua @@ -226,6 +226,18 @@ return { { condition = h.in_mathzone } ), + n.s({trig=[[/\^]], regTrig=true, snippetType="autosnippet", priority=100}, + n.fmta("\\slashed{<>}", + { n.i(1) }), + { condition = h.in_mathzone } + ), + n.s({trig=[[(\\[a-zA-Z]+|[A-Za-z0-9]|\\[a-z]+\{\\?[A-Za-z0-9]+\})/\^]], + wordTrig=false, trigEngine="ecma", snippetType="autosnippet", priority=200}, + n.fmta("\\slashed{<>}", + { n.f(function(_, parent) return parent.captures[1] end) }), + { condition = h.in_mathzone } + ), + n.s({trig=[[([a-zA-Z])(:#|#:)]], wordTrig=false, trigEngine="ecma", snippetType="autosnippet", priority=200}, n.fmta("\\mathcal{<>}", { n.f(function(_, parent) return string.upper(parent.captures[1]) end) }), -- cgit v1.3