refactor: move vimtex K to texlab

This commit is contained in:
Folke Lemaitre 2023-07-20 09:19:35 +02:00
parent 9f4a861b45
commit 25e8a6c8cf
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -1,9 +1,10 @@
return {
{
"folke/which-key.nvim",
optional = true,
opts = {
defaults = {
["<LocalLeader>l"] = { name = "+vimtex" },
["<localLeader>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", "<Leader>K", "<plug>(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 = {
{ "<Leader>K", "<plug>(vimtex-doc-package)", desc = "Vimtex Docs", silent = true },
},
},
},
},
},