spacegray.lua 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373
  1. local lush = require "lush"
  2. local hsl = lush.hsl
  3. local theme = lush(function()
  4. local c = {
  5. bg = hsl "#212121",
  6. bg1 = hsl "#2a2a2a",
  7. -- bg2 = hsl("#3a3a3a"),
  8. bg2 = hsl "#383d45",
  9. white = hsl "#c8c9d1",
  10. gray = hsl "#858585",
  11. light_gray = hsl "#c8c9c1",
  12. error_red = hsl "#F44747",
  13. warning_orange = hsl "#ff8800",
  14. info_yellow = hsl "#ffcc66",
  15. hint_blue = hsl "#4fc1ff",
  16. red = hsl "#b04b57",
  17. blue = hsl "#5486c0",
  18. gray_blue = hsl "#66899d",
  19. -- yellow = hsl("#ffcb6b"),
  20. yellow = hsl "#eeba5a",
  21. -- orange = hsl("#c98a75"),
  22. orange = hsl "#c6735a",
  23. green = hsl "#87b379",
  24. light_green = hsl "#b2d77c",
  25. -- aqua = hsl("#46b1d0"),
  26. aqua = hsl "#65a7c5",
  27. purple = hsl "#bf83c1",
  28. pale_purple = hsl "#7199ee",
  29. sign_add = hsl "#587C0C",
  30. sign_change = hsl "#0C7D9D",
  31. sign_delete = hsl "#94151B",
  32. test = hsl "#ff00ff",
  33. }
  34. return {
  35. Normal { bg = c.bg, fg = c.white, gui = "NONE" }, -- used for the columns set with 'colorcolumn'
  36. SignColumn { Normal },
  37. ModeMsg { Normal },
  38. MsgArea { Normal },
  39. MsgSeparator { Normal },
  40. SpellBad { bg = "NONE", fg = c.white, gui = "underline", sp = c.red },
  41. SpellCap { bg = "NONE", fg = c.white, gui = "underline", sp = c.yellow },
  42. SpellLocal { bg = "NONE", fg = c.white, gui = "underline", sp = c.green },
  43. SpellRare { bg = "NONE", fg = c.white, gui = "underline", sp = c.blue },
  44. NormalNC { Normal },
  45. Pmenu { bg = c.bg2, fg = c.white, gui = "NONE" },
  46. PmenuSel { bg = c.gray_blue, fg = c.bg1.da(5), gui = "NONE" },
  47. WildMenu { PmenuSel }, -- Non Defaults
  48. CursorLineNr { bg = "NONE", fg = c.light_gray, gui = "bold" },
  49. Comment { bg = "NONE", fg = c.gray, gui = "italic" }, -- any comment
  50. Folded { bg = c.bg1, fg = c.gray, gui = "NONE" },
  51. FoldColumn { Normal, fg = c.gray, gui = "NONE" },
  52. LineNr { bg = "NONE", fg = c.gray, gui = "NONE" },
  53. FloatBorder { bg = c.bg1, fg = c.gray, gui = "NONE" },
  54. Whitespace { bg = "NONE", fg = c.gray.da(35), gui = "NONE" },
  55. VertSplit { bg = "NONE", fg = c.bg2, gui = "NONE" },
  56. CursorLine { bg = c.bg1, fg = "NONE", gui = "NONE" },
  57. CursorColumn { CursorLine },
  58. ColorColumn { CursorLine },
  59. NormalFloat { bg = c.bg2.da(30), fg = "NONE", gui = "NONE" },
  60. Visual { bg = c.bg2.da(25), fg = "NONE", gui = "NONE" },
  61. VisualNOS { Visual },
  62. WarningMsg { bg = "NONE", fg = c.red, gui = "NONE" },
  63. DiffText { bg = "NONE", fg = "NONE", gui = "NONE" },
  64. DiffAdd { bg = c.sign_add, fg = "NONE", gui = "NONE" },
  65. DiffChange { bg = c.sign_change, fg = "NONE", gui = "NONE" },
  66. DiffDelete { bg = c.sign_delete, fg = "NONE", gui = "NONE" },
  67. QuickFixLine { CursorLine },
  68. PmenuSbar { bg = c.bg2.li(15), fg = "NONE", gui = "NONE" },
  69. PmenuThumb { bg = c.white, fg = "NONE", gui = "NONE" },
  70. MatchParen { CursorLine, fg = "NONE", gui = "NONE" },
  71. Cursor { fg = "NONE", bg = "NONE", gui = "reverse" },
  72. lCursor { Cursor },
  73. CursorIM { Cursor },
  74. TermCursor { Cursor },
  75. TermCursorNC { Cursor },
  76. Conceal { bg = "NONE", fg = c.blue, gui = "NONE" },
  77. Directory { bg = "NONE", fg = c.blue, gui = "NONE" },
  78. SpecialKey { bg = "NONE", fg = c.blue, gui = "bold" },
  79. Title { bg = "NONE", fg = c.blue, gui = "bold" },
  80. ErrorMsg { bg = "NONE", fg = c.error_red, gui = "NONE" },
  81. Search { bg = c.gray_blue, fg = c.white },
  82. IncSearch { Search },
  83. Substitute { Search },
  84. MoreMsg { bg = "NONE", fg = c.aqua, gui = "NONE" },
  85. Question { MoreMsg },
  86. EndOfBuffer { bg = "NONE", fg = c.bg, gui = "NONE" },
  87. NonText { EndOfBuffer },
  88. String { fg = c.green },
  89. Character { fg = c.light_green },
  90. Constant { fg = c.orange },
  91. Number { fg = c.red },
  92. Boolean { fg = c.red },
  93. Float { fg = c.red },
  94. Identifier { fg = c.white },
  95. Function { fg = c.yellow },
  96. Operator { fg = c.gray_blue },
  97. Type { fg = c.purple },
  98. StorageClass { Type },
  99. Structure { Type },
  100. Typedef { Type },
  101. Keyword { fg = c.blue },
  102. Statement { Keyword },
  103. Conditional { Keyword },
  104. Repeat { Keyword },
  105. Label { Keyword },
  106. Exception { Keyword },
  107. Include { Keyword },
  108. PreProc { fg = c.aqua },
  109. Define { PreProc },
  110. Macro { PreProc },
  111. PreCondit { PreProc },
  112. Special { fg = c.orange },
  113. SpecialChar { Character },
  114. Tag { fg = c.pale_purple },
  115. Debug { fg = c.red },
  116. Delimiter { fg = c.white.da(25) },
  117. SpecialComment { fg = c.gray },
  118. Underlined { fg = "NONE", gui = "underline" },
  119. Bold { fg = "NONE", gui = "bold" },
  120. Italic { fg = "NONE", gui = "italic" },
  121. -- Todo
  122. -- ("Ignore", below, may be invisible...)
  123. Ignore { fg = c.white },
  124. Todo { bg = "NONE", fg = c.red, gui = "bold" },
  125. Error { fg = c.error_red },
  126. -- Treesitter
  127. TSComment { Comment }, -- comment blocks.
  128. luaTSConstructor { bg = "NONE", fg = c.white.da(25) }, -- override Lua curly braces
  129. TSAnnotation { bg = "NONE", fg = c.aqua }, -- For C++/Dart attributes, annotations that can be attached to the code to denote some kind of meta information.
  130. TSAttribute { bg = "NONE", fg = c.aqua }, -- (unstable) TODO: docs
  131. TSConstructor { Type }, -- For constructor calls and definitions: `{ }` in Lua, and Java constructors.
  132. TSType { Type }, -- types.
  133. TSTypeBuiltin { Type }, -- builtin types.
  134. TSConditional { Conditional }, -- keywords related to conditionnals.
  135. TSException { Exception }, -- exception related keywords.
  136. TSInclude { Include }, -- includes: `#include` in C, `use` or `extern crate` in Rust, or `require` in Lua.
  137. TSKeyword { Keyword }, -- keywords that don't fall in previous categories.
  138. TSKeywordFunction { Keyword }, -- keywords used to define a fuction.
  139. TSLabel { Label }, -- labels: `label:` in C and `:label:` in Lua.
  140. TSNamespace { bg = "NONE", fg = c.blue }, -- For identifiers referring to modules and namespaces.
  141. TSRepeat { Repeat }, -- keywords related to loops.
  142. TSConstant { Constant }, -- constants
  143. TSConstBuiltin { Constant }, -- constant that are built in the language: `nil` in Lua.
  144. TSFloat { Float }, -- floats.
  145. TSNumber { Number }, -- all numbers
  146. TSBoolean { Boolean }, -- booleans.
  147. TSCharacter { Character }, -- characters.
  148. TSError { bg = "NONE", fg = "NONE" }, -- For syntax/parser errors.
  149. TSFunction { Function }, -- function (calls and definitions).
  150. TSFuncBuiltin { Function }, -- builtin functions: `table.insert` in Lua.
  151. TSMethod { Function }, -- method calls and definitions.
  152. TSConstMacro { Macro }, -- constants that are defined by macros: `NULL` in C.
  153. TSFuncMacro { Macro }, -- macro defined fuctions (calls and definitions): each `macro_rules` in Rust.
  154. TSVariableBuiltin { bg = "NONE", fg = c.aqua }, -- Variable names that are defined by the languages, like `this` or `self`.
  155. TSProperty { fg = c.aqua },
  156. TSOperator { Operator }, -- any operator: `+`, but also `->` and `*` in C.
  157. TSVariable { bg = "NONE", fg = c.white }, -- Any variable name that does not have another highlight.
  158. TSField { bg = "NONE", fg = c.white }, -- For fields.
  159. TSParameter { TSField }, -- parameters of a function.
  160. TSParameterReference { TSParameter }, -- references to parameters of a function.
  161. TSSymbol { Identifier }, -- identifiers referring to symbols or atoms.
  162. TSText { fg = c.white }, -- strings considered text in a markup language.
  163. TSPunctDelimiter { Delimiter }, -- delimiters ie: `.`
  164. TSTagDelimiter { Delimiter }, -- Tag delimiter like `<` `>` `/`
  165. TSPunctBracket { Delimiter }, -- brackets and parens.
  166. TSPunctSpecial { Delimiter }, -- special punctutation that does not fall in the catagories before.
  167. TSString { String }, -- strings.
  168. TSStringRegex { TSString }, -- regexes.
  169. TSStringEscape { Character }, -- escape characters within a string.
  170. TSWarning { Todo }, -- Variable names that are defined by the languages, like `this` or `self`.
  171. TSTag { Tag }, -- Tags like html tag names.
  172. TSEmphasis { gui = "italic" }, -- text to be represented with emphasis.
  173. TSUnderline { gui = "underline" }, -- text to be represented with an underline.
  174. TSStrike { gui = "strikethrough" }, -- strikethrough text.
  175. TSTitle { Title }, -- Text that is part of a title.
  176. TSLiteral { String }, -- Literal text.
  177. TSURI { fg = c.aqua }, -- Any URI like a link or email.
  178. -- TSNone { }, -- TODO: docs
  179. -- These groups are for the native LSP client. Some other LSP clients may
  180. -- use these groups, or use their own. Consult your LSP client's
  181. -- documentation.
  182. LspDiagnosticsDefaultError { bg = "NONE", fg = c.error_red, gui = "NONE" },
  183. LspDiagnosticsDefaultWarning { bg = "NONE", fg = c.warning_orange, gui = "NONE" },
  184. LspDiagnosticsDefaultInformation { bg = "NONE", fg = c.info_yellow, gui = "NONE" },
  185. LspDiagnosticsDefaultHint { bg = "NONE", fg = c.hint_blue, gui = "NONE" },
  186. LspDiagnosticsVirtualTextError { LspDiagnosticsDefaultError },
  187. LspDiagnosticsVirtualTextWarning { LspDiagnosticsDefaultWarning },
  188. LspDiagnosticsVirtualTextInformation { LspDiagnosticsDefaultInformation },
  189. LspDiagnosticsVirtualTextHint { LspDiagnosticsDefaultHint },
  190. LspDiagnosticsFloatingError { fg = c.error_red, gui = "NONE" },
  191. LspDiagnosticsFloatingWarning { fg = c.warning_orange, gui = "NONE" },
  192. LspDiagnosticsFloatingInformation { fg = c.info_yellow, gui = "NONE" },
  193. LspDiagnosticsFloatingHint { fg = c.hint_blue, gui = "NONE" },
  194. LspDiagnosticsSignError { fg = c.error_red, gui = "NONE" },
  195. LspDiagnosticsSignWarning { fg = c.warning_orange, gui = "NONE" },
  196. LspDiagnosticsSignInformation { fg = c.info_yellow, gui = "NONE" },
  197. LspDiagnosticsSignHint { fg = c.hint_blue, gui = "NONE" }, -- Tree-Sitter
  198. LspDiagnosticsError { LspDiagnosticsSignError },
  199. LspDiagnosticsWarning { LspDiagnosticsSignWarning },
  200. LspDiagnosticsInformation { LspDiagnosticsSignInformation },
  201. LspDiagnosticsHint { LspDiagnosticsSignHint },
  202. -- LspReferenceText {bg = c.bg1, fg = "NONE", gui = "underline"},
  203. -- LspReferenceRead {bg = c.bg1, fg = "NONE", gui = "underline"},
  204. -- LspReferenceWrite {bg = c.bg1, fg = "NONE", gui = "underline"},
  205. LspDiagnosticsUnderlineError { fg = "NONE", gui = "underline", sp = c.red },
  206. LspDiagnosticsUnderlineWarning { fg = "NONE", gui = "underline", sp = c.yellow },
  207. LspDiagnosticsUnderlineInformation { fg = "NONE", gui = "underline", sp = c.blue },
  208. LspDiagnosticsUnderlineHint { fg = "NONE", gui = "underline", sp = c.green },
  209. -- gitsigns.nvim
  210. SignAdd { fg = c.sign_add },
  211. SignChange { fg = c.sign_change },
  212. SignDelete { fg = c.sign_delete }, -- Any URI like a link or email.
  213. GitSignsAdd { fg = c.sign_add },
  214. GitSignsChange { fg = c.sign_change },
  215. GitSignsDelete { fg = c.sign_delete },
  216. -- telescope.nvim
  217. TelescopeSelection { bg = "NONE", fg = c.aqua },
  218. TelescopeMatching { bg = "NONE", fg = c.red, gui = "bold" },
  219. TelescopeBorder { bg = c.bg1, fg = c.gray }, -- nvim-tree.lua
  220. -- Nvimtree
  221. NvimTreeFolderIcon { fg = c.blue },
  222. NvimTreeIndentMarker { fg = c.gray },
  223. NvimTreeNormal { fg = c.white.da(10), bg = c.bg1 },
  224. NvimTreeFolderName { fg = c.blue },
  225. NvimTreeOpenedFolderName { fg = c.aqua.da(10), gui = "italic" },
  226. NvimTreeOpenedFile { NvimTreeOpenedFolderName },
  227. NvimTreeRootFolder { fg = c.blue.da(20) },
  228. NvimTreeExecFile { fg = c.green },
  229. NvimTreeImageFile { fg = c.purple },
  230. NvimTreeSpecialFile { fg = c.aqua },
  231. NvimTreeGitStaged { fg = c.sign_add },
  232. NvimTreeGitNew { fg = c.sign_add },
  233. NvimTreeGitDirty { fg = c.sign_add },
  234. NvimTreeGitRenamed { fg = c.sign_change },
  235. NvimTreeGitMerge { fg = c.sign_change },
  236. NvimTreeGitDelete { fg = c.sign_delete },
  237. NvimTreeVertSplit { fg = c.bg1, bg = c.bg1 },
  238. -- BarBar
  239. TabLine { bg = c.bg1, fg = c.white, gui = "NONE" },
  240. TabLineFill { bg = c.bg1, fg = c.white, gui = "NONE" },
  241. TabLineSel { bg = c.blue, fg = c.bg1, gui = "NONE" },
  242. BufferCurrent { fg = c.fg, bg = c.bg },
  243. BufferCurrentIndex { fg = c.aqua, bg = c.bg },
  244. BufferCurrentMod { fg = c.info_yellow, bg = c.bg },
  245. BufferCurrentSign { fg = c.aqua, bg = c.bg },
  246. BufferCurrentTarget { fg = c.red, bg = c.bg, gui = "bold" },
  247. BufferVisible { fg = c.fg, bg = c.bg },
  248. BufferVisibleIndex { fg = c.fg, bg = c.bg },
  249. BufferVisibleMod { fg = c.info_yellow, bg = c.bg },
  250. BufferVisibleSign { fg = c.info_yellow, bg = c.bg },
  251. BufferVisibleTarget { fg = c.red, bg = c.bg, gui = "bold" },
  252. BufferInactive { fg = c.gray, bg = c.bg1 },
  253. BufferInactiveIndex { fg = c.gray, bg = c.bg1 },
  254. BufferInactiveMod { fg = c.info_yellow, bg = c.bg1 },
  255. BufferInactiveSign { fg = c.gray, bg = c.bg1 },
  256. BufferInactiveTarget { fg = c.red, bg = c.bg1 },
  257. -- some fix for html related stuff
  258. htmlH1 { Title }, -- markdown stuff
  259. mkdLink { fg = c.aqua, gui = "underline" },
  260. mkdLineBreak { bg = "NONE", fg = "NONE", gui = "NONE" },
  261. mkdHeading { fg = c.white },
  262. mkdInlineURL { mkdLink },
  263. mkdUnderline { fg = c.gray },
  264. markdownUrl { mkdLink },
  265. markdownCode { fg = c.orange, bg = "NONE" },
  266. markdownLinkTextDelimiter { Delimiter },
  267. markdownLinkDelimiter { Delimiter },
  268. markdownIdDelimiter { Delimiter },
  269. markdownLinkText { fg = c.aqua },
  270. markdownItalic { fg = "NONE", gui = "italic" }, -- flutter-tools.nvim
  271. FlutterWidgetGuides { fg = c.gray.li(10) }, -- statusline
  272. StatusLine { bg = c.bg1, fg = c.white }, -- status line of current window
  273. StatusLineNC { bg = c.bg1, fg = c.light_gray }, -- status lines of not-current windows Note: if this is equal to "StatusLine" Vim will use "^^^" in the status line of the current window.
  274. StatusLineSeparator { bg = c.bg1, fg = "NONE" },
  275. StatusLineGit { bg = c.bg1, fg = c.orange },
  276. StatusLineGitAdd { bg = c.bg1, fg = c.green },
  277. StatusLineGitChange { bg = c.bg1, fg = c.blue },
  278. StatusLineGitDelete { bg = c.bg1, fg = c.red },
  279. StatusLineLspDiagnosticsError { bg = c.bg1, fg = c.error_red, gui = "NONE" },
  280. StatusLineLspDiagnosticsWarning { bg = c.bg1, fg = c.warning_orange, gui = "NONE" },
  281. StatusLineLspDiagnosticsInformation { bg = c.bg1, fg = c.info_yellow, gui = "NONE" },
  282. StatusLineLspDiagnosticsHint { bg = c.bg1, fg = c.hint_blue, gui = "NONE" },
  283. StatusLineTreeSitter { bg = c.bg1, fg = c.green },
  284. -- StatusLineMode {bg = c.gray, fg = c.bg, gui = "bold"},
  285. -- StatusLineDeco {bg = c.bg2, fg = c.yellow},
  286. -- StatusLineLCol {bg = c.bg2, fg = c.white},
  287. -- StatusLineLColAlt {bg = c.bg1, fg = c.white},
  288. -- StatusLineFT {bg = c.bg2, fg = c.white},
  289. -- StatusLineFTAlt {bg = c.bg2, fg = c.white},
  290. -- StatusLineGitAlt {bg = c.gray, fg = c.bg},
  291. -- StatusLineLSP {bg = c.bg1, fg = c.gray.li(25)},
  292. -- StatusLineFileName {bg = c.bg1, fg = c.white, gui = "bold"},
  293. -- lsp-trouble.nvim
  294. LspTroubleIndent { fg = c.gray.li(10) }, -- tabline stuff
  295. -- tabline diagnostic
  296. TabLineError { LspDiagnosticsSignError },
  297. TabLineWarning { LspDiagnosticsSignWarning },
  298. TabLineHint { LspDiagnosticsSignHint },
  299. TabLineInformation { LspDiagnosticsSignInformation }, -- which-key.nvim
  300. WhichKey { fg = c.purple }, -- nvim-compe
  301. WhichKeySeperator { fg = c.green }, -- nvim-compe
  302. WhichKeyGroup { fg = c.blue }, -- nvim-compe
  303. WhichKeyDesc { fg = c.aqua }, -- nvim-compe
  304. WhichKeyFloat { bg = c.bg1 }, -- nvim-compe
  305. CompeDocumentation { Pmenu, fg = "NONE" }, -- diffview
  306. DiffviewNormal { NvimTreeNormal },
  307. DiffviewStatusAdded { SignAdd },
  308. DiffviewStatusModified { SignChange },
  309. DiffviewStatusRenamed { SignChange },
  310. DiffviewStatusDeleted { SignDelete },
  311. DiffviewFilePanelInsertion { SignAdd },
  312. DiffviewFilePanelDeletion { SignDelete },
  313. DiffviewVertSplit { fg = c.gray, bg = c.bg },
  314. DashboardHeader { fg = c.blue },
  315. DashboardCenter { fg = c.purple },
  316. DashboardFooter { fg = c.aqua },
  317. IndentBlanklineContextChar { fg = c.gray.da(20) },
  318. CodiVirtualText { fg = c.hint_blue },
  319. }
  320. end)
  321. -- return our parsed theme for extension or use else where.
  322. return theme
  323. -- vi:nowrap