WIP: update-upstream #4

Closed
cscherrNT wants to merge 69 commits from update-upstream into master
17 changed files with 14 additions and 78 deletions
Showing only changes of commit 73bf6c437f - Show all commits

View File

@ -1,18 +1 @@
require "core.options" print('use this along starter!!!')
require "core.autocmds"
--
-- local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
--
-- -- bootstrap lazy.nvim!
-- if not vim.loop.fs_stat(lazypath) then
-- require("core.bootstrap").gen_chadrc_template()
-- require("core.bootstrap").lazy(lazypath)
-- end
--
-- dofile(vim.g.base46_cache .. "defaults")
-- vim.opt.rtp:prepend(lazypath)
-- require("lazy").setup({
-- { import = "plugins" },
-- { import = "custom.plugins" },
-- }, require "configs.lazy")

View File

@ -1,47 +0,0 @@
local M = {}
local fn = vim.fn
M.echo = function(str)
vim.cmd "redraw"
vim.api.nvim_echo({ { str, "Bold" } }, true, {})
end
local function shell_call(args)
local output = fn.system(args)
assert(vim.v.shell_error == 0, "External call failed with error code: " .. vim.v.shell_error .. "\n" .. output)
end
M.lazy = function(install_path)
------------- base46 ---------------
local lazy_path = fn.stdpath "data" .. "/lazy/base46"
M.echo " Compiling base46 theme to bytecode ..."
local base46_repo = "https://github.com/NvChad/base46"
shell_call { "git", "clone", "--depth", "1", "-b", "v3.0", base46_repo, lazy_path }
vim.opt.rtp:prepend(lazy_path)
require("base46").compile()
--------- lazy.nvim ---------------
M.echo " Installing lazy.nvim & plugins ..."
local repo = "https://github.com/folke/lazy.nvim.git"
shell_call { "git", "clone", "--filter=blob:none", "--branch=stable", repo, install_path }
vim.opt.rtp:prepend(install_path)
-- install plugins
require "plugins"
-- mason packages & show post_bootstrap screen
vim.cmd "MasonInstallAll"
local lastpkg = vim.g.mason_binaries_list[#vim.g.mason_binaries_list]
-- Keep track of which mason pkgs get installed
require("mason-registry"):on("package:install:success", function(pkg)
if tostring(pkg) == "Package(name=" .. lastpkg .. ")" then
print "All done! Now read nvchad.com "
end
end)
end
return M

View File

@ -28,14 +28,15 @@ autocmd("BufWritePost", {
-- statusline -- statusline
if config.ui.statusline.theme ~= "custom" then if config.ui.statusline.theme ~= "custom" then
require("plenary.reload").reload_module("nvchad.statusline." .. config.ui.statusline.theme) require("plenary.reload").reload_module("nvchad.stl.utils")
vim.opt.statusline = "%!v:lua.require('nvchad.statusline." .. config.ui.statusline.theme .. "').run()" require("plenary.reload").reload_module("nvchad.stl." .. config.ui.statusline.theme)
vim.opt.statusline = "%!v:lua.require('nvchad.stl." .. config.ui.statusline.theme .. "')()"
end end
-- tabufline -- tabufline
if config.ui.tabufline.enabled then if config.ui.tabufline.enabled then
require("plenary.reload").reload_module "nvchad.tabufline.modules" require("plenary.reload").reload_module "nvchad.tabufline.modules"
vim.opt.tabline = "%!v:lua.require('nvchad.tabufline.modules').run()" vim.opt.tabline = "%!v:lua.require('nvchad.tabufline.modules')()"
end end
require("base46").load_all_highlights() require("base46").load_all_highlights()

View File

@ -35,11 +35,11 @@ map("n", "<leader>q", vim.diagnostic.setloclist, { desc = "Lsp diagnostic loclis
map("n", "<leader>b", "<cmd>enew<CR>", { desc = "Buffer New" }) map("n", "<leader>b", "<cmd>enew<CR>", { desc = "Buffer New" })
map("n", "<tab>", function() map("n", "<tab>", function()
require("nvchad.tabufline").tabuflineNext() require("nvchad.tabufline").next()
end, { desc = "Buffer Goto next" }) end, { desc = "Buffer Goto next" })
map("n", "<S-tab>", function() map("n", "<S-tab>", function()
require("nvchad.tabufline").tabuflinePrev() require("nvchad.tabufline").prev()
end, { desc = "Buffer Goto prev" }) end, { desc = "Buffer Goto prev" })
map("n", "<leader>x", function() map("n", "<leader>x", function()

View File

@ -2,7 +2,7 @@ local opt = vim.opt
local g = vim.g local g = vim.g
-------------------------------------- globals ----------------------------------------- -------------------------------------- globals -----------------------------------------
g.base46_cache = vim.fn.stdpath "data" .. "/nvchad/base46/" -- g.base46_cache = vim.fn.stdpath "data" .. "/nvchad/base46/"
g.toggle_theme_icon = "" g.toggle_theme_icon = ""
-------------------------------------- options ------------------------------------------ -------------------------------------- options ------------------------------------------
@ -47,7 +47,7 @@ opt.updatetime = 250
-- when cursor reaches end/beginning of line -- when cursor reaches end/beginning of line
opt.whichwrap:append "<>[]hl" opt.whichwrap:append "<>[]hl"
g.mapleader = " " -- g.mapleader = " "
-- disable some default providers -- disable some default providers
vim.g["loaded_node_provider"] = 0 vim.g["loaded_node_provider"] = 0

View File

@ -3,7 +3,7 @@ return {
event = "InsertEnter", event = "InsertEnter",
opts = function() opts = function()
return require "configs.cmp" return require "nvchad.configs.cmp"
end, end,
config = function(_, opts) config = function(_, opts)

View File

@ -27,6 +27,7 @@ return {
"lewis6991/gitsigns.nvim", "lewis6991/gitsigns.nvim",
event = "User FilePost", event = "User FilePost",
opts = options, opts = options,
config = function(_, opts) config = function(_, opts)
dofile(vim.g.base46_cache .. "git") dofile(vim.g.base46_cache .. "git")
require("gitsigns").setup(opts) require("gitsigns").setup(opts)

View File

@ -2,6 +2,6 @@ return {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
event = "User FilePost", event = "User FilePost",
config = function() config = function()
require("configs.lspconfig").defaults() require("nvchad.configs.lspconfig").defaults()
end, end,
} }

View File

@ -3,8 +3,7 @@ return {
{ {
"NvChad/base46", "NvChad/base46",
-- branch = "v3.0", branch = "v3.0",
dir = "~/projects/base46/",
build = function() build = function()
require("base46").load_all_highlights() require("base46").load_all_highlights()
end, end,
@ -12,8 +11,7 @@ return {
{ {
"NvChad/ui", "NvChad/ui",
-- branch = "v3.0", branch = "v3.0",
dir = "~/projects/ui/",
lazy = false, lazy = false,
config = function() config = function()
require "nvchad" require "nvchad"