fix: dashboard now runs on fresh installs (#1896)

This commit is contained in:
kylo252 2021-11-03 12:30:34 +01:00 committed by GitHub
parent 32ca5afa4a
commit a6845c9cc7
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View file

@ -71,7 +71,11 @@ M.setup = function()
return
end
treesitter_configs.setup(lvim.builtin.treesitter)
local opts = vim.deepcopy(lvim.builtin.treesitter)
-- avoid running any installers in headless mode since it's harder to detect failures
opts.ensure_installed = #vim.api.nvim_list_uis() == 0 and {} or opts.ensure_installed
treesitter_configs.setup(opts)
if lvim.builtin.treesitter.on_config_done then
lvim.builtin.treesitter.on_config_done(treesitter_configs)

View file

@ -353,16 +353,13 @@ function setup_lvim() {
echo "Preparing Packer setup"
rm -f "$LUNARVIM_CONFIG_DIR/config.lua"
touch "$LUNARVIM_CONFIG_DIR/config.lua"
cp "$LUNARVIM_RUNTIME_DIR/lvim/utils/installer/config.example.lua" "$LUNARVIM_CONFIG_DIR/config.lua"
"$INSTALL_PREFIX/bin/lvim" --headless \
-c 'autocmd User PackerComplete quitall' \
-c 'PackerSync'
echo "Packer setup complete"
cp "$LUNARVIM_RUNTIME_DIR/lvim/utils/installer/config.example.lua" "$LUNARVIM_CONFIG_DIR/config.lua"
}
function update_lvim() {