summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacek Kiedrowski <[email protected]>2021-07-11 19:07:08 +0100
committerGitHub <[email protected]>2021-07-11 18:07:08 +0000
commit2a1acc796896d235569ddc5e9180ce796d44c124 (patch)
treeb104ec6a78626b41f4f523732347401f76209c6c
parent95190e9c34978a9365d8e8d8691a64edd1946e74 (diff)
Added autosave on focus loss option and list of errors to be ignored to vimtex. (#873)
-rw-r--r--ftplugin/tex.lua5
-rw-r--r--lua/default-config.lua5
-rw-r--r--utils/installer/lv-config.example-no-ts.lua5
-rw-r--r--utils/installer/lv-config.example.lua4
4 files changed, 18 insertions, 1 deletions
diff --git a/ftplugin/tex.lua b/ftplugin/tex.lua
index 87f7c598..a81a6ff7 100644
--- a/ftplugin/tex.lua
+++ b/ftplugin/tex.lua
@@ -10,6 +10,7 @@ require("lspconfig").texlab.setup {
vim.g.vimtex_compiler_method = "latexmk"
vim.g.vimtex_view_method = "zathura"
vim.g.vimtex_fold_enabled = 0
+vim.g.vimtex_quickfix_ignore_filters = O.lang.latex.ignore_errors
O.plugin.which_key.mappings["L"] = {
name = "+Latex",
@@ -32,3 +33,7 @@ vim.api.nvim_exec(
]],
false
)
+if (O.lang.latex.auto_save)
+then
+ vim.api.nvim_exec([[au FocusLost * :wa]],false)
+end
diff --git a/lua/default-config.lua b/lua/default-config.lua
index 7630601c..9c7bfbd0 100644
--- a/lua/default-config.lua
+++ b/lua/default-config.lua
@@ -149,7 +149,10 @@ O = {
},
},
kotlin = {},
- latex = {},
+ latex = {
+ auto_save = false,
+ ignore_errors = { },
+ },
lua = {
diagnostics = {
virtual_text = { spacing = 0, prefix = "ï„‘" },
diff --git a/utils/installer/lv-config.example-no-ts.lua b/utils/installer/lv-config.example-no-ts.lua
index 50f1537c..72c53ee9 100644
--- a/utils/installer/lv-config.example-no-ts.lua
+++ b/utils/installer/lv-config.example-no-ts.lua
@@ -40,6 +40,11 @@ O.lang.python.analysis.use_library_code_types = true
-- javascript
O.lang.tsserver.linter = nil
+-- latex
+-- O.lang.latex.auto_save = false
+-- O.lang.latex.ignore_errors = { }
+
+
-- Additional Plugins
-- O.user_plugins = {
-- {"folke/tokyonight.nvim"}, {
diff --git a/utils/installer/lv-config.example.lua b/utils/installer/lv-config.example.lua
index 93b69dcd..05c29c58 100644
--- a/utils/installer/lv-config.example.lua
+++ b/utils/installer/lv-config.example.lua
@@ -46,6 +46,10 @@ O.lang.rust.formatter = {
args = {"--emit=stdout"},
}
+-- latex
+-- O.lang.latex.auto_save = false
+-- O.lang.latex.ignore_errors = { }
+
-- Additional Plugins
-- O.user_plugins = {
-- {"folke/tokyonight.nvim"}, {