all repos — dotfiles @ 4d8fdd2028e8bbbdd9322d061882d63edfea36fa

my *nix dotfiles

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