all repos — dotfiles @ 5674e47702a2c2b46d9df9ed4e363a61522b4cd3

my *nix dotfiles

nvim/colors/plain.lua (view raw)

  1local o = vim.o
  2local g = vim.g
  3local api = vim.api
  4
  5vim.cmd('hi clear')
  6
  7if g.syntax_on == 1 then
  8  vim.cmd('syntax reset')
  9end
 10
 11g.colors_name = 'plain'
 12
 13local background = '#f4f4f4'
 14local grey_bg_light = '#E5E5E5'
 15local black = '#676767'
 16local blue = '#6587bf'
 17local green = '#7c9f4b'
 18local light_green = '#6d8b42'
 19local light_red = '#c66666'
 20local red = '#db7070'
 21local grey = '#767676'
 22local light_grey = '#dfdfdf'
 23local border = '#999999'
 24local highlight = '#424242'
 25local dark_yellow = '#d69822'
 26local yellow = '#f3e430'
 27local light_yellow = '#fadaa0'
 28local orange = '#D75F5F'
 29local purple = '#8e69d5'
 30local white = '#FFFFFF'
 31local cyan = '#509c93'
 32
 33g.terminal_color_0 = black
 34g.terminal_color_1 = red
 35g.terminal_color_2 = green
 36g.terminal_color_3 = dark_yellow
 37g.terminal_color_4 = blue
 38g.terminal_color_5 = purple
 39g.terminal_color_6 = cyan
 40g.terminal_color_7 = grey
 41
 42g.terminal_color_8 = black
 43g.terminal_color_9 = red
 44g.terminal_color_10 = green
 45g.terminal_color_11 = dark_yellow
 46g.terminal_color_12 = blue
 47g.terminal_color_13 = purple
 48g.terminal_color_14 = cyan
 49g.terminal_color_15 = grey
 50
 51local highlights = {
 52  -- This highlight group can be used when one wants to disable a highlight
 53  -- group using `winhl`
 54  Disabled = {},
 55  -- These highlight groups can be used for statuslines, for example when
 56  -- displaying ALE warnings and errors.
 57  BlackOnLightYellow = { fg = black, bg = light_yellow },
 58  LightRedBackground = { bg = light_red },
 59  WhiteOnBlue = { fg = white, bg = blue },
 60  WhiteOnOrange = { fg = white, bg = orange },
 61  WhiteOnRed = { fg = white, bg = red },
 62  WhiteOnYellow = { fg = white, bg = dark_yellow },
 63  Yellow = { fg = dark_yellow, bold = true },
 64  Bold = { fg = black, bold = true },
 65  Boolean = { link = 'Keyword' },
 66  Character = { link = 'String' },
 67  ColorColumn = { bg = highlight },
 68  Comment = { fg = grey, italic = true },
 69  Conceal = {},
 70  Constant = { fg = black },
 71  Cursor = { bg = black },
 72  -- This is to work around https://github.com/neovim/neovim/issues/9800.
 73  CursorLine = { ctermfg = 'black' },
 74  CursorLineNr = { fg = black, bold = true },
 75  Directory = { fg = purple },
 76  EndOfBuffer = { fg = background, bg = background },
 77  Error = { link = 'ErrorMsg' },
 78  ErrorMsg = { fg = red, bold = true },
 79  FoldColumn = { fg = light_grey, bg = background },
 80  Folded = { link = 'Comment' },
 81  Identifier = { fg = black },
 82  Function = { fg = black },
 83  IncSearch = { link = 'Search' },
 84  CurSearch = { link = 'Search' },
 85  Include = { fg = black, bold = true },
 86  InstanceVariable = { fg = purple },
 87  Keyword = { fg = black, bold = true },
 88  Label = { link = 'Keyword' },
 89  LineNr = { fg = grey },
 90  Macro = { fg = orange },
 91  MatchParen = { bold = true },
 92  MoreMsg = { fg = black },
 93  ModeMsg = { fg = black, bold = true },
 94  MsgSeparator = { fg = border },
 95  NonText = { fg = light_grey },
 96  Normal = { fg = black , bg = background },
 97  NormalFloat = { fg = black },
 98  FloatTitle = { fg = black, bold = true },
 99  FloatBorder = { fg = border },
100  Number = { fg = blue },
101  Operator = { fg = black },
102  Pmenu = { fg = black, bg = grey_bg_light },
103  PmenuSbar = { bg = grey_bg_light },
104  PmenuSel = { bg = light_grey, bold = true },
105  PmenuThumb = { bg = light_grey },
106  PreCondit = { link = 'Macro' },
107  PreProc = { fg = black },
108  Question = { fg = black },
109  QuickFixLine = { bg = highlight, bold = true },
110  Regexp = { fg = orange },
111  Search = { bg = light_yellow },
112  SignColumn = { link = 'FoldColumn' },
113  Special = { fg = black },
114  SpecialKey = { link = 'Number' },
115  SpellBad = { sp = red, underline = true },
116  SpellCap = { sp = dark_yellow, underline = true },
117  SpellLocal = { sp = blue, underline = true },
118  SpellRare = { sp = purple, underline = true },
119  Statement = { link = 'Keyword' },
120  StatusLine = { fg = black, bg = background },
121  StatusLineNC = { fg = black, bg = grey_bg_light },
122  StatusLineTab = { fg = black, bg = background, bold = true },
123  WinBar = { fg = black, bold = true },
124  WinBarNc = { fg = black, bold = true },
125  WinBarFill = { fg = border },
126  StorageClass = { link = 'Keyword' },
127  String = { fg = cyan },
128  SnippetTabstop = {},
129  Symbol = { fg = orange },
130  TabLine = { fg = black, bg = light_grey },
131  TabLineFill = { fg = black, bg = light_grey },
132  TabLineSel = { fg = black, bg = background, bold = true },
133  Title = { fg = black, bold = true },
134  Todo = { fg = grey, bold = true },
135  Type = { link = 'Constant' },
136  Underlined = { underline = true },
137  VertSplit = { fg = border },
138  WinSeparator = { fg = border },
139  Visual = { bg = light_grey },
140  WarningMsg = { fg = dark_yellow, bold = true },
141  Whitespace = { fg = light_grey },
142  WildMenu = { link = 'PmenuSel' },
143  -- ALE
144  ALEError = { fg = red, bold = true },
145  ALEErrorSign = { fg = red, bold = true },
146  ALEWarning = { fg = dark_yellow, bold = true },
147  ALEWarningSign = { fg = dark_yellow, bold = true },
148  -- ccc.nvim
149  CccFloatNormal = { link = 'NormalFloat' },
150  CccFloatBorder = { link = 'FloatBorder' },
151  -- CSS
152  cssClassName = { link = 'Keyword' },
153  cssColor = { link = 'Number' },
154  cssIdentifier = { link = 'Keyword' },
155  cssImportant = { link = 'Keyword' },
156  cssProp = { link = 'Identifier' },
157  cssTagName = { link = 'Keyword' },
158  -- Diffs
159  DiffAdd = { fg = green, bg = background },
160  DiffChange = { bg = highlight },
161  DiffDelete = { fg = red },
162  DiffText = { bg = light_yellow },
163  diffAdded = { link = 'DiffAdd' },
164  diffChanged = { link = 'DiffChange' },
165  diffFile = { fg = black, bold = true },
166  diffLine = { fg = blue },
167  diffRemoved = { link = 'DiffDelete' },
168  -- Dot/Graphviz
169  dotKeyChar = { link = 'Operator' },
170  -- diffview.nvim
171  DiffviewCursorLine = { bg = highlight },
172  DiffviewDiffAddAsDelete = { bg = light_red },
173  DiffviewDiffDelete = { fg = light_grey },
174  DiffviewDiffDeleteDim = { fg = light_grey },
175  DiffviewFilePanelFileName = { fg = black },
176  DiffviewFilePanelPath = { fg = purple },
177  DiffviewFilePanelRootPath = { fg = purple },
178  DiffviewFilePanelTitle = { fg = black, bold = true },
179  DiffviewFilePanelInsertions = { fg = green },
180  DiffviewFilePanelDeletions = { fg = red },
181  DiffviewStatusModified = { fg = dark_yellow, bold = true },
182  DiffviewStatusAdded = { fg = green, bold = true },
183  DiffviewStatusCopied = { fg = green, bold = true },
184  DiffviewStatusDeleted = { fg = red, bold = true },
185  -- Flash
186  FlashBackdrop = { link = 'None' },
187  FlashLabel = { fg = red, bold = true },
188  -- Fugitive
189  FugitiveblameHash = { fg = purple },
190  FugitiveblameTime = { fg = blue },
191  gitCommitOverflow = { link = 'ErrorMsg' },
192  gitCommitSummary = { link = 'String' },
193  -- gitcommit
194  ['@string.special.url.gitcommit'] = { fg = black },
195  ['@markup.link.gitcommit'] = { fg = green, bold = true },
196  ['@comment.warning.gitcommit'] = { fg = red, bold = true },
197  -- Gitsigns
198  GitSignsAdd = { fg = green },
199  GitSignsDelete = { fg = red },
200  GitSignsChange = { fg = grey },
201  -- HAML
202  hamlClass = { fg = black },
203  hamlDocType = { link = 'Comment' },
204  hamlId = { fg = black },
205  hamlTag = { fg = black, bold = true },
206  -- hop.nvim
207  HopNextKey = { fg = red, bold = true },
208  HopNextKey1 = { fg = dark_yellow },
209  HopNextKey2 = { fg = dark_yellow },
210  HopUnmatched = {},
211  -- HTML
212  htmlArg = { link = 'Identifier' },
213  htmlLink = { link = 'Directory' },
214  htmlScriptTag = { link = 'htmlTag' },
215  htmlSpecialTagName = { link = 'htmlTag' },
216  htmlTag = { fg = black, bold = true },
217  htmlTagName = { link = 'htmlTag' },
218  htmlItalic = { italic = true },
219  htmlBold = { bold = true },
220  -- Inko
221  inkoCommentBold = { fg = grey, bold = true },
222  inkoCommentInlineUrl = { link = 'Number' },
223  inkoCommentItalic = { fg = grey, italic = true },
224  inkoCommentTitle = { fg = grey, bold = true },
225  inkoInstanceVariable = { link = 'InstanceVariable' },
226  inkoKeywordArgument = { link = 'Regexp' },
227  ['@variable.member.inko'] = { link = 'InstanceVariable' },
228  ['@constant.builtin.inko'] = { link = 'Keyword' },
229  -- Java
230  javaAnnotation = { link = 'Directory' },
231  javaCommentTitle = { link = 'javaComment' },
232  javaDocParam = { link = 'Todo' },
233  javaDocTags = { link = 'Todo' },
234  javaExternal = { link = 'Keyword' },
235  javaStorageClass = { link = 'Keyword' },
236  -- Javascript
237  JavaScriptNumber = { link = 'Number' },
238  javaScriptBraces = { link = 'Operator' },
239  javaScriptFunction = { link = 'Keyword' },
240  javaScriptIdentifier = { link = 'Keyword' },
241  javaScriptMember = { link = 'Identifier' },
242  -- JSON
243  jsonKeyword = { link = 'String' },
244  -- Lua
245  luaFunction = { link = 'Keyword' },
246  -- LSP
247  DiagnosticUnderlineError = { underline = true, sp = red },
248  DiagnosticUnderlineWarn = { underline = true, sp = dark_yellow },
249  LspDiagnosticsUnderlineError = { link = 'DiagnosticUnderlineError' },
250  LspDiagnosticsUnderlineWarning = { link = 'DiagnosticUnderlineWarn' },
251  DiagnosticFloatingError = { fg = red, bold = true },
252  DiagnosticFloatingHint = { fg = black, bold = true },
253  DiagnosticFloatingInfo = { fg = blue, bold = true },
254  DiagnosticFloatingWarn = { fg = dark_yellow, bold = true },
255  DiagnosticError = { fg = red },
256  DiagnosticHint = { fg = grey },
257  DiagnosticInfo = { fg = blue },
258  DiagnosticWarn = { fg = dark_yellow },
259  -- Make
260  makeTarget = { link = 'Function' },
261  -- Markdown
262  markdownCode = { link = 'markdownCodeBlock' },
263  markdownCodeBlock = { link = 'Comment' },
264  markdownListMarker = { link = 'Keyword' },
265  markdownOrderedListMarker = { link = 'Keyword' },
266  markdownUrl = { fg = blue },
267  -- mini.pick
268  MiniPickBorder = { fg = border },
269  MiniPickBorderBusy = { link = 'MiniPickBorder' },
270  MiniPickBorderText = { fg = black },
271  MiniPickHeader = { fg = black, bold = true },
272  MiniPickMatchCurrent = { bg = light_grey, bold = true },
273  MiniPickMatchRanges = { fg = dark_yellow, bold = true },
274  MiniPickNormal = { fg = black },
275  MiniPickPrompt = { fg = black, bold = true },
276  -- netrw
277  netrwClassify = { link = 'Identifier' },
278  -- Neogit
279  NeogitBranch = { fg = green, bold = true },
280  NeogitBranchHead = { link = 'NeogitBranch' },
281  NeogitCommitViewHeader = { fg = dark_yellow, bold = true },
282  NeogitCursorLine = { bg = highlight },
283  NeogitDiffAdd = { link = 'DiffAdd' },
284  NeogitDiffAddHighlight = { link = 'NeogitDiffAdd' },
285  NeogitDiffContext = { link = 'Normal' },
286  NeogitDiffContextHighlight = { link = 'Normal' },
287  NeogitDiffDelete = { link = 'DiffDelete' },
288  NeogitDiffDeleteHighlight = { link = 'NeogitDiffDelete' },
289  NeogitDiffHeader = { fg = black, bold = true },
290  NeogitDiffHeaderHighlight = { link = 'NeogitDiffHeader' },
291  NeogitFilePath = { fg = purple },
292  NeogitGraphBlue = { fg = blue },
293  NeogitGraphBoldBlue = { fg = blue, bold = true },
294  NeogitGraphBoldCyan = { fg = cyan, bold = true },
295  NeogitGraphBoldGray = { fg = grey, bold = true },
296  NeogitGraphBoldGreen = { fg = green, bold = true },
297  NeogitGraphBoldOrange = { fg = orange, bold = true },
298  NeogitGraphBoldPurple = { fg = purple, bold = true },
299  NeogitGraphBoldRed = { fg = red, bold = true },
300  NeogitGraphBoldWhite = { fg = black, bold = true },
301  NeogitGraphBoldYellow = { fg = dark_yellow, bold = true },
302  NeogitGraphCyan = { fg = cyan },
303  NeogitGraphGray = { fg = grey },
304  NeogitGraphGreen = { fg = green },
305  NeogitGraphOrange = { fg = orange },
306  NeogitGraphPurple = { fg = purple },
307  NeogitGraphRed = { fg = red },
308  NeogitGraphWhite = { fg = black },
309  NeogitGraphYellow = { fg = dark_yellow },
310  NeogitHunkHeader = { fg = blue },
311  NeogitHunkHeaderHighlight = { link = 'NeogitHunkHeader' },
312  NeogitPopupActionKey = { link = 'NeogitPopupOptionKey' },
313  NeogitPopupBranchName = { link = 'NeogitBranch' },
314  NeogitPopupConfigEnabled = { link = 'NeogitPopupOptionEnabled' },
315  NeogitPopupConfigKey = { link = 'NeogitPopupOptionKey' },
316  NeogitPopupOptionEnabled = { bg = light_green, bold = true },
317  NeogitPopupOptionKey = { bold = true },
318  NeogitPopupSectionTitle = { link = 'Title' },
319  NeogitPopupSwitchEnabled = { link = 'NeogitPopupOptionEnabled' },
320  NeogitPopupSwitchKey = { link = 'NeogitPopupOptionKey' },
321  NeogitRemote = { link = 'NeogitBranch' },
322  -- Perl
323  perlPackageDecl = { link = 'Identifier' },
324  perlStatementInclude = { link = 'Statement' },
325  perlStatementPackage = { link = 'Statement' },
326  podCmdText = { link = 'Todo' },
327  podCommand = { link = 'Comment' },
328  podVerbatimLine = { link = 'Todo' },
329  -- Ruby
330  rubyAttribute = { link = 'Identifier' },
331  rubyClass = { link = 'Keyword' },
332  rubyClassVariable = { link = 'rubyInstancevariable' },
333  rubyConstant = { link = 'Constant' },
334  rubyDefine = { link = 'Keyword' },
335  rubyFunction = { link = 'Function' },
336  rubyInstanceVariable = { link = 'InstanceVariable' },
337  rubyMacro = { link = 'Identifier' },
338  rubyModule = { link = 'rubyClass' },
339  rubyRegexp = { link = 'Regexp' },
340  rubyRegexpCharClass = { link = 'Regexp' },
341  rubyRegexpDelimiter = { link = 'Regexp' },
342  rubyRegexpQuantifier = { link = 'Regexp' },
343  rubyRegexpSpecial = { link = 'Regexp' },
344  rubyStringDelimiter = { link = 'String' },
345  rubySymbol = { link = 'Symbol' },
346  -- Rust
347  rustCommentBlockDoc = { link = 'Comment' },
348  rustCommentLineDoc = { link = 'Comment' },
349  rustFuncCall = { link = 'Identifier' },
350  rustModPath = { link = 'Identifier' },
351  ['@function.macro.rust'] = { link = 'Macro' },
352  ['@attribute.rust'] = { link = 'Identifier' },
353  -- pounce.nvim
354  PounceAccept = { fg = black, bg = yellow, bold = true },
355  PounceAcceptBest = { link = 'PounceAccept' },
356  PounceMatch = { bg = light_yellow },
357  PounceUnmatched = {},
358  PounceGap = { link = 'None' },
359  -- Python
360  pythonOperator = { link = 'Keyword' },
361  -- SASS
362  sassClass = { link = 'cssClassName' },
363  sassId = { link = 'cssIdentifier' },
364  -- Shell
365  shFunctionKey = { link = 'Keyword' },
366  -- Snippy
367  SnippyPlaceholder = { link = 'SnippetTabstop' },
368  -- SQL
369  sqlKeyword = { link = 'Keyword' },
370  -- Typescript
371  typescriptBraces = { link = 'Operator' },
372  typescriptEndColons = { link = 'Operator' },
373  typescriptExceptions = { link = 'Keyword' },
374  typescriptFuncKeyword = { link = 'Keyword' },
375  typescriptFunction = { link = 'Function' },
376  typescriptIdentifier = { link = 'Identifier' },
377  typescriptLogicSymbols = { link = 'Operator' },
378  -- Telescope
379  TelescopeBorder = { fg = border },
380  TelescopeMatching = { fg = dark_yellow, bold = true },
381  TelescopePromptNormal = { fg = black },
382  TelescopePromptBorder = { fg = border },
383  TelescopePromptPrefix = { fg = black, bold = true },
384  TelescopeSelection = { bg = light_grey, bold = true },
385  TelescopeTitle = { fg = black, bold = true },
386  TelescopeNormal = { fg = black },
387  -- Treesitter
388  TSEmphasis = { italic = true },
389  TSField = {},
390  TSStringEscape = { fg = green, bold = true },
391  TSStrong = { bold = true },
392  TSURI = { fg = blue, underline = true },
393  TSUnderline = { underline = true },
394  TSConstMacro = { link = 'Macro' },
395  TSDanger = { link = 'Todo' },
396  TSKeywordOperator = { link = 'Keyword' },
397  TSNamespace = { link = 'Constant' },
398  TSNote = { link = 'Todo' },
399  TSProperty = { link = 'TSField' },
400  TSStringRegex = { link = 'Regexp' },
401  TSSymbol = { link = 'Symbol' },
402  TSTypeBuiltin = { link = 'Keyword' },
403  TSWarning = { link = 'Todo' },
404  ['@markup.link'] = { fg = blue },
405  ['@property.json'] = { bold = true },
406  ['@text.emphasis'] = { italic = true },
407  ['@text.reference'] = { fg = purple },
408  ['@text.strong'] = { bold = true },
409  ['@text.uri'] = { fg = blue },
410  ['@variable.builtin'] = { bold = true },
411
412  -- Custom Tree-sitter captures added by this theme.
413  ['@variable.parameter.reference'] = { fg = orange },
414
415  -- Ruby uses "TSLabel" for instance variables, for some reason. See
416  -- https://github.com/tree-sitter/tree-sitter-ruby/issues/184 for more
417  -- details.
418  rubyTSLabel = { link = 'InstanceVariable' },
419  -- TOML
420  --
421  -- tomlTSTypeBuiltin is used for section titles (e.g. `[dependencies]`), while
422  -- tomlTSProperty is used for key-value pairs. These rules ensure the syntax
423  -- is consistent with https://github.com/cespare/vim-toml.
424  tomlTSProperty = { fg = black },
425  tomlTSTypeBuiltin = { fg = black, bold = true },
426  -- Vimscript
427  VimCommentTitle = { link = 'Todo' },
428  VimIsCommand = { link = 'Constant' },
429  vimGroup = { link = 'Constant' },
430  vimHiGroup = { link = 'Constant' },
431  -- XML
432  xmlAttrib = { link = 'Identifier' },
433  xmlTag = { link = 'Identifier' },
434  xmlTagName = { link = 'Identifier' },
435  -- YAML
436  yamlPlainScalar = { link = 'String' },
437  -- YARD
438  yardComment = { link = 'Comment' },
439  yardType = { link = 'Todo' },
440  yardTypeList = { link = 'Todo' },
441
442  -- custom highlight groups
443  ['@variable'] = { fg = black },
444
445  -- statusline
446  LinePrimaryBlock = { fg = black, bg = background },
447  LineSecondaryBlock = { fg = blue, bg = background },
448  LineError = { link = 'DiagnosticError' },
449  LineHint = { link = 'DiagnosticHint' },
450  LineInfo = { link = 'DiagnosticInfo' },
451  LineWarning = { link = 'DiagnosticWarn' },
452}
453
454for group, opts in pairs(highlights) do
455  api.nvim_set_hl(0, group, opts)
456end