avoid loading cached highlights in plugin opts file
This commit is contained in:
parent
7b3aefee53
commit
a2690a4b72
7 changed files with 20 additions and 20 deletions
|
@ -1,13 +1,6 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.lazy = function(install_path)
|
M.lazy = function(install_path)
|
||||||
print "Downloading lazy-lock.json file..."
|
|
||||||
|
|
||||||
local config_branch = require("core.utils").load_config().options.nvChad.update_branch
|
|
||||||
local lazy_local_url = "https://raw.githubusercontent.com/NvChad/extensions/lazy-lock/" .. config_branch .. ".json"
|
|
||||||
|
|
||||||
vim.fn.system { "curl", "-o", "lazy-lock.json", lazy_local_url }
|
|
||||||
|
|
||||||
print "Bootstrapping lazy.nvim .."
|
print "Bootstrapping lazy.nvim .."
|
||||||
|
|
||||||
vim.fn.system {
|
vim.fn.system {
|
||||||
|
@ -30,7 +23,8 @@ M.lazy = function(install_path)
|
||||||
|
|
||||||
-- install binaries from mason.nvim & tsparsers on LazySync
|
-- install binaries from mason.nvim & tsparsers on LazySync
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
vim.cmd "bw | silent! MasonInstallAll" -- close lazy window
|
vim.cmd "silent! MasonInstallAll"
|
||||||
|
-- print success message
|
||||||
end, 0)
|
end, 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -41,9 +35,18 @@ M.gen_chadrc_template = function()
|
||||||
|
|
||||||
if input == "y" then
|
if input == "y" then
|
||||||
-- clone example_config repo
|
-- clone example_config repo
|
||||||
local example_config_url = "https://github.com/NvChad/example_config"
|
|
||||||
print "cloning chadrc starter template repo...."
|
print "cloning chadrc starter template repo...."
|
||||||
vim.fn.system { "git", "clone", "--depth", "1", "-b", "v2.0", example_config_url, vim.fn.stdpath "config" .. "/lua/custom" }
|
|
||||||
|
vim.fn.system {
|
||||||
|
"git",
|
||||||
|
"clone",
|
||||||
|
"--depth",
|
||||||
|
"1",
|
||||||
|
"-b",
|
||||||
|
"v2.0",
|
||||||
|
"https://github.com/NvChad/example_config",
|
||||||
|
vim.fn.stdpath "config" .. "/lua/custom",
|
||||||
|
}
|
||||||
vim.cmd "redraw|echo ''"
|
vim.cmd "redraw|echo ''"
|
||||||
|
|
||||||
-- delete .git from that repo
|
-- delete .git from that repo
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
dofile(vim.g.base46_cache .. "mason")
|
|
||||||
|
|
||||||
local options = {
|
local options = {
|
||||||
ensure_installed = { "lua-language-server" }, -- not an option from mason.nvim
|
ensure_installed = { "lua-language-server" }, -- not an option from mason.nvim
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
dofile(vim.g.base46_cache .. "nvimtree")
|
|
||||||
|
|
||||||
local options = {
|
local options = {
|
||||||
filters = {
|
filters = {
|
||||||
dotfiles = false,
|
dotfiles = false,
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
dofile(vim.g.base46_cache .. "telescope")
|
|
||||||
|
|
||||||
local options = {
|
local options = {
|
||||||
defaults = {
|
defaults = {
|
||||||
vimgrep_arguments = {
|
vimgrep_arguments = {
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
dofile(vim.g.base46_cache .. "syntax")
|
|
||||||
|
|
||||||
local options = {
|
local options = {
|
||||||
ensure_installed = { "lua" },
|
ensure_installed = { "lua" },
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
dofile(vim.g.base46_cache .. "whichkey")
|
|
||||||
|
|
||||||
local options = {
|
local options = {
|
||||||
|
|
||||||
icons = {
|
icons = {
|
||||||
|
|
|
@ -71,6 +71,7 @@ local default_plugins = {
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
opts = require "plugins.configs.treesitter",
|
opts = require "plugins.configs.treesitter",
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
|
dofile(vim.g.base46_cache .. "syntax")
|
||||||
require("nvim-treesitter.configs").setup(opts)
|
require("nvim-treesitter.configs").setup(opts)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
@ -105,8 +106,11 @@ local default_plugins = {
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
cmd = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUninstall", "MasonUninstallAll", "MasonLog" },
|
cmd = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUninstall", "MasonUninstallAll", "MasonLog" },
|
||||||
|
opts = require "plugins.configs.mason",
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
|
dofile(vim.g.base46_cache .. "mason")
|
||||||
require("mason").setup(opts)
|
require("mason").setup(opts)
|
||||||
|
|
||||||
-- custom nvchad cmd to install all mason binaries listed
|
-- custom nvchad cmd to install all mason binaries listed
|
||||||
vim.api.nvim_create_user_command("MasonInstallAll", function()
|
vim.api.nvim_create_user_command("MasonInstallAll", function()
|
||||||
vim.cmd("MasonInstall " .. table.concat(opts.ensure_installed, " "))
|
vim.cmd("MasonInstall " .. table.concat(opts.ensure_installed, " "))
|
||||||
|
@ -186,6 +190,7 @@ local default_plugins = {
|
||||||
init = require("core.utils").load_mappings "nvimtree",
|
init = require("core.utils").load_mappings "nvimtree",
|
||||||
opts = require "plugins.configs.nvimtree",
|
opts = require "plugins.configs.nvimtree",
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
|
dofile(vim.g.base46_cache .. "nvimtree")
|
||||||
require("nvim-tree").setup(opts)
|
require("nvim-tree").setup(opts)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
@ -200,6 +205,7 @@ local default_plugins = {
|
||||||
end,
|
end,
|
||||||
|
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
|
dofile(vim.g.base46_cache .. "telescope")
|
||||||
local telescope = require "telescope"
|
local telescope = require "telescope"
|
||||||
telescope.setup(opts)
|
telescope.setup(opts)
|
||||||
|
|
||||||
|
@ -218,6 +224,7 @@ local default_plugins = {
|
||||||
init = require("core.utils").load_mappings "whichkey",
|
init = require("core.utils").load_mappings "whichkey",
|
||||||
opts = require "plugins.configs.whichkey",
|
opts = require "plugins.configs.whichkey",
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
|
dofile(vim.g.base46_cache .. "whichkey")
|
||||||
require("which-key").setup(opts)
|
require("which-key").setup(opts)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue