Installing VimTex with mini.deps #2230
-
Contributing guidelines
Module(s)mini.deps QuestionHi All, I got into neovim a few days ago and have been using MiniMax as my starting config. I'm loving all of Evgeni's work! Just needed some direction on installing plugins. The issue is that mini.deps is (unfortunately) not as popular as lazy.nvim, so all the plugins that I want only have lazy.nvim instructions. For the most part, I've been able to convert the lazy code to equivalent mini.deps code. My issue is trying install VimTeX. The github page has an install for lazy.nvim as usual: {
"lervag/vimtex",
lazy = false, -- we don't want to lazy load VimTeX
-- tag = "v2.15", -- uncomment to pin to a specific release
init = function()
-- VimTeX configuration goes here, e.g.
vim.g.vimtex_view_method = "zathura"
end
}I tried to convert this into something like: later(function()
add({
source = 'lervag/vimtex',
})
require('vimtex').setup {}
end)For all other plugins this worked fine, but for this one it simply failed to install the plugin. I tried installing it with lazy just to make sure, and that worked with no issues. I'm not sure where to go from here or how to debug this, I'm very new to the plugin ecosystem and neovim as a whole. My full config for reference (plugins file): https://github.com/maxtrap/nvim-config/blob/custom/plugin/40_plugins.lua |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hello @maxtrap, The vimtex plugin is mostly implemented in vimscript. As a consequence it does not have the usual "lua setup" method. The user configures the plugin using vim variables, which are best set before the plugin is added. Hence the "init" in your lazy.nvim example. Do note that the author warns to not lazy-load. It's probably best to use "now" instead of "later". The code for 'mini.deps': MiniDeps.now(function()
vim.g.vimtex_view_method = "zathura"
MiniDeps.add("lervag/vimtex")
end) |
Beta Was this translation helpful? Give feedback.
Hello @maxtrap,
The vimtex plugin is mostly implemented in vimscript. As a consequence it does not have the usual "lua setup" method. The user configures the plugin using vim variables, which are best set before the plugin is added. Hence the "init" in your lazy.nvim example.
Do note that the author warns to not lazy-load. It's probably best to use "now" instead of "later".
The code for 'mini.deps':