re-write whole plugin

added features to have local nvchad themes, override specific colors aka variables in nvchad themes
This commit is contained in:
siduck 2022-05-03 00:07:51 +05:30
parent dbd746da1b
commit 1db5a6eda8
76 changed files with 1592 additions and 1284 deletions

69
lua/integrations/git.lua Normal file
View file

@ -0,0 +1,69 @@
local theme = require("base16").get_colors "base_16"
return {
-- git commits
gitcommitOverflow = {
fg = theme.base08,
},
gitcommitSummary = {
fg = theme.base08,
},
gitcommitComment = {
fg = theme.base03,
},
gitcommitUntracked = {
fg = theme.base03,
},
gitcommitDiscarded = {
fg = theme.base03,
},
gitcommitSelected = {
fg = theme.base03,
},
gitcommitHeader = {
fg = theme.base0E,
},
gitcommitSelectedType = {
fg = theme.base0D,
},
gitcommitUnmergedType = {
fg = theme.base0D,
},
gitcommitDiscardedType = {
fg = theme.base0D,
},
gitcommitBranch = {
fg = theme.base09,
bold = true,
},
gitcommitUntrackedFile = {
fg = theme.base0A,
},
gitcommitUnmergedFile = {
fg = theme.base08,
bold = true,
},
gitcommitDiscardedFile = {
fg = theme.base08,
bold = true,
},
gitcommitSelectedFile = {
fg = theme.base0B,
bold = true,
},
}

35
lua/integrations/mail.lua Normal file
View file

@ -0,0 +1,35 @@
local theme = require("base16").get_colors "base_16"
return {
mailQuoted1 = {
fg = theme.base0A,
},
mailQuoted2 = {
fg = theme.base0B,
},
mailQuoted3 = {
fg = theme.base0E,
},
mailQuoted4 = {
fg = theme.base0C,
},
mailQuoted5 = {
fg = theme.base0D,
},
mailQuoted6 = {
fg = theme.base0A,
},
mailURL = {
fg = theme.base0D,
},
mailEmail = {
fg = theme.base0D,
},
}

189
lua/integrations/misc.lua Normal file
View file

@ -0,0 +1,189 @@
local theme = require("base16").get_colors("base_16")
return {
Normal = {
fg = theme.base05,
bg = theme.base00,
},
Bold = {
bold = true,
},
Debug = {
fg = theme.base08,
},
Directory = {
fg = theme.base0D,
},
Error = {
fg = theme.base00,
bg = theme.base08,
},
ErrorMsg = {
fg = theme.base08,
bg = theme.base00,
},
Exception = {
fg = theme.base08,
},
FoldColumn = {
fg = theme.base0C,
bg = theme.base01,
},
Folded = {
fg = theme.base03,
bg = theme.base01,
},
IncSearch = {
fg = theme.base01,
bg = theme.base09,
},
Italic = {
italic = true,
},
Macro = {
fg = theme.base08,
},
MatchParen = {
bg = theme.base03,
},
ModeMsg = {
fg = theme.base0B,
},
MoreMsg = {
fg = theme.base0B,
},
Question = {
fg = theme.base0D,
},
Search = {
fg = theme.base01,
bg = theme.base0A,
},
Substitute = {
fg = theme.base01,
bg = theme.base0A,
sp = "none",
},
SpecialKey = {
fg = theme.base03,
},
TooLong = {
fg = theme.base08,
},
UnderLined = {
fg = theme.base0B,
},
Visual = {
bg = theme.base02,
},
VisualNOS = {
fg = theme.base08,
},
WarningMsg = {
fg = theme.base08,
},
WildMenu = {
fg = theme.base08,
bg = theme.base0A,
},
Title = {
fg = theme.base0D,
sp = "none",
},
Conceal = {
fg = theme.base0D,
bg = theme.base0D,
},
Cursor = {
fg = theme.base00,
bg = theme.base05,
},
NonText = {
fg = theme.base03,
},
SignColumn = {
fg = theme.base03,
sp = "NONE",
},
ColorColumn = {
bg = theme.base01,
sp = "none",
},
CursorColumn = {
bg = theme.base01,
sp = "none",
},
CursorLine = {
bg = theme.base00,
sp = "none",
},
CursorLineNr = {
bg = theme.base00,
sp = "none",
},
QuickFixLine = {
bg = theme.base01,
sp = "none",
},
StatusLine = {
bg = "NONE",
sp = "none",
},
-- spell
SpellBad = {
undercurl = true,
sp = theme.base08,
},
SpellLocal = {
undercurl = true,
sp = theme.base0C,
},
SpellCap = {
undercurl = true,
sp = theme.base0D,
},
SpellRare = {
undercurl = true,
sp = theme.base0E,
},
}

