diff options
| -rw-r--r-- | keybs/kanata.kbd | 4 | ||||
| -rw-r--r-- | keybs/sweep.kbd | 6 | ||||
| -rw-r--r-- | nvim/snips/tex/electromagnetism.lua | 2 | ||||
| -rw-r--r-- | nvim/snips/tex/expressions.lua | 28 | ||||
| -rw-r--r-- | nvim/snips/tex/symbols.lua | 8 |
5 files changed, 36 insertions, 12 deletions
diff --git a/keybs/kanata.kbd b/keybs/kanata.kbd index 75bed26..f58be9b 100644 --- a/keybs/kanata.kbd +++ b/keybs/kanata.kbd @@ -27,7 +27,7 @@ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ qwe (layer-switch qwerty) cdh (layer-switch colemakdh) oss (one-shot-press 500 lsft) ;; one shot shift - sfd (tap-dance 200 (@oss (caps-word 2000) caps)) ;; shift dance + sfd (tap-dance 200 (@oss caps)) ;; shift dance hrt (tap-hold-release 200 200 t lmet) hrn (tap-hold-release 200 200 n lmet) @@ -121,7 +121,7 @@ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @mwl @mwd @mwu @mwr _ _ _ - _ _ mlft mmid mrgt _ _ @mal @mad @mau @mar _ _ + _ _ mmid mrgt mlft _ _ @mal @mad @mau @mar _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ diff --git a/keybs/sweep.kbd b/keybs/sweep.kbd index 7469c93..e8e02c7 100644 --- a/keybs/sweep.kbd +++ b/keybs/sweep.kbd @@ -1,7 +1,7 @@ (defcfg - linux-dev-names-include ( - "Cradio Keyboard" - "ZMK Project Cradio Keyboard" + linux-dev-names-exclude ( + "AT Translated Set 2 keyboard" + "TPPS/2 Elan TrackPoint" ) ) diff --git a/nvim/snips/tex/electromagnetism.lua b/nvim/snips/tex/electromagnetism.lua index cae57e6..c0a7869 100644 --- a/nvim/snips/tex/electromagnetism.lua +++ b/nvim/snips/tex/electromagnetism.lua @@ -2,7 +2,7 @@ local n = require("luasnip-nodes") local h = require("luasnip-helpers") return { - n.s({trig=";rr", snippetType="autosnippet"}, + n.s({trig="'rr", snippetType="autosnippet"}, { n.t("\\scriptr") }, { condition = h.in_mathzone } ), diff --git a/nvim/snips/tex/expressions.lua b/nvim/snips/tex/expressions.lua index 3ac5a70..5bb3d01 100644 --- a/nvim/snips/tex/expressions.lua +++ b/nvim/snips/tex/expressions.lua @@ -58,22 +58,22 @@ return { { n.t("\\sum") }, { condition = h.in_mathzone } ), - n.s({trig="od", snippetType="autosnippet"}, - n.fmta("\\od[]{<>}{<>}", + n.s({trig="od", snippetType="autosnippet", priority=100}, + n.fmta("\\od{<>}{<>}", { n.i(1), n.i(2) }), { condition = h.in_mathzone } ), - n.s({trig="oD", snippetType="autosnippet"}, + n.s({trig="'od", snippetType="autosnippet", priority=200}, n.fmta("\\od[<>]{<>}{<>}", { n.i(1), n.i(2), n.i(3) }), { condition = h.in_mathzone } ), - n.s({trig="pd", snippetType="autosnippet"}, - n.fmta("\\pd[]{<>}{<>}", + n.s({trig="pd", snippetType="autosnippet", priority=100}, + n.fmta("\\pd{<>}{<>}", { n.i(1), n.i(2) }), { condition = h.in_mathzone } ), - n.s({trig="pD", snippetType="autosnippet"}, + n.s({trig="'pd", snippetType="autosnippet", priority=200}, n.fmta("\\pd[<>]{<>}{<>}", { n.i(1), n.i(2), n.i(3) }), { condition = h.in_mathzone } @@ -208,4 +208,20 @@ return { { n.d(1, h.get_visual) }), { condition = h.in_mathzone } ), + n.s({trig=[[\^\<(.*?)\|]], trigEngine="ecma", wordTrig=false, snippetType="autosnippet"}, + n.fmta([[\bra{<>}]], + { n.f(function(_, parent) return parent.captures[1] end) }), + { condition = h.in_mathzone } + ), + n.s({trig=[[\|(.*?)\^\>]], trigEngine="ecma", wordTrig=false, snippetType="autosnippet"}, + n.fmta([[\ket{<>}]], + { n.f(function(_, parent) return parent.captures[1] end) }), + { condition = h.in_mathzone } + ), + n.s({trig=[[\\bra\{(.*?)\}(.*?)\^\>]], trigEngine="ecma", wordTrig=false, snippetType="autosnippet"}, + n.fmta([[\braket{<>}{<>}]], + { n.f(function(_, parent) return parent.captures[1] end), + n.f(function(_, parent) return parent.captures[2] end) }), + { condition = h.in_mathzone } + ), } diff --git a/nvim/snips/tex/symbols.lua b/nvim/snips/tex/symbols.lua index 59b505b..35d0575 100644 --- a/nvim/snips/tex/symbols.lua +++ b/nvim/snips/tex/symbols.lua @@ -250,6 +250,10 @@ return { { n.t("\\chi") }, { condition = h.in_mathzone } ), + n.s({trig="'na", snippetType="autosnippet"}, + { n.t("\\nabla") }, + { condition = h.in_mathzone } + ), n.s({trig="del", snippetType="autosnippet"}, { n.t("\\Del") }, { condition = h.in_mathzone } @@ -358,4 +362,8 @@ return { { n.t("\\rhd") }, { condition = h.in_mathzone } ), + n.s({trig=",,", snippetType="autosnippet", wordTrig = false}, + { n.t("\\,") }, + { condition = h.in_mathzone } + ), } |