~kris/dots

srice

ref: 3bdfd3e0c26b75a939850355c30bee6fa9cc9abd srice/.config/write/colors/writing.lua -rw-r--r-- 3.0 KiB
3bdfd3e0 — Kris Yotam sync: lock down plan9 theme, wallpapers, nvim configs 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
vim.cmd("highlight clear")
vim.g.colors_name = "writing"

local bg = "#1a1a1a"
local fg = "#c8c8c8"
local dim = "#585858"
local cursorline = "#222222"

local hi = function(group, opts)
  vim.api.nvim_set_hl(0, group, opts)
end

-- Core
hi("Normal", { bg = bg, fg = fg })
hi("NormalFloat", { bg = bg, fg = fg })
hi("NormalNC", { bg = bg, fg = fg })
hi("EndOfBuffer", { bg = bg, fg = bg })
hi("CursorLine", { bg = cursorline })
hi("CursorLineNr", { bg = cursorline, fg = fg })
hi("LineNr", { fg = dim })
hi("SignColumn", { bg = bg })
hi("VertSplit", { bg = bg, fg = dim })
hi("WinSeparator", { bg = bg, fg = dim })
hi("StatusLine", { bg = bg, fg = bg })
hi("StatusLineNC", { bg = bg, fg = bg })
hi("TabLine", { bg = bg, fg = dim })
hi("TabLineFill", { bg = bg })
hi("TabLineSel", { bg = bg, fg = fg })

-- Popup/float
hi("Pmenu", { bg = "#222222", fg = fg })
hi("PmenuSel", { bg = "#333333", fg = fg })
hi("PmenuSbar", { bg = "#222222" })
hi("PmenuThumb", { bg = dim })

-- Search
hi("Search", { bg = "#333333", fg = fg })
hi("IncSearch", { bg = "#444444", fg = fg })

-- Visual
hi("Visual", { bg = "#333333" })
hi("VisualNOS", { bg = "#333333" })

-- Spelling
hi("SpellBad", { undercurl = true, sp = "#cc6666" })
hi("SpellCap", { undercurl = true, sp = "#6699cc" })
hi("SpellRare", { undercurl = true, sp = "#b294bb" })
hi("SpellLocal", { undercurl = true, sp = "#8abeb7" })

-- Diff
hi("DiffAdd", { bg = "#1d2e1d" })
hi("DiffChange", { bg = "#2e2e1d" })
hi("DiffDelete", { bg = "#2e1d1d" })
hi("DiffText", { bg = "#3e3e1d" })

-- Folding
hi("Folded", { bg = "#222222", fg = dim })
hi("FoldColumn", { bg = bg, fg = dim })

-- Misc UI
hi("Directory", { fg = fg })
hi("Title", { fg = fg, bold = true })
hi("Question", { fg = fg })
hi("MoreMsg", { fg = fg })
hi("WarningMsg", { fg = "#cc6666" })
hi("ErrorMsg", { fg = "#cc6666", bg = bg })
hi("NonText", { fg = dim })
hi("SpecialKey", { fg = dim })
hi("Conceal", { fg = dim })
hi("MatchParen", { bg = "#444444" })
hi("ColorColumn", { bg = "#222222" })
hi("Cursor", { bg = fg, fg = bg })

-- Everything text-like is just fg (no syntax highlighting)
for _, group in ipairs({
  "Comment", "Constant", "String", "Character", "Number", "Boolean", "Float",
  "Identifier", "Function", "Statement", "Conditional", "Repeat", "Label",
  "Operator", "Keyword", "Exception", "PreProc", "Include", "Define", "Macro",
  "PreCondit", "Type", "StorageClass", "Structure", "Typedef", "Special",
  "SpecialChar", "Tag", "Delimiter", "SpecialComment", "Debug", "Underlined",
  "Error", "Todo",
}) do
  hi(group, { fg = fg, bg = "NONE" })
end

-- NvimTree
hi("NvimTreeNormal", { bg = bg, fg = fg })
hi("NvimTreeNormalNC", { bg = bg, fg = fg })
hi("NvimTreeEndOfBuffer", { bg = bg, fg = bg })
hi("NvimTreeWinSeparator", { bg = bg, fg = bg })
hi("NvimTreeFolderIcon", { fg = dim })
hi("NvimTreeFolderName", { fg = fg })
hi("NvimTreeOpenedFolderName", { fg = fg })
hi("NvimTreeRootName", { fg = fg, bold = true })

-- Goyo padding windows
hi("NormalNC", { bg = bg, fg = bg })
hi("WinBar", { bg = bg, fg = bg })
hi("WinBarNC", { bg = bg, fg = bg })