197
lua/integrations/nvchad.lua Normal file
View file

@ -0,0 +1,197 @@
local colors = require("base16").get_colors "base_30"
local ui = require("core.utils").load_config().ui
local black = colors.black
local black2 = colors.black2
local blue = colors.blue
local darker_black = colors.darker_black
local folder_bg = colors.folder_bg
local green = colors.green
local grey = colors.grey
local grey_fg = colors.grey_fg
local light_grey = colors.light_grey
local line = colors.line
local nord_blue = colors.nord_blue
local one_bg = colors.one_bg
local one_bg2 = colors.one_bg2
local pmenu_bg = colors.pmenu_bg
local purple = colors.purple
local red = colors.red
local white = colors.white
local yellow = colors.yellow
local orange = colors.orange
-- highlight groups & colors
local defaults = {
Comment = { fg = grey_fg },
-- line numbers
CursorLineNr = { fg = white },
LineNr = { fg = grey },
-- those ugly ~'s
EndOfBuffer = { fg = black },
-- floating windows
FloatBorder = { fg = blue },
NormalFloat = { bg = darker_black },
-- Pmenu i.e completion menu
Pmenu = { bg = one_bg },
PmenuSbar = { bg = one_bg2 },
PmenuSel = { bg = pmenu_bg, fg = black },
PmenuThumb = { bg = nord_blue },
-- nvim cmp
CmpItemAbbr = { fg = white },
CmpItemAbbrMatch = { fg = white },
CmpItemKind = { fg = white },
CmpItemMenu = { fg = white },
NvimInternalError = { fg = red },
WinSeparator = { fg = one_bg2 },
-- Dashboard i.e alpha.nvim
AlphaHeader = { fg = grey_fg },
AlphaButtons = { fg = light_grey },
-- Gitsigns.nvim
DiffAdd = {
fg = blue,
},
DiffAdded = {
fg = green,
},
DiffChange = {
fg = light_grey,
},
DiffChangeDelete = {
fg = red,
},
DiffModified = {
fg = orange,
},
DiffDelete = {
fg = red,
},
DiffRemoved = {
fg = red,
},
-- Indent blankline
IndentBlanklineChar = { fg = line },
IndentBlanklineSpaceChar = { fg = line },
-- Lsp Diagnostics
DiagnosticHint = { fg = purple },
DiagnosticError = { fg = red },
DiagnosticWarn = { fg = yellow },
DiagnosticInformation = { fg = green },
-- NvimTree
NvimTreeEmptyFolderName = { fg = folder_bg },
NvimTreeEndOfBuffer = { fg = darker_black },
NvimTreeFolderIcon = { fg = folder_bg },
NvimTreeFolderName = { fg = folder_bg },
NvimTreeGitDirty = { fg = red },
NvimTreeIndentMarker = { fg = one_bg2 },
NvimTreeNormal = { bg = darker_black },
NvimTreeNormalNC = { bg = darker_black },
NvimTreeOpenedFolderName = { fg = folder_bg },
NvimTreeWinSeparator = {
fg = darker_black,
bg = darker_black,
},
NvimTreeWindowPicker = {
fg = red,
bg = black2,
},
NvimTreeCursorLine = {
bg = black2,
},
-- Telescope
TelescopeBorder = {
fg = darker_black,
bg = darker_black,
},
TelescopePromptBorder = {
fg = black2,
bg = black2,
},
TelescopePromptNormal = {
fg = white,
bg = black2,
},
TelescopePromptPrefix = {
fg = red,
bg = black2,
},
TelescopeNormal = { bg = darker_black },
TelescopePreviewTitle = {
fg = black,
bg = green,
},
TelescopePromptTitle = {
fg = black,
bg = red,
},
TelescopeResultsTitle = {
fg = darker_black,
bg = darker_black,
},
TelescopeSelection = { bg = black2 },
}
if ui.transparency then
local hl_groups = {
"NormalFloat",
"Normal",
"Folded",
"NvimTreeNormal",
"NvimTreeNormalNC",
"TelescopeNormal",
"TelescopePrompt",
"TelescopeResults",
"TelescopeBorder",
"TelescopePromptBorder",
"TelescopePromptNormal",
"TelescopePromptPrefix",
}
for index, _ in ipairs(hl_groups) do
defaults[hl_groups[index]] = {
bg = "NONE",
}
end
defaults.NvimTreeWinSeparator = {
fg = grey,
bg = "NONE",
}
defaults.TelescopeResultsTitle = {
fg = black,
bg = blue,
}
end
return defaults

