diff --git a/lua/lazyvim/plugins/extras/lang/tex.lua b/lua/lazyvim/plugins/extras/lang/tex.lua index 63b8f555..e8d4feff 100644 --- a/lua/lazyvim/plugins/extras/lang/tex.lua +++ b/lua/lazyvim/plugins/extras/lang/tex.lua @@ -1,9 +1,10 @@ return { { "folke/which-key.nvim", + optional = true, opts = { defaults = { - ["l"] = { name = "+vimtex" }, + ["l"] = { name = "+vimtex" }, }, }, }, @@ -25,7 +26,6 @@ return { { "lervag/vimtex", - version = "*", lazy = false, -- lazy-loading will disable inverse search config = function() vim.api.nvim_create_autocmd({ "FileType" }, { @@ -36,14 +36,6 @@ return { end, }) - vim.api.nvim_create_autocmd({ "FileType" }, { - group = vim.api.nvim_create_augroup("lazyvim_vimtex_keymap", { clear = true }), - pattern = { "bib", "tex" }, - callback = function() - vim.keymap.set("n", "K", "(vimtex-doc-package)", { desc = "Vimtex Docs", silent = true }) - end, - }) - vim.g.vimtex_mappings_disable = { ["n"] = { "K" } } -- disable `K` as it conflicts with LSP hover vim.g.vimtex_quickfix_method = vim.fn.executable("pplatex") == 1 and "pplatex" or "latexlog" end, @@ -55,7 +47,11 @@ return { optional = true, opts = { servers = { - texlab = {}, + texlab = { + keys = { + { "K", "(vimtex-doc-package)", desc = "Vimtex Docs", silent = true }, + }, + }, }, }, },