install binaries from mason.nvm & tsparsers automatically after nvchad install

This commit is contained in:
siduck 2022-09-11 01:07:44 +05:30
parent 3df9c03eb5
commit 8a18f89b03
2 changed files with 10 additions and 1 deletions

View File

@ -18,6 +18,15 @@ if fn.empty(fn.glob(install_path)) > 0 then
vim.cmd "packadd packer.nvim" vim.cmd "packadd packer.nvim"
require "plugins" require "plugins"
vim.cmd "PackerSync" vim.cmd "PackerSync"
-- install binaries from mason.nvim & tsparsers
vim.api.nvim_create_autocmd("User", {
pattern = "PackerComplete",
callback = function()
vim.cmd "bw | silent! MasonInstallAll" -- close packer window
require("packer").loader "nvim-treesitter"
end,
})
end end
pcall(require, "custom") pcall(require, "custom")

View File

@ -136,7 +136,7 @@ M.load_override = function(options_table, name)
local plugin_configs, plugin_options = M.load_config().plugins, nil local plugin_configs, plugin_options = M.load_config().plugins, nil
-- support old plugin syntax for override -- support old plugin syntax for override
local user_override = plugin_configs.user and plugin_configs.user.override and plugin_configs.user.override[name] local user_override = plugin_configs.override and plugin_configs.override[name]
if user_override and type(user_override) == "table" then if user_override and type(user_override) == "table" then
plugin_options = user_override plugin_options = user_override
end end