diff options
| -rw-r--r-- | lua/Snippets/tex/math.lua | 27 | ||||
| -rw-r--r-- | lua/Snippets/tex/schemes.lua | 4 | ||||
| -rw-r--r-- | lua/Snippets/tex/symbols.lua | 7 | ||||
| -rw-r--r-- | lua/plugins/interface.lua | 8 | ||||
| -rw-r--r-- | lua/plugins/treesitter.lua | 4 |
5 files changed, 46 insertions, 4 deletions
diff --git a/lua/Snippets/tex/math.lua b/lua/Snippets/tex/math.lua index 95c4e64..256ce10 100644 --- a/lua/Snippets/tex/math.lua +++ b/lua/Snippets/tex/math.lua @@ -167,6 +167,13 @@ return { { condition = tex.in_mathzone } ), + s({ trig = 'mdl', snippetType = 'autosnippet' }, + { + t('\\middle'), + }, + { condition = tex.in_mathzone } + ), + s({ trig = 'df', snippetType = 'autosnippet' }, { t('\\,d ') }, { condition = tex.in_mathzone } @@ -231,4 +238,24 @@ return { ), { condition = tex.in_mathzone } ), + + s({ trig = "bra", snippetType = "autosnippet" }, + fmta( + '\\Bra{<>}', + { + i(1), + } + ), + { condition = tex.in_mathzone } + ), + + s({ trig = "ket", snippetType = "autosnippet" }, + fmta( + '\\Ket{<>}', + { + i(1), + } + ), + { condition = tex.in_mathzone } + ), } diff --git a/lua/Snippets/tex/schemes.lua b/lua/Snippets/tex/schemes.lua index ae93b31..f87552a 100644 --- a/lua/Snippets/tex/schemes.lua +++ b/lua/Snippets/tex/schemes.lua @@ -203,7 +203,7 @@ return { s({ trig = 'crm', snippetType = 'autosnippet' }, fmta( - [[\charge{<>=$\ominus$}{<>}]], + [[\charge{<>=\ominus}{<>}]], { i(1), i(2), @@ -214,7 +214,7 @@ return { s({ trig = 'crp', snippetType = 'autosnippet' }, fmta( - [[\charge{<>=$\oplus$}{<>}]], + [[\charge{<>=\oplus}{<>}]], { i(1), i(2), diff --git a/lua/Snippets/tex/symbols.lua b/lua/Snippets/tex/symbols.lua index 76935db..4fd52c9 100644 --- a/lua/Snippets/tex/symbols.lua +++ b/lua/Snippets/tex/symbols.lua @@ -59,6 +59,13 @@ return { { condition = tex.in_mathzone } ), + s({ trig = 'plm', snippetType = 'autosnippet' }, + { + t('\\pm '), + }, + { condition = tex.in_mathzone } + ), + s({ trig = 'leq', snippetType = 'autosnippet' }, { t('\\leq '), diff --git a/lua/plugins/interface.lua b/lua/plugins/interface.lua index 42d0108..3226cb0 100644 --- a/lua/plugins/interface.lua +++ b/lua/plugins/interface.lua @@ -3,6 +3,14 @@ return { 'nvim-tree/nvim-web-devicons', }, { + 'mcauley-penney/visual-whitespace.nvim', + event = { + 'BufReadPre', + 'BufNewFile' + }, + config = true + }, + { 'nvim-lualine/lualine.nvim', event = 'VeryLazy', opts = { diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index fa64a8d..845ba05 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -11,7 +11,7 @@ return { ignore_install = { 'latex' }, highlight = { enable = true, - additional_vim_regex_highlighting = false, + additional_vim_regex_highlighting = { 'latex' }, }, indent = { enable = true, disable = { 'python' } }, ensure_installed = { @@ -26,7 +26,7 @@ return { }, }, config = function(_, opts) - require("nvim-treesitter.configs").setup(opts) + require('nvim-treesitter.configs').setup(opts) end, }, { |
