Initial rewrite
Signed-off-by: Timothy Pidashev <mail@timmypidashev.dev>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
-- Synchronous bootstrap: waits for mason + treesitter installs, then quits.
|
||||
-- Assumes init.lua already ran (vim.pack.add auto-cloned plugins).
|
||||
|
||||
local TIMEOUT = 600000
|
||||
|
||||
-- Mason tool install
|
||||
local mason_done = false
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "MasonToolsUpdateCompleted",
|
||||
once = true,
|
||||
callback = function()
|
||||
mason_done = true
|
||||
end,
|
||||
})
|
||||
pcall(function() vim.cmd("MasonToolsInstall") end)
|
||||
vim.wait(TIMEOUT, function()
|
||||
return mason_done
|
||||
end, 200)
|
||||
|
||||
-- Treesitter parsers
|
||||
local ok_ts, ts = pcall(require, "nvim-treesitter")
|
||||
if ok_ts then
|
||||
local handle = ts.install(require("timmypidashev.langs"))
|
||||
if handle and handle.wait then
|
||||
handle:wait(TIMEOUT)
|
||||
end
|
||||
end
|
||||
|
||||
vim.cmd("qall!")
|
||||
Reference in New Issue
Block a user