114
lua/integrations/syntax.lua Normal file
View file

@ -0,0 +1,114 @@
local theme = require("base16").get_colors "base_16"
-- Standard syntax highlighting
return {
Boolean = {
fg = theme.base09,
},
Character = {
fg = theme.base08,
},
Conditional = {
fg = theme.base0E,
},
Constant = {
fg = theme.base08,
},
Define = {
fg = theme.base0E,
sp = "none",
},
Delimiter = {
fg = theme.base0F,
},
Float = {
fg = theme.base09,
},
Function = {
fg = theme.base0D,
},
Identifier = {
fg = theme.base08,
sp = "none",
},
Include = {
fg = theme.base0D,
},
Keyword = {
fg = theme.base0E,
},
Label = {
fg = theme.base0A,
},
Number = {
fg = theme.base09,
},
Operator = {
fg = theme.base05,
sp = "none",
},
PreProc = {
fg = theme.base0A,
},
Repeat = {
fg = theme.base0A,
},
Special = {
fg = theme.base0C,
},
SpecialChar = {
fg = theme.base0F,
},
Statement = {
fg = theme.base08,
},
StorageClass = {
fg = theme.base0A,
},
String = {
fg = theme.base0B,
},
Structure = {
fg = theme.base0E,
},
Tag = {
fg = theme.base0A,
},
Todo = {
fg = theme.base0A,
bg = theme.base01,
},
Type = {
fg = theme.base0A,
sp = "none",
},
Typedef = {
fg = theme.base0A,
},
}

View file

@ -0,0 +1,168 @@
local theme = require("base16").get_colors "base_30"
return {
TSAnnotation = {
fg = theme.base0F,
sp = "none",
},
TSAttribute = {
fg = theme.base0A,
sp = "none",
},
TSCharacter = {
fg = theme.base08,
sp = "none",
},
TSConstBuiltin = {
fg = theme.base09,
sp = "none",
},
TSConstMacro = {
fg = theme.base08,
sp = "none",
},
TSError = {
fg = theme.base08,
sp = "none",
},
TSException = {
fg = theme.base08,
sp = "none",
},
TSFloat = {
fg = theme.base09,
sp = "none",
},
TSFuncBuiltin = {
fg = theme.base0D,
sp = "none",
},
TSFuncMacro = {
fg = theme.base08,
sp = "none",
},
TSKeywordOperator = {
fg = theme.base0E,
sp = "none",
},
TSMethod = {
fg = theme.base0D,
sp = "none",
},
TSNamespace = {
fg = theme.base08,
sp = "none",
},
TSNone = {
fg = theme.base05,
sp = "none",
},
TSParameter = {
fg = theme.base08,
sp = "none",
},
TSParameterReference = {
fg = theme.base05,
sp = "none",
},
TSPunctDelimiter = {
fg = theme.base0F,
sp = "none",
},
TSPunctSpecial = {
fg = theme.base05,
sp = "none",
},
TSStringRegex = {
fg = theme.base0C,
sp = "none",
},
TSStringEscape = {
fg = theme.base0C,
sp = "none",
},
TSSymbol = {
fg = theme.base0B,
sp = "none",
},
TSTagDelimiter = {
fg = theme.base0F,
sp = "none",
},
TSText = {
fg = theme.base05,
sp = "none",
},
TSStrong = {
bold = true,
},
TSEmphasis = {
fg = theme.base09,
sp = "none",
},
TSStrike = {
fg = theme.base00,
sp = "none",
strikethrough = true,
},
TSLiteral = {
fg = theme.base09,
sp = "none",
},
TSURI = {
fg = theme.base09,
sp = "none",
underline = true,
},
TSTypeBuiltin = {
fg = theme.base0A,
sp = "none",
},
TSVariableBuiltin = {
fg = theme.base09,
sp = "none",
},
TSDefinition = {
sp = theme.base04,
underline = true,
},
TSDefinitionUsage = {
sp = theme.base04,
underline = true,
},
TSCurrentScope = {
bold = true,
},
}