Ability to require plugin in the mini.deps post_install hook #1831
Replies: 1 comment 2 replies
-
That's a good question. The observed behavior is because all plugins are installed before executing I'll think about whether it is a good idea to trigger To strictly some code strictly executed just after install (and not in local nvim_treesitter_installed = false
add({
source = 'nvim-treesitter/nvim-treesitter',
checkout = 'main',
hooks = { post_install = function() nvim_treesitter_installed = true end },
})
if nvim_treesitter_installed then require('nvim-treesitter').install({ 'stable', 'unstable' }) end |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Contributing guidelines
Module(s)
mini.deps
Question
What I'm trying to do is to install the nvim-treesitter plugin and, synchronously, install parsers with it:
And I'm getting the error:
I wrapped the installation of parses with
later
and it worked. But that's not what I originally intended.The question is: shouldn't I be able to require the plugin I'm just installing in the post_install hook?
Beta Was this translation helpful? Give feedback.
All reactions