diff options
| author | ottjk <joshott16@gmail.com> | 2024-08-23 16:46:45 -0400 |
|---|---|---|
| committer | ottjk <joshott16@gmail.com> | 2024-08-23 16:46:45 -0400 |
| commit | 6c9b28b9594b7322a5c53d72fe9a21c7ad7b7d39 (patch) | |
| tree | a0148c396dcb8dbb128a4c924f3ab0eec09b26ac /nvim | |
| parent | cf906f832b5cea3ccb09d3536fdc68daa0d37f64 (diff) | |
| download | dotfiles-6c9b28b9594b7322a5c53d72fe9a21c7ad7b7d39.tar.gz dotfiles-6c9b28b9594b7322a5c53d72fe9a21c7ad7b7d39.zip | |
bunch of changes
specific commit
Diffstat (limited to 'nvim')
| -rw-r--r-- | nvim/after/plugin/vimtex.lua | 10 | ||||
| -rw-r--r-- | nvim/snips/tex/expressions.lua | 15 | ||||
| -rw-r--r-- | nvim/snips/tex/symbols.lua | 36 |
3 files changed, 50 insertions, 11 deletions
diff --git a/nvim/after/plugin/vimtex.lua b/nvim/after/plugin/vimtex.lua index c2b2276..28500da 100644 --- a/nvim/after/plugin/vimtex.lua +++ b/nvim/after/plugin/vimtex.lua @@ -2,13 +2,7 @@ vim.g.vimtex_view_general_viewer = 'zathura' vim.g.vimtex_quickfix_open_on_warning = 0 vim.g.vimtex_imaps_enabled = 0 vim.cmd([[ -let g:vimtex_compiler_latexmk = { - \ 'options' : [ - \ '-verbose', - \ '-file-line-error', - \ '-synctex=1', - \ '-interaction=nonstopmode', - \ '-shell-escape', - \ ], +let g:vimtex_compiler_latexmk_engines = { + \ '_' : '-shell-escape', \} ]]) diff --git a/nvim/snips/tex/expressions.lua b/nvim/snips/tex/expressions.lua index 8c020db..875fbf4 100644 --- a/nvim/snips/tex/expressions.lua +++ b/nvim/snips/tex/expressions.lua @@ -58,6 +58,14 @@ return { { n.t("\\sum") }, { condition = h.in_mathzone } ), + n.s({trig="'bu", snippetType="autosnippet", priority=100}, + { n.t("\\bigcup") }, + { condition = h.in_mathzone } + ), + n.s({trig="'ba", snippetType="autosnippet", priority=100}, + { n.t("\\bigcap") }, + { condition = h.in_mathzone } + ), n.s({trig="od", snippetType="autosnippet", priority=100}, n.fmta("\\od{<>}{<>}", { n.i(1), n.i(2) }), @@ -101,7 +109,7 @@ return { { condition = h.in_mathzone } ), n.s({trig="pf", wordTrig=false, snippetType="autosnippet"}, - { n.t("\\pdiff") }, + { n.t("\\pdiff ") }, { condition = h.in_mathzone } ), n.s({trig = "tii", snippetType="autosnippet"}, @@ -119,6 +127,11 @@ return { { n.d(1, h.get_visual) }), { condition = h.in_text } ), + n.s({trig = "txt", snippetType="autosnippet"}, + n.fmta("\\texttt{<>}", + { n.d(1, h.get_visual) }), + { condition = h.in_text } + ), n.s({trig = "=", snippetType="autosnippet"}, { n.t("\\item ") }, { condition = h.in_itemize * h.line_begin } diff --git a/nvim/snips/tex/symbols.lua b/nvim/snips/tex/symbols.lua index b8a8559..04d7e78 100644 --- a/nvim/snips/tex/symbols.lua +++ b/nvim/snips/tex/symbols.lua @@ -133,6 +133,18 @@ return { { n.t("\\subseteq") }, { condition = h.in_mathzone } ), + n.s({trig="cq", snippetType="autosnippet"}, + { n.t("\\subset") }, + { condition = h.in_mathzone } + ), + n.s({trig="qq", snippetType="autosnippet"}, + { n.t("\\supset") }, + { condition = h.in_mathzone } + ), + n.s({trig="qc", snippetType="autosnippet"}, + { n.t("\\supset") }, + { condition = h.in_mathzone } + ), n.s({trig="Nn", snippetType="autosnippet"}, { n.t("\\cap") }, { condition = h.in_mathzone } @@ -202,16 +214,32 @@ return { { condition = h.in_mathzone } ), - n.s({trig="mcal", snippetType="autosnippet"}, + 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) }), + { condition = h.in_mathzone } + ), + n.s({trig="(:#|#:)", wordTrig=false, trigEngine="ecma", snippetType="autosnippet", priority=100}, n.fmta("\\mathcal{<>}", { n.i(1) }), { condition = h.in_mathzone } ), - n.s({trig="mbb", snippetType="autosnippet"}, + + n.s({trig=[[([a-zA-Z])(@#|#@)]], wordTrig=false, trigEngine="ecma", snippetType="autosnippet", priority=200}, + n.fmta("\\mathbb{<>}", + { n.f(function(_, parent) return string.upper(parent.captures[1]) end) }), + { condition = h.in_mathzone } + ), + n.s({trig="1(@#|#@)", wordTrig=false, trigEngine="ecma", snippetType="autosnippet", priority=200}, + { n.t("\\1") }, + { condition = h.in_mathzone } + ), + n.s({trig="(@#|#@)", wordTrig=false, trigEngine="ecma", snippetType="autosnippet", priority=100}, n.fmta("\\mathbb{<>}", { n.i(1) }), { condition = h.in_mathzone } ), + n.s({trig="'hb", snippetType="autosnippet"}, { n.t("\\hbar") }, { condition = h.in_mathzone } @@ -368,6 +396,10 @@ return { { n.t("\\oplus") }, { condition = h.in_mathzone } ), + n.s({trig="upp", snippetType="autosnippet"}, + { n.t("\\uplus") }, + { condition = h.in_mathzone } + ), n.s({trig="pm", snippetType="autosnippet"}, { n.t("\\pm") }, { condition = h.in_mathzone } |