chad nvim theme overlay lol

This commit is contained in:
Harivansh Rathi 2025-12-29 01:01:05 +05:30
parent efe8d19d7a
commit 2c1131fe8e
6 changed files with 119 additions and 59 deletions

View file

@ -16,6 +16,9 @@ vim.opt.rtp:prepend(lazypath)
vim.g.mapleader = " "
vim.g.maplocalleader = ","
-- NvChad base46 cache path (must be before lazy setup)
vim.g.base46_cache = vim.fn.stdpath("data") .. "/base46_cache/"
-- Essential vim options
vim.opt.number = true
vim.opt.relativenumber = false
@ -42,8 +45,11 @@ vim.opt.splitbelow = true
vim.opt.splitright = true
vim.opt.cursorline = true
vim.opt.clipboard = "unnamedplus"
vim.opt.showmode = false -- Disable built-in mode display (lualine shows it)
vim.opt.showmode = false -- Disable built-in mode display
vim.opt.shortmess:append("S") -- Disable native search count display
vim.opt.ruler = false -- Disable native ruler (NvChad statusline shows position)
vim.opt.cmdheight = 0 -- Hide command line when not in use
vim.opt.laststatus = 3 -- Global statusline at the very bottom
-- Enable cursor blinking
vim.opt.guicursor = "n-v-c:block-blinkwait700-blinkoff400-blinkon250,i-ci-ve:ver25-blinkwait700-blinkoff400-blinkon250,r-cr:hor20-blinkwait700-blinkoff400-blinkon250"
@ -51,6 +57,12 @@ vim.opt.guicursor = "n-v-c:block-blinkwait700-blinkoff400-blinkon250,i-ci-ve:ver
-- Keymaps
vim.keymap.set("n", "<leader>q", ":q<CR>", { desc = "Quit" })
-- NvChad tabufline keymaps (buffer/tab navigation)
vim.keymap.set("n", "<Tab>", function() require("nvchad.tabufline").next() end, { desc = "Next buffer" })
vim.keymap.set("n", "<S-Tab>", function() require("nvchad.tabufline").prev() end, { desc = "Previous buffer" })
vim.keymap.set("n", "<leader>x", function() require("nvchad.tabufline").close_buffer() end, { desc = "Close buffer" })
vim.keymap.set("n", "<leader>b", "<cmd>enew<CR>", { desc = "New buffer" })
-- Load plugins
require("lazy").setup("plugins", {
defaults = { lazy = true },
@ -67,4 +79,12 @@ require("lazy").setup("plugins", {
},
},
},
})
})
-- Load NvChad base46 highlights (safe load)
local cache = vim.g.base46_cache
if vim.uv.fs_stat(cache) then
for _, v in ipairs(vim.fn.readdir(cache)) do
dofile(cache .. v)
end
end

View file

