Compare commits

..

No commits in common. "ab19e266489dcffd4689bd185d76b1cf33493822" and "dba1edef828170304b3dca2ef849db6fcc7563e4" have entirely different histories.

View file

@ -1,83 +1,99 @@
local M = {} local M = {}
M.colors = function() M.colors = function()
local c = { -- 16 | 16 | 256 | local c = { -- 16 | 16 | 256 |
-- dark | light | colors | R G B -- dark | light | colors | R G B
--------+-------+--------+--------------- --------+-------+--------+---------------
dark0 = '#1d2021', -- | | 233 | 29 32 33 dark0_h = '#1d2021', -- | | 233 | 29 32 33
--dark0_h = '#1d2021', -- | | 233 | 29 32 33 dark0 = '#282828', -- 0 | | 235 | 40 40 40
--dark0 = '#282828', -- 0 | | 235 | 40 40 40 dark0_s = '#32302f', -- | | 236 | 50 48 47
--dark0_s = '#32302f', -- | | 236 | 50 48 47 dark1 = '#3c3836', -- | 15 | 237 | 60 56 54
dark1 = '#3c3836', -- | 15 | 237 | 60 56 54 dark2 = '#504945', -- | | 239 | 80 73 69
dark2 = '#504945', -- | | 239 | 80 73 69 dark3 = '#665c54', -- | | 241 | 102 92 84
dark3 = '#665c54', -- | | 241 | 102 92 84 dark4 = '#7c6f64', -- | 7 | 243 | 124 111 100
dark4 = '#7c6f64', -- | 7 | 243 | 124 111 100 gray = '#928374', -- 8 | 8 | 24[4,5]| 146 131 116
gray = '#928374', -- 8 | 8 | 24[4,5]| 146 131 116 light4 = '#a89984', -- 7 | | 246 | 168 153 132
light4 = '#a89984', -- 7 | | 246 | 168 153 132 light3 = '#bdae93', -- | | 248 | 189 174 147
light3 = '#bdae93', -- | | 248 | 189 174 147 light2 = '#d5c4a1', -- | | 250 | 213 196 161
light2 = '#d5c4a1', -- | | 250 | 213 196 161 light1 = '#ebdbb2', -- 15 | | 223 | 235 219 178
light1 = '#ebdbb2', -- 15 | | 223 | 235 219 178 light0_s = '#f2e5bc', -- | | 228 | 242 229 188
--light0_s = '#f2e5bc', -- | | 228 | 242 229 188 light0 = '#fbf1c7', -- | 0 | 229 | 253 244 193
--light0 = '#fbf1c7', -- | 0 | 229 | 253 244 193 light0_h = '#f9f5d7', -- | | 230 | 249 245 215
--light0_h = '#f9f5d7', -- | | 230 | 249 245 215
light0 = '#f9f5d7', -- | | 230 | 249 245 215
red_darkest = '#2e100f', red_dark = '#9d0006', -- | 9 | 88 | 157 0 6
green_darkest = '#2e2e0f', green_dark = '#79740e', -- | 10 | 100 | 121 116 14
yellow_darkest = '#2e240f', yellow_dark = '#b57614', -- | 11 | 136 | 181 118 20
blue_darkest = '#142829', blue_dark = '#076678', -- | 12 | 24 | 6 102 120
purple_darkest = '#29141e', purple_dark = '#8f3f71', -- | 13 | 96 | 143 63 113
aqua_darkest = '#182519', aqua_dark = '#427b58', -- | 14 | 66 | 66 123 88
orange_darkest = '#321a0b', orange_dark = '#af3a03', -- | | 130 | 175 58 3
red_darker = '#9d0006', -- | 9 | 88 | 157 0 6 red = '#cc241d', -- 1 | 1 | 123 | 204 36 29
green_darker = '#79740e', -- | 10 | 100 | 121 116 14 green = '#98971a', -- 2 | 2 | 106 | 152 151 26
yellow_darker = '#b57614', -- | 11 | 136 | 181 118 20 yellow = '#d79921', -- 3 | 3 | 172 | 215 153 33
blue_darker = '#076678', -- | 12 | 24 | 6 102 120 blue = '#458588', -- 4 | 4 | 66 | 69 133 136
purple_darker = '#8f3f71', -- | 13 | 96 | 143 63 113 purple = '#b16286', -- 5 | 5 | 132 | 177 98 134
aqua_darker = '#427b58', -- | 14 | 66 | 66 123 88 aqua = '#689d6a', -- 6 | 6 | 72 | 104 157 106
orange_darker = '#af3a03', -- | | 130 | 175 58 3 orange = '#d65d0e', -- | | 166 | 214 93 14
red = '#cc241d', -- 1 | 1 | 123 | 204 36 29 red_light = '#fb4934', -- 9 | | 167 | 251 73 52
green = '#98971a', -- 2 | 2 | 106 | 152 151 26 green_light = '#b8bb26', -- 10 | | 142 | 184 187 38
yellow = '#d79921', -- 3 | 3 | 172 | 215 153 33 yellow_light = '#fabd2f', -- 11 | | 214 | 250 189 47
blue = '#458588', -- 4 | 4 | 66 | 69 133 136 blue_light = '#83a598', -- 12 | | 109 | 131 165 152
purple = '#b16286', -- 5 | 5 | 132 | 177 98 134 purple_light = '#d3869b', -- 13 | | 175 | 211 134 155
aqua = '#689d6a', -- 6 | 6 | 72 | 104 157 106 aqua_light = '#8ec07c', -- 14 | | 108 | 142 192 124
orange = '#d65d0e', -- | | 166 | 214 93 14 orange_light = '#fe8019', -- | | 208 | 254 128 25
red_lighter = '#fb4934', -- 9 | | 167 | 251 73 52
green_lighter = '#b8bb26', -- 10 | | 142 | 184 187 38
yellow_lighter = '#fabd2f', -- 11 | | 214 | 250 189 47
blue_lighter = '#83a598', -- 12 | | 109 | 131 165 152
purple_lighter = '#d3869b', -- 13 | | 175 | 211 134 155
aqua_lighter = '#8ec07c', -- 14 | | 108 | 142 192 124
orange_lighter = '#fe8019', -- | | 208 | 254 128 25
red_lightest = '#ffd7d4',
green_lightest = '#eeeed2',
yellow_lightest = '#f3eace',
blue_lightest = '#d2e4e5',
purple_lightest = '#f2dee7',
aqua_lightest = '#d4e3d4',
orange_lightest = '#f3e0d3',
} }
local is_dark = vim.opt.background:get() == 'dark' if vim.opt.background:get() == 'dark' then
local palette = {} -- c.bg0 = c.dark0 -- default contrast
-- c.bg0 = c.dark0_s -- soft contrast
c.bg0 = c.dark0_h -- hard contrast
for i = 0, 4, 1 do c.bg1 = c.dark1
palette['fg' .. tostring(i)] = c[(is_dark and 'light' or 'dark') .. tostring(i)] c.bg2 = c.dark2
palette['bg' .. tostring(i)] = c[(is_dark and 'dark' or 'light') .. tostring(i)] c.bg3 = c.dark3
c.bg4 = c.dark4
c.fg0 = c.light0
c.fg1 = c.light1
c.fg2 = c.light2
c.fg3 = c.light3
c.fg4 = c.light4
c.red_faded = c.red_dark
c.green_faded = c.green_dark
c.yellow_faded = c.yellow_dark
c.blue_faded = c.blue_dark
c.purple_faded = c.purple_dark
c.aqua_faded = c.aqua_dark
c.orange_faded = c.orange_dark
else
c.bg0 = c.light0 -- default contrast
-- c.bg0 = c.light0_s -- soft contrast
-- c.bg0 = c.light0_h -- hard contrast
c.bg1 = c.light1
c.bg2 = c.light2
c.bg3 = c.light3
c.bg4 = c.light4
c.fg0 = c.dark0
c.fg1 = c.dark1
c.fg2 = c.dark2
c.fg3 = c.dark3
c.fg4 = c.dark4
c.red_faded = c.red_light
c.green_faded = c.green_light
c.yellow_faded = c.yellow_light
c.blue_faded = c.blue_light
c.purple_faded = c.purple_light
c.aqua_faded = c.aqua_light
c.orange_faded = c.orange_light
end end
for _, accent in ipairs({'red', 'green', 'yellow', 'blue', 'purple', 'aqua', 'orange'}) do return c
palette[accent] = c[accent]
palette['br_' .. accent] = c[accent .. '_' .. (is_dark and 'lighter' or 'darker')]
palette[accent .. '_bg'] = c[accent .. '_' .. (is_dark and 'darkest' or 'lightest')]
end
return palette
end end
M.highlights = function() M.highlights = function()
@ -128,7 +144,7 @@ M.highlights = function()
SpecialComment = { link = 'Special' }, -- special things inside a comment SpecialComment = { link = 'Special' }, -- special things inside a comment
Debug = { link = 'Special' }, -- debugging statements Debug = { link = 'Special' }, -- debugging statements
Underlined = { underline = true }, Underlined = { fg = C.purple_faded, underline = true },
Ignore = { }, Ignore = { },
Todo = { fg = C.purple, bold = true }, Todo = { fg = C.purple, bold = true },
Error = { fg = C.red }, Error = { fg = C.red },
@ -157,18 +173,16 @@ M.highlights = function()
IncSearch = { fg = C.yellow, reverse = true }, IncSearch = { fg = C.yellow, reverse = true },
Search = { fg = C.fg4 , reverse = true }, Search = { fg = C.fg4 , reverse = true },
DiffAdd = { fg = C.green, bg = C.green_bg }, DiffAdd = { fg = C.green},
DiffDelete = { fg = C.red, bg = C.red_bg }, DiffChange = { fg = C.yellow},
DiffChange = { fg = C.yellow, bg = C.yellow_bg }, DiffDelete = { fg = C.red},
DiffText = { fg = C.orange, bg = C.orange_bg }, DiffText = { fg = C.orange},
diffFile = { fg = C.br_blue, bg = C.blue_bg },
diffIndexLine = { fg = C.blue },
diffNewFile = { link = 'diffIndexLine' },
diffOldFile = { link = 'diffIndexLine' },
diffLine = { fg = C.purple },
diffSubname = { link = 'diffLine' },
diffAdded = { link = 'DiffAdd' }, diffAdded = { link = 'DiffAdd' },
diffRemoved = { link = 'DiffDelete' }, diffRemoved = { link = 'DiffDelete' },
diffLine = { fg = C.purple },
diffSubname = { link = 'diffine' },
diffFile = { fg = C.blue },
diffIndexLine = { link = 'diffFile' },
SpellBad = { fg = C.orange, undercurl = true }, SpellBad = { fg = C.orange, undercurl = true },
SpellCap = { undercurl = true }, SpellCap = { undercurl = true },
@ -197,7 +211,7 @@ M.highlights = function()
TabLineFill = { fg = C.fg4 , bg = C.bg2 }, TabLineFill = { fg = C.fg4 , bg = C.bg2 },
TabLineSel = { fg = C.yellow, bg = bg }, TabLineSel = { fg = C.yellow, bg = bg },
MatchParen = { fg = C.red, bg = C.reg_bg, bold = true }, MatchParen = { fg = C.red, bg = C.bg3, bold = true },
}, },
pum = { pum = {
@ -214,7 +228,7 @@ M.highlights = function()
helpSpecial = { link = 'Special' }, helpSpecial = { link = 'Special' },
vimSet = { link = 'Normal' }, vimSet = { link = 'Normal' },
vimSetEqual = { link = 'Normal' }, vimSetEqual = { link = 'Normal' },
vimCommentString = { fg = C.purple }, vimCommentString = { fg = C.purple_faded },
vimCommand = { fg = C.yellow }, vimCommand = { fg = C.yellow },
vimCmdSep = { fg = C.blue, bold = true }, vimCmdSep = { fg = C.blue, bold = true },
helpExample = { fg = C.fg3 }, helpExample = { fg = C.fg3 },
@ -238,11 +252,11 @@ M.highlights = function()
gitcommitSelected = { link = 'gitcommitComment' }, gitcommitSelected = { link = 'gitcommitComment' },
gitcommitOnBranch = { link = 'gitcommitComment' }, gitcommitOnBranch = { link = 'gitcommitComment' },
gitcommitBranch = { fg = C.br_blue, bg = C.blue_bg }, gitcommitBranch = { fg = C.blue, bg = C.bg1 },
gitcommitNoBranch = { link = 'gitcommitBranch' }, gitcommitNoBranch = { link = 'gitcommitBranch' },
gitcommitHeader = { fg = C.bg4 }, gitcommitHeader = { fg = C.bg3 },
gitcommitFile = { link = 'gitcommitHeader' }, gitcommitFile = { fg = C.fg4 },
gitcommitSelectedType = { fg = C.green }, gitcommitSelectedType = { fg = C.green },
gitcommitSelectedFile = { link = 'gitcommitSelectedType' }, gitcommitSelectedFile = { link = 'gitcommitSelectedType' },
@ -385,26 +399,26 @@ M.highlights = function()
-- 'tpope/vim-fugitive' -- 'tpope/vim-fugitive'
fugitive = { fugitive = {
fugitiveHeader = { link = 'Comment' }, fugitiveHeader = { link = 'Label' },
fugitiveHash = { fg = C.br_blue }, fugitiveHash = { fg = C.purple_faded },
fugitiveSymbolicRef = { link = 'gitcommitBranch' }, fugitiveSymbolicRef = { link = 'gitcommitBranch' },
fugitiveCount = { link = 'Normal' }, fugitiveCount = { link = 'fugitiveUntrackedSection' },
fugitiveHeading = { fg = C.br_yellow, italic = true, bold = true }, fugitiveHeading = { fg = C.yellow },
fugitiveUntrackedHeading = { fg = C.br_aqua, italic = true, bold = true }, fugitiveUntrackedHeading = { link = 'gitcommitUntrackedFile' },
fugitiveUnstagedHeading = { fg = C.br_orange, italic = true, bold = true }, fugitiveUnstagedHeading = { link = 'gitcommitDiscardedFile' },
fugitiveStagedHeading = { fg = C.br_green, italic = true, bold = true }, fugitiveStagedHeading = { link = 'gitcommitSelectedFile' },
fugitiveModifier = { fg = C.yellow },
fugitiveUntrackedModifier = { fg = C.aqua },
fugitiveUnstagedModifier = { fg = C.orange },
fugitiveStagedModifier = { fg = C.green },
fugitiveSection = { link = 'Normal' }, fugitiveSection = { link = 'Normal' },
fugitiveUntrackedSection = { link = 'fugitiveSection' }, fugitiveUntrackedSection = { fg = C.fg2 },
fugitiveUnstagedSection = { link = 'fugitiveSection' }, fugitiveUnstagedSection = { link = 'fugitiveUntrackedSection' },
fugitiveStagedSection = { link = 'fugitiveSection' }, fugitiveStagedSection = { link = 'fugitiveUntrackedSection' },
fugitiveModifier = { link = 'fugitiveHeading' },
fugitiveUntrackedModifier = { link = 'gitcommitUntrackedFile' },
fugitiveUnstagedModifier = { link = 'gitcommitDiscardedFile' },
fugitiveStagedModifier = { link = 'gitcommitSelectedFile' },
fugitiveHelpHeader = { link = 'fugitiveHeader' }, fugitiveHelpHeader = { link = 'fugitiveHeader' },
fugitiveHelpTag = { link = 'Tag' }, fugitiveHelpTag = { link = 'Tag' },
@ -412,54 +426,6 @@ M.highlights = function()
fugitiveStop = { link = 'Function' }, fugitiveStop = { link = 'Function' },
}, },
neogit = {
NeogitCommitMessage = { link = 'Comment' },
NeogitBranch = { fg = C.br_blue, bg = C.blue_bg, bold = true },
NeogitRemote = { fg = C.blue, bg = C.blue_bg, italic = true},
NeogitObjectId = { fg = C.br_blue },
NeogitStash = { link = 'NeogitObjectId' },
NeogitRebaseDone = { link = 'NeogitObjectId' },
NeogitUntrackedfiles = { fg = C.br_aqua, italic = true, bold = true },
NeogitUnstagedchanges = { fg = C.br_orange, italic = true, bold = true },
NeogitStagedchanges = { fg = C.br_green, italic = true, bold = true },
NeogitStashes = { fg = C.br_yellow, italic = true, bold = true },
NeogitUnmergedInto = { link = 'NeogitStashes' },
NeogitUnpushedTo = { link = 'NeogitStashes' },
NeogitUnpulledFrom = { link = 'NeogitStashes' },
NeogitRecentcommits = { link = 'NeogitStashes' },
NeogitRebasing = { link = 'NeogitStashes' },
NeogitHunkHeader = { fg = C.purple },
NeogitHunkHeaderHighlight = { fg = C.br_purple },
NeogitDiffContext = { fg = C.bg4 },
NeogitDiffContextHighlight = { bg = C.bg0 },
NeogitDiffAdd = { fg = C.green, bg = C.green_bg },
NeogitDiffAddHighlight = { fg = C.green, bg = C.green_bg },
NeogitDiffDelete = { fg = C.red, bg = C.red_bg },
NeogitDiffDeleteHighlight = { fg = C.red, bg = C.red_bg },
NeogitPopupSectionTitle = { fg = C.yellow },
NeogitPopupBranchName = { link = 'NeogitBranch' },
NeogitPopupBold = { bold = true },
NeogitPopupSwitchKey = { fg = C.blue },
NeogitPopupSwitchEnabled = { fg = C.br_red },
NeogitPopupSwitchDisabled = { link = 'Comment' },
NeogitPopupOptionKey = { link = 'NeogitPopupSwitchKey' },
NeogitPopupOptionEnabled = { link = 'NeogitPopupSwitchEnabled' },
NeogitPopupOptionDisabled = { link = 'NeogitPopupSwitchDisabled' },
NeogitPopupConfigKey = { link = 'NeogitPopupSwitchKey' },
NeogitPopupConfigEnabled = { link = 'NeogitPopupSwitchEnabled' },
NeogitPopupConfigDisabled = { link = 'NeogitPopupSwitchDisabled' },
NeogitPopupActionKey = { fg = C.aqua },
NeogitPopupActionDisabled = { link = 'Comment' },
NeogitCommitViewHeader = { fg = C.yellow },
NeogitFilePath = { fg = C.fg1, italic = true },
NeogitDiffHeader = { fg = C.blue, bg = C.blue_bg },
NeogitDiffHeaderHighlight = { fg = C.br_blue, bg = C.blue_bg },
},
-- 'ntpeters/vim-better-whitespace' -- 'ntpeters/vim-better-whitespace'
better_whitespace = { better_whitespace = {
ExtraWhitespace = { fg = C.orange, bg = C.orange }, -- trailing whitespace ExtraWhitespace = { fg = C.orange, bg = C.orange }, -- trailing whitespace