Restructure config | Move some to a packer plugin | Lot of cleanup
* move teleacope files, updater and related utils to https://github.com/NvChad/core * restructure config file and directory structure * expose mappings for better escape * allow multiple mappings for some * improve merge table function for the same * move autocommands to a seperate file * rearrange everything alphabetically where sanely possible * rearrange packer plugin list on the basis of trigerred state config structure now . ├── init.lua ├── LICENSE ├── lua │ ├── chadrc.lua │ ├── colors │ │ ├── highlights.lua │ │ ├── init.lua │ │ └── themes │ │ ├── chadracula.lua │ │ ├── everforest.lua │ │ ├── gruvchad.lua │ │ ├── javacafe.lua │ │ ├── mountain.lua │ │ ├── norchad.lua │ │ ├── one-light.lua │ │ ├── onedark.lua │ │ ├── tokyonight.lua │ │ └── tomorrow-night.lua │ ├── core │ │ ├── autocmds.lua │ │ ├── init.lua │ │ ├── mappings.lua │ │ ├── options.lua │ │ └── utils.lua │ ├── default_config.lua │ └── plugins │ ├── configs │ │ ├── autopairs.lua │ │ ├── autosave.lua │ │ ├── bufferline.lua │ │ ├── chadsheet.lua │ │ ├── compe.lua │ │ ├── dashboard.lua │ │ ├── gitsigns.lua │ │ ├── icons.lua │ │ ├── lspconfig.lua │ │ ├── luasnip.lua │ │ ├── nvimtree.lua │ │ ├── others.lua │ │ ├── statusline.lua │ │ ├── telescope.lua │ │ ├── treesitter.lua │ │ └── zenmode.lua │ ├── init.lua │ └── packerInit.lua └── README.md
This commit is contained in:
parent
44ae0178f4
commit
9ffddb6b52
44 changed files with 1383 additions and 1789 deletions
36
lua/colors/init.lua
Normal file
36
lua/colors/init.lua
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
local M = {}
|
||||
|
||||
-- if theme given, load given theme if given, otherwise nvchad_theme
|
||||
M.init = function(theme)
|
||||
if not theme then
|
||||
theme = require("core.utils").load_config().ui.theme
|
||||
end
|
||||
|
||||
-- set the global theme, used at various places like theme switcher, highlights
|
||||
vim.g.nvchad_theme = theme
|
||||
|
||||
local present, base16 = pcall(require, "base16")
|
||||
|
||||
if present then
|
||||
-- first load the base16 theme
|
||||
base16(base16.themes(theme), true)
|
||||
|
||||
-- unload to force reload
|
||||
package.loaded["colors.highlights" or false] = nil
|
||||
-- then load the highlights
|
||||
require "colors.highlights"
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
-- returns a table of colors for givem or current theme
|
||||
M.get = function(theme)
|
||||
if not theme then
|
||||
theme = vim.g.nvchad_theme
|
||||
end
|
||||
|
||||
return require("colors.themes." .. theme)
|
||||
end
|
||||
|
||||
return M
|
||||
Loading…
Add table
Add a link
Reference in a new issue