mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
wrap the keymap settings in autocmd
This commit is contained in:
parent
4fb548d004
commit
3ddc6a0325
1 changed files with 512 additions and 504 deletions
|
|
@ -30,9 +30,15 @@ return {
|
||||||
vim.g.vimtex_quickfix_method = vim.fn.executable("pplatex") == 1 and "pplatex" or "latexlog"
|
vim.g.vimtex_quickfix_method = vim.fn.executable("pplatex") == 1 and "pplatex" or "latexlog"
|
||||||
|
|
||||||
vim.g.vimtex_mappings_enabled = false
|
vim.g.vimtex_mappings_enabled = false
|
||||||
|
|
||||||
|
local augroup = vim.api.nvim_create_augroup("vimtexConfig", {})
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
pattern = "tex",
|
||||||
|
group = augroup,
|
||||||
|
callback = function(event)
|
||||||
local wk = require("which-key")
|
local wk = require("which-key")
|
||||||
wk.add({
|
wk.add({
|
||||||
-- buffer = ev.buf, -- e.g. ev.buf or similar
|
buffer = event.buf,
|
||||||
{
|
{
|
||||||
"<localleader>l",
|
"<localleader>l",
|
||||||
group = "VimTeX",
|
group = "VimTeX",
|
||||||
|
|
@ -536,6 +542,8 @@ return {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
keys = {
|
keys = {
|
||||||
{ "<localLeader>l", "", desc = "+vimtex", ft = "tex" },
|
{ "<localLeader>l", "", desc = "+vimtex", ft = "tex" },
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue