Skip to content

Headless updates with mini.deps #1676

Closed Answered by echasnovski
KimNorgaard asked this question in Q&A
Discussion options

You must be logged in to vote

I wonder if wrapping MiniDeps.update() in vim.schedule would force it to run later?

If anything, it should be MiniDeps.later() instead of vim.schedule().

So the question is if there is a way forward/around here or if it's by design/too much work? It's probably not the most wide spread use case :)

Only hacky workaround, I am afraid. After trial and error, something like this should work:

nvim --headless -c +"lua MiniDeps.later(function() MiniDeps.update(nil, { force = true }); vim.cmd('TSUpdateSync'); vim.cmd('qa') end); vim.wait(30000)"

What it does:

  • Registers a later() callback (which should be executed after all later() callbacks from the 'init.lua') and asks Neovim to wait for 30 …

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@KimNorgaard
Comment options

@KimNorgaard
Comment options

@echasnovski
Comment options

Answer selected by echasnovski
@KimNorgaard
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested mini.deps
2 participants