@ -1,33 +1,32 @@
{
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"arrow.nvim": { "branch": "master", "commit": "6e0f726f55f99332dd726a53effd6813786b6d49" },
"avante.nvim": { "branch": "main", "commit": "cf352f6f4653dddbac0980c06ca3f97554f80d80" },
"avante.nvim": { "branch": "main", "commit": "a9e9890fc620c46e39bc22c0ccea5d57beefc0e7" },
"base46": { "branch": "v3.0", "commit": "45b336ec52615dd1a3aa47848d894616dd6293a5" },
"dashboard-nvim": { "branch": "master", "commit": "0775e567b6c0be96d01a61795f7b64c1758262f6" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
"gitsigns.nvim": { "branch": "main", "commit": "5813e4878748805f1518cee7abb50fd7205a3a48" },
"gruvbox material dark": { "branch": "main", "commit": "5e0a460d8e0f7f669c158dedd5f9ae2bcac31437" },
"gitsigns.nvim": { "branch": "main", "commit": "130beacf8a51f00aede9c31064c749136679a321" },
"img-clip.nvim": { "branch": "main", "commit": "b6ddfb97b5600d99afe3452d707444afda658aca" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "bf9e7205192015dc48727744f21e09ac986664f9" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "4cfe411526a7a99c18281135e8b4765ae6330d15" },
"mason.nvim": { "branch": "main", "commit": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" },
"neogit": { "branch": "master", "commit": "d8bf9102692250193b855acd9025a826f1af2729" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-autopairs": { "branch": "master", "commit": "c2a0dd0d931d0fb07665e1fedb1ea688da3b80b4" },
"nvim-lspconfig": { "branch": "master", "commit": "d20d83b3f24f5884da73a9fc92fdc47e778b8d0d" },
"nvim-lspconfig": { "branch": "master", "commit": "d696e36d5792daf828f8c8e8d4b9aa90c1a10c2a" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-web-devicons": { "branch": "master", "commit": "6788013bb9cb784e606ada44206b0e755e4323d7" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"smear-cursor.nvim": { "branch": "main", "commit": "c85bdbb25db096fbcf616bc4e1357bd61fe2c199" },
"solarized.nvim": { "branch": "main", "commit": "c0dfe1cbfabd93b546baf5f1408f5df7e02e2050" },
"supermaven-nvim": { "branch": "main", "commit": "07d20fce48a5629686aefb0a7cd4b25e33947d50" },
"telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
"tokyonight": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" },
"vesper": { "branch": "main", "commit": "1717b1ad657c94bec3fc2bdebb0c55452d9fe46d" },
"ui": { "branch": "v3.0", "commit": "eae966484937c9ef2b5e3f465fd9587464dc277c" },
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },
"vim-gutentags": { "branch": "master", "commit": "aa47c5e29c37c52176c44e61c780032dfacef3dd" },
"volt": { "branch": "main", "commit": "620de1321f275ec9d80028c68d1b88b409c0c8b1" },
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
}

27
lua/chadrc.lua Normal file
View file

@ -0,0 +1,27 @@
---@type ChadrcConfig
local M = {}
M.base46 = {
theme = "gruvbox", -- NvChad's gruvbox theme
transparency = true, -- Keep your transparent mode
-- theme_toggle = { "gruvbox", "gruvbox_light" },
}
M.ui = {
statusline = {
enabled = true,
theme = "default", -- options: default, vscode, vscode_colored, minimal
separator_style = "round", -- default, round, block, arrow
},
tabufline = {
enabled = true,
lazyload = true,
},
}
-- Disable nvdash if you want to keep your dashboard.lua
M.nvdash = {
load_on_startup = false,
}
return M

View file

@ -1,51 +1,26 @@
return {
{
"ellisonleao/gruvbox.nvim",
name = "gruvbox",
priority = 1000,
lazy = false,
config = function()
require("gruvbox").setup({
contrast = "hard", -- can be "hard", "soft" or empty string
transparent_mode = true,
})
end,
},
{
"datsfilipe/vesper.nvim",
name = "vesper",
priority = 1000,
lazy = false,
},
{
'maxmx03/solarized.nvim',
lazy = false,
priority = 1000,
---@type solarized.config
opts = {},
},
{
"folke/tokyonight.nvim",
name = "tokyonight",
priority = 1000,
lazy = false,
config = function()
-- Always use Gruvbox dark
vim.o.background = "dark"
vim.cmd.colorscheme("gruvbox")
-- Colorschemes disabled - using NvChad base46 for theming
-- Use :lua require('nvchad.themes').open() to switch themes
-- Or modify lua/chadrc.lua to change the default theme
-- Add command to manually toggle if needed
vim.api.nvim_create_user_command("ToggleTheme", function()
if vim.g.colors_name == "gruvbox" then
vim.o.termguicolors = true
vim.o.background = "light"
require('solarized').setup({})
vim.cmd.colorscheme("solarized")
else
vim.o.background = "dark"
vim.cmd.colorscheme("gruvbox")
end
end, {})
end,
},
return {
-- Keep these as fallbacks if needed (lazy loaded, won't interfere)
-- {
-- "ellisonleao/gruvbox.nvim",
-- name = "gruvbox",
-- enabled = false,
-- },
-- {
-- "datsfilipe/vesper.nvim",
-- name = "vesper",
-- enabled = false,
-- },
-- {
-- 'maxmx03/solarized.nvim',
-- enabled = false,
-- },
-- {
-- "folke/tokyonight.nvim",
-- name = "tokyonight",
-- enabled = false,
-- },
}

View file

@ -1,5 +1,9 @@
-- Disabled: Using NvChad statusline instead
-- To re-enable lualine: set enabled = true below AND
-- in lua/chadrc.lua set M.ui.statusline.enabled = false
return {
'nvim-lualine/lualine.nvim',
enabled = false, -- Disabled in favor of NvChad statusline
event = 'VeryLazy',
dependencies = { 'nvim-tree/nvim-web-devicons' },
opts = {

35
lua/plugins/nvchad.lua Normal file
View file

@ -0,0 +1,35 @@
return {
"nvim-lua/plenary.nvim",
{
"nvchad/base46",
lazy = false,
priority = 1000,
build = function()
require("base46").load_all_highlights()
end,
config = function()
-- Generate cache on first load if it doesn't exist
local cache_path = vim.g.base46_cache
if not vim.uv.fs_stat(cache_path) then
vim.fn.mkdir(cache_path, "p")
require("base46").load_all_highlights()
end
end,
},
{
"nvchad/ui",
lazy = false,
priority = 999,
config = function()
require("nvchad")
end,
},
-- Optional: theme switcher UI (use :lua require('nvchad.themes').open())
{
"nvchad/volt",
lazy = true,
},
}