spacegray.lua 16 KB

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