From c330e2819d413f6b1861f241e69c5590de6c47c9 Mon Sep 17 00:00:00 2001 From: Matei Adriel Date: Thu, 13 Oct 2022 01:33:24 +0200 Subject: [PATCH] Fixed latex invalid abbreviations --- dotfiles/neovim/ftplugin/tex.lua | 10 ++++------ dotfiles/neovim/lua/my/abbreviations.lua | 2 +- dotfiles/neovim/lua/my/plugins/treesitter.lua | 1 + 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/dotfiles/neovim/ftplugin/tex.lua b/dotfiles/neovim/ftplugin/tex.lua index 332ea40..6a2d1fd 100644 --- a/dotfiles/neovim/ftplugin/tex.lua +++ b/dotfiles/neovim/ftplugin/tex.lua @@ -17,7 +17,6 @@ local abbreviations = { { "Delta", "\\Delta" }, { "pi", "\\pi" }, { "psi", "\\psi" }, - { "psi", "\\psi" }, { "alpha", "\\alpha" }, { "beta", "\\beta" }, { "theta", "\\theta" }, @@ -105,8 +104,9 @@ local abbreviations = { { "smul", "\\times" }, { "texpl", "&& \\text{}" }, { "card", "\\#" }, - { "div", "|" }, - { "ndiv", "\\not|\\:" }, + { "div", "\\|" }, + { "ndiv", "\\not\\|\\:" }, + -- words { "rref", "reduced row echalon form" } @@ -117,7 +117,5 @@ local abolishAbbreviations = { { "ib{p,s}", "integration by {parts,substitution}" } } -AB.abolishMany(abolishAbbreviations) - - A.manyLocalAbbr(abbreviations) +AB.abolishMany(abolishAbbreviations) diff --git a/dotfiles/neovim/lua/my/abbreviations.lua b/dotfiles/neovim/lua/my/abbreviations.lua index 5e1e90e..919c6fe 100644 --- a/dotfiles/neovim/lua/my/abbreviations.lua +++ b/dotfiles/neovim/lua/my/abbreviations.lua @@ -2,7 +2,7 @@ local M = {} function M.localAbbr(lhs, rhs) -- Create abbreviation - vim.cmd(":iabbrev " .. lhs .. " " .. rhs) + vim.cmd(":iabbrev " .. lhs .. " " .. rhs) end function M.manyLocalAbbr(abbreviations) diff --git a/dotfiles/neovim/lua/my/plugins/treesitter.lua b/dotfiles/neovim/lua/my/plugins/treesitter.lua index 9d3445e..2c189ea 100644 --- a/dotfiles/neovim/lua/my/plugins/treesitter.lua +++ b/dotfiles/neovim/lua/my/plugins/treesitter.lua @@ -7,6 +7,7 @@ function M.setup() "elixir", "fish", "html", "json", "latex", "python", "rust", "scss", "toml", "tsx", "vim", "yaml", "nix", "kotlin" }, + disable = { "tex", "latex" }, sync_install = false, indent = { enable = true }, highlight = {