Closed albertfgu closed 1 year ago
This is my lazy.nvim config:
Here's a cleaned up version where I've removed comments and removed options that you did not need to set. I've also tried to convert the Vimscript autocommand for you.
return {
{
"lervag/vimtex",
init = function()
vim.g.vimtex_view_method = "skim"
vim.g.vimtex_imaps_leader = ";"
vim.g.vimtex_delim_stopline = 200
vim.g.vimtex_compiler_latexmk = {
options = {
'-verbose',
'-file-line-error',
'-synctex=1',
'-interaction=nonstopmode',
'-shell-escape',
}
}
vim.g.vimtex_fold_enabled = 1
vim.g.vimtex_quickfix_ignore_filters = {
'Overfull',
'Underfull',
}
vim.api.nvim_create_augroup("vimtex", { clear = true })
vim.api.nvim_create_autocmd("User", {
group = "vimtex",
pattern = "VimtexEventQuit",
command = "VimtexClean",
})
vim.api.nvim_create_autocmd("User", {
group = "vimtex",
pattern = "VimtexEventViewReverse",
callback = function()
vim.system({"open", "-a", "iTerm"})
end,
})
end,
},
}
Notice, you should ensure that VimTeX is not lazy loaded; i.e., if you asked lazy.nvim to lazy load stuff by default (this is not the default behaviour, so if you do this it is because you configured lazy that way), then you need to add lazy = false
.
I configured my vimtex settings around June, updating everything to the current version of LazyVim at the time. After updating all packages some things seem to have changed and I can't quite figure it out, perhaps you have some idea. The main thing that's obviously wrong is that my local leader commands no longer show up.
The config looks good to me.
Can you explain slightly more verbosely what you mean? Do you mean that things like \ll
no longer works for starting the compiler?
Thanks for the response and lua-fying the autocommand!
I figured out the issue, which your response also helped me realize: the localleader of the config I was using changed: https://github.com/LazyVim/LazyVim/commit/258f339bcf8197ece54d66bf6ed6f351cb6e98cb
I just had to set it back. (I prefer starting everything with the same leader key so I have my localleader mapped to space as well)
Glad to hear you figured things out! :)
Description
I configured my vimtex settings around June, updating everything to the current version of LazyVim at the time. After updating all packages some things seem to have changed and I can't quite figure it out, perhaps you have some idea. The main thing that's obviously wrong is that my local leader commands no longer show up. This is my lazy.nvim config:
Steps to reproduce
Not looking for detailed reproduction at the moment, just if @lervag immediately knows what is wrong. If not I'll spend more effort in trying to reproduce the issue.
Expected behavior
No response
Actual behavior
No response
Do you use a latexmkrc file?
No
VimtexInfo