From 0f458a04688d71d194fc104351f8cda5aff936af Mon Sep 17 00:00:00 2001 From: Christian Chiarulli Date: Mon, 30 Aug 2021 00:59:23 -0400 Subject: onedarker colorscheme --- lua/config/defaults.lua | 2 +- lua/lualine/themes/onedarker.lua | 35 +++++++++++++ lua/onedarker/Git.lua | 10 ++++ lua/onedarker/LSP.lua | 104 +++++++++++++++++++++++++++++++++++++++ lua/onedarker/Treesitter.lua | 66 +++++++++++++++++++++++++ lua/onedarker/Whichkey.lua | 9 ++++ lua/onedarker/config.lua | 23 +++++++++ lua/onedarker/highlights.lua | 99 +++++++++++++++++++++++++++++++++++++ lua/onedarker/init.lua | 30 +++++++++++ lua/onedarker/markdown.lua | 27 ++++++++++ lua/onedarker/palette.lua | 39 +++++++++++++++ lua/onedarker/util.lua | 25 ++++++++++ lua/spacegray/Git.lua | 10 ---- lua/spacegray/LSP.lua | 99 ------------------------------------- lua/spacegray/Treesitter.lua | 56 --------------------- lua/spacegray/Whichkey.lua | 9 ---- lua/spacegray/config.lua | 23 --------- lua/spacegray/highlights.lua | 99 ------------------------------------- lua/spacegray/init.lua | 43 ---------------- lua/spacegray/markdown.lua | 27 ---------- lua/spacegray/palette.lua | 40 --------------- lua/spacegray/util.lua | 25 ---------- 22 files changed, 468 insertions(+), 432 deletions(-) create mode 100644 lua/lualine/themes/onedarker.lua create mode 100644 lua/onedarker/Git.lua create mode 100644 lua/onedarker/LSP.lua create mode 100644 lua/onedarker/Treesitter.lua create mode 100644 lua/onedarker/Whichkey.lua create mode 100644 lua/onedarker/config.lua create mode 100644 lua/onedarker/highlights.lua create mode 100644 lua/onedarker/init.lua create mode 100644 lua/onedarker/markdown.lua create mode 100644 lua/onedarker/palette.lua create mode 100644 lua/onedarker/util.lua delete mode 100644 lua/spacegray/Git.lua delete mode 100644 lua/spacegray/LSP.lua delete mode 100644 lua/spacegray/Treesitter.lua delete mode 100644 lua/spacegray/Whichkey.lua delete mode 100644 lua/spacegray/config.lua delete mode 100644 lua/spacegray/highlights.lua delete mode 100644 lua/spacegray/init.lua delete mode 100644 lua/spacegray/markdown.lua delete mode 100644 lua/spacegray/palette.lua delete mode 100644 lua/spacegray/util.lua (limited to 'lua') diff --git a/lua/config/defaults.lua b/lua/config/defaults.lua index 9bd1bdd8..4f538dbb 100644 --- a/lua/config/defaults.lua +++ b/lua/config/defaults.lua @@ -8,7 +8,7 @@ vim.cmd [[ set spellfile=~/.config/lvim/spell/en.utf-8.add ]] lvim = { leader = "space", - colorscheme = "spacegray", + colorscheme = "onedarker", line_wrap_cursor_movement = true, transparent_window = false, format_on_save = true, diff --git a/lua/lualine/themes/onedarker.lua b/lua/lualine/themes/onedarker.lua new file mode 100644 index 00000000..396657bb --- /dev/null +++ b/lua/lualine/themes/onedarker.lua @@ -0,0 +1,35 @@ +-- Copyright (c) 2020-2021 shadmansaleh +-- MIT license, see LICENSE for more details. +-- Credit: Zoltan Dalmadi(lightline) +-- LuaFormatter off +local colors = { + blue = "#61afef", + green = "#98c379", + purple = "#c678dd", + red1 = "#e06c75", + red2 = "#be5046", + yellow = "#e5c07b", + orange = "#D19A66", + fg = "#abb2bf", + bg = "#282c34", + gray1 = "#5c6370", + gray2 = "#2c323d", + gray3 = "#3e4452", +} +-- LuaFormatter on +return { + normal = { + a = { fg = colors.fg, bg = colors.blue, gui = "bold" }, + b = { fg = colors.fg, bg = colors.bg }, + c = { fg = colors.fg, bg = colors.bg }, + }, + insert = { a = { fg = colors.fg, bg = colors.green, gui = "bold" } }, + visual = { a = { fg = colors.fg, bg = colors.purple, gui = "bold" } }, + command = { a = { fg = colors.fg, bg = colors.yellow, gui = "bold" } }, + replace = { a = { fg = colors.fg, bg = colors.red1, gui = "bold" } }, + inactive = { + a = { fg = colors.gray1, bg = colors.bg, gui = "bold" }, + b = { fg = colors.gray1, bg = colors.bg }, + c = { fg = colors.gray1, bg = colors.bg }, + }, +} diff --git a/lua/onedarker/Git.lua b/lua/onedarker/Git.lua new file mode 100644 index 00000000..b47ccf23 --- /dev/null +++ b/lua/onedarker/Git.lua @@ -0,0 +1,10 @@ +local Git = { + SignAdd = { fg = C.sign_add }, + SignChange = { fg = C.sign_change }, + SignDelete = { fg = C.sign_delete }, + GitSignsAdd = { fg = C.sign_add }, + GitSignsChange = { fg = C.sign_change }, + GitSignsDelete = { fg = C.sign_delete }, +} + +return Git diff --git a/lua/onedarker/LSP.lua b/lua/onedarker/LSP.lua new file mode 100644 index 00000000..1ba7056b --- /dev/null +++ b/lua/onedarker/LSP.lua @@ -0,0 +1,104 @@ +local LSP = { + LspDiagnosticsDefaultError = { fg = C.error_red }, + LspDiagnosticsDefaultWarning = { fg = C.warning_orange }, + LspDiagnosticsDefaultInformation = { fg = C.info_yellow }, + LspDiagnosticsDefaultHint = { fg = C.hint_blue }, + LspDiagnosticsVirtualTextError = { fg = C.error_red }, + LspDiagnosticsVirtualTextWarning = { fg = C.warning_orange }, + LspDiagnosticsVirtualTextInformation = { fg = C.info_yellow }, + LspDiagnosticsVirtualTextHint = { fg = C.hint_blue }, + LspDiagnosticsFloatingError = { fg = C.error_red }, + LspDiagnosticsFloatingWarning = { fg = C.warning_orange }, + LspDiagnosticsFloatingInformation = { fg = C.info_yellow }, + LspDiagnosticsFloatingHint = { fg = C.hint_blue }, + LspDiagnosticsSignError = { fg = C.error_red }, + LspDiagnosticsSignWarning = { fg = C.warning_orange }, + LspDiagnosticsSignInformation = { fg = C.info_yellow }, + LspDiagnosticsSignHint = { fg = C.hint_blue }, + LspDiagnosticsError = { fg = C.error_red }, + LspDiagnosticsWarning = { fg = C.warning_orange }, + LspDiagnosticsInformation = { fg = C.info_yellow }, + LspDiagnosticsHint = { fg = C.hint_blue }, + LspDiagnosticsUnderlineError = { style = "underline" }, + LspDiagnosticsUnderlineWarning = { style = "underline" }, + LspDiagnosticsUnderlineInformation = { style = "underline" }, + LspDiagnosticsUnderlineHint = { style = "underline" }, + QuickScopePrimary = { fg = C.purple_test, style = "underline" }, + QuickScopeSecondary = { fg = C.cyan_test, style = "underline" }, + TelescopeSelection = { fg = C.hint_blue }, + TelescopeMatching = { fg = C.info_yellow, style = "bold" }, + TelescopeBorder = { fg = C.cyan, bg = Config.transparent_background and "NONE" or C.bg }, + NvimTreeFolderIcon = { fg = C.blue }, + NvimTreeIndentMarker = { fg = C.gray }, + NvimTreeNormal = { fg = C.light_gray, bg = C.alt_bg }, + NvimTreeVertSplit = { fg = C.alt_bg, bg = C.alt_bg }, + NvimTreeFolderName = { fg = C.blue }, + NvimTreeOpenedFolderName = { fg = C.cyan, style = "italic" }, + NvimTreeImageFile = { fg = C.purple }, + NvimTreeSpecialFile = { fg = C.orange }, + NvimTreeGitStaged = { fg = C.sign_add }, + NvimTreeGitNew = { fg = C.sign_add }, + NvimTreeGitDirty = { fg = C.sign_add }, + NvimTreeGitDeleted = { fg = C.sign_delete }, + NvimTreeGitMerge = { fg = C.sign_change }, + NvimTreeGitRenamed = { fg = C.sign_change }, + NvimTreeSymlink = { fg = C.cyan }, + NvimTreeRootFolder = { fg = C.fg, style = "bold" }, + NvimTreeExecFile = { fg = C.green }, + LirFloatNormal = { fg = C.light_gray, bg = C.alt_bg }, + LirDir = { fg = C.blue }, + LirSymLink = { fg = C.cyan }, + LirEmptyDirText = { fg = C.blue }, + BufferCurrent = { fg = C.fg, bg = C.bg }, + BufferCurrentIndex = { fg = C.fg, bg = C.bg }, + BufferCurrentMod = { fg = C.info_yellow, bg = C.bg }, + BufferCurrentSign = { fg = C.hint_blue, bg = C.bg }, + BufferCurrentTarget = { fg = C.red, bg = C.bg, style = "bold" }, + BufferVisible = { fg = C.fg, bg = C.bg }, + BufferVisibleIndex = { fg = C.fg, bg = C.bg }, + BufferVisibleMod = { fg = C.info_yellow, bg = C.bg }, + BufferVisibleSign = { fg = C.gray, bg = C.bg }, + BufferVisibleTarget = { fg = C.red, bg = C.bg, style = "bold" }, + BufferInactive = { fg = C.gray, bg = C.alt_bg }, + BufferInactiveIndex = { fg = C.gray, bg = C.alt_bg }, + BufferInactiveMod = { fg = C.info_yellow, bg = C.alt_bg }, + BufferInactiveSign = { fg = C.gray, bg = C.alt_bg }, + BufferInactiveTarget = { fg = C.red, bg = C.alt_bg, style = "bold" }, + StatusLine = { fg = C.alt_bg }, + StatusLineNC = { fg = C.alt_bg }, + StatusLineSeparator = { fg = C.alt_bg }, + StatusLineTerm = { fg = C.alt_bg }, + StatusLineTermNC = { fg = C.alt_bg }, + CodiVirtualText = { fg = C.hint_blue }, + IndentBlanklineContextChar = { fg = C.context }, + IndentBlanklineChar = { fg = C.dark_gray }, + IndentBlanklineSpaceChar = { fg = C.cyan_test }, + IndentBlanklineSpaceCharBlankline = { fg = C.info_yellow }, + DashboardHeader = { fg = C.blue }, + DashboardCenter = { fg = C.purple }, + DashboardFooter = { fg = C.cyan }, + xmlTag = { fg = C.blue }, + xmlTagName = { fg = C.blue }, + xmlEndTag = { fg = C.blue }, + CompeDocumentation = { bg = C.alt_bg }, + DiffViewNormal = { fg = C.gray, bg = C.alt_bg }, + DiffviewStatusAdded = { fg = C.sign_add }, + DiffviewStatusModified = { fg = C.sign_change }, + DiffviewStatusRenamed = { fg = C.sign_change }, + DiffviewStatusDeleted = { fg = C.sign_delete }, + DiffviewFilePanelInsertion = { fg = C.sign_add }, + DiffviewFilePanelDeletion = { fg = C.sign_delete }, + DiffviewVertSplit = { bg = C.bg }, + diffAdded = { fg = C.sign_add }, + diffRemoved = { fg = C.sign_delete }, + diffFileId = { fg = C.blue, style = "bold,reverse" }, + diffFile = { fg = C.alt_bg }, + diffNewFile = { fg = C.green }, + diffOldFile = { fg = C.red }, + debugPc = { bg = C.cyan }, + debugBreakpoint = { fg = C.red, style = "reverse" }, + FocusedSymbol = { fg = C.purple, style = "bold" }, + SymbolsOutlineConnector = { fg = C.context }, +} + +return LSP diff --git a/lua/onedarker/Treesitter.lua b/lua/onedarker/Treesitter.lua new file mode 100644 index 00000000..c8607ce5 --- /dev/null +++ b/lua/onedarker/Treesitter.lua @@ -0,0 +1,66 @@ +local Treesitter = { + TSComment = { fg = C.gray }, + TSAnnotation = { fg = C.blue }, + TSAttribute = { fg = C.cyan }, + TSConstructor = { fg = C.yellow }, + TSType = { fg = C.yellow }, + TSTypeBuiltin = { fg = C.yellow }, + TSConditional = { fg = C.purple }, + TSException = { fg = C.purple }, + TSInclude = { fg = C.purple }, + TSKeyword = { fg = C.purple }, + TSKeywordReturn = { fg = C.purple }, + TSKeywordFunction = { fg = C.purple }, + TSLabel = { fg = C.red }, + TSNone = { fg = C.fg }, + TSNamespace = { fg = C.purple }, + TSRepeat = { fg = C.purple }, + TSConstant = { fg = C.orange }, + TSConstBuiltin = { fg = C.orange }, + TSFloat = { fg = C.orange }, + TSNumber = { fg = C.orange }, + TSBoolean = { fg = C.orange }, + TSCharacter = { fg = C.green }, + TSError = { fg = C.error_red }, + TSFunction = { fg = C.blue }, + TSFuncBuiltin = { fg = C.blue }, + TSMethod = { fg = C.blue }, + TSConstMacro = { fg = C.cyan }, + TSFuncMacro = { fg = C.blue }, + TSProperty = { fg = C.cyan }, + TSOperator = { fg = C.purple }, + TSField = { fg = C.blue }, + TSParameter = { fg = C.red }, + TSParameterReference = { fg = C.red }, + TSVariable = { fg = C.fg }, + TSVariableBuiltin = { fg = C.red }, + TSSymbol = { fg = C.cyan }, + TSText = { fg = C.fg }, + TSTextReference = { fg = C.red }, + TSPunctDelimiter = { fg = C.fg }, + TSTagDelimiter = { fg = C.gray }, + TSTagAttribute = { fg = C.orange }, + TSPunctBracket = { fg = C.fg }, + TSPunctSpecial = { fg = C.fg }, + TSString = { fg = C.green }, + TSStringRegex = { fg = C.orange }, + TSStringEscape = { fg = C.orange }, + TSTag = { fg = C.blue }, + TSEmphasis = { style = "italic" }, + TSUnderline = { style = "underline" }, + TSWarning = { fg = C.warning_orange }, + TSDanger = { fg = C.error_red }, + TSTitle = { fg = C.blue, style = "bold" }, + TSLiteral = { fg = C.green }, + TSURI = { fg = C.blue, style = "underline" }, + TSMath = { fg = C.fg }, + TSKeywordOperator = { fg = C.purple }, + TSStructure = { fg = C.fg }, + TSStrong = { fg = C.yellow_orange }, + TSQueryLinterError = { fg = C.warning_orange }, + TSEnvironment = { fg = C.fg }, + TSEnvironmentName = { fg = C.fg }, + TSNote = { fg = C.blue }, +} + +return Treesitter diff --git a/lua/onedarker/Whichkey.lua b/lua/onedarker/Whichkey.lua new file mode 100644 index 00000000..86b42bd6 --- /dev/null +++ b/lua/onedarker/Whichkey.lua @@ -0,0 +1,9 @@ +local Whichkey = { + WhichKey = { fg = C.purple }, + WhichKeySeperator = { fg = C.green }, + WhichKeyGroup = { fg = C.cyan }, + WhichKeyDesc = { fg = C.blue }, + WhichKeyFloat = { bg = C.dark }, +} + +return Whichkey diff --git a/lua/onedarker/config.lua b/lua/onedarker/config.lua new file mode 100644 index 00000000..ebac7109 --- /dev/null +++ b/lua/onedarker/config.lua @@ -0,0 +1,23 @@ +local config + +vim = vim or { g = {}, o = {} } + +local function opt(key, default) + if vim.g[key] == nil then + return default + end + if vim.g[key] == 0 then + return false + end + return vim.g[key] +end + +config = { + transparent_background = opt("transparent_background", false), + italic_comments = opt("italic_keywords", true) and "italic" or "NONE", + italic_keywords = opt("italic_keywords", true) and "italic" or "NONE", + italic_functions = opt("italic_function", false) and "italic" or "NONE", + italic_variables = opt("italic_variables", true) and "italic" or "NONE", +} + +return config diff --git a/lua/onedarker/highlights.lua b/lua/onedarker/highlights.lua new file mode 100644 index 00000000..e4b9eeac --- /dev/null +++ b/lua/onedarker/highlights.lua @@ -0,0 +1,99 @@ +local highlights = { + Normal = { fg = C.fg, bg = Config.transparent_background and "NONE" or C.bg }, + SignColumn = { bg = C.bg }, + MsgArea = { fg = C.fg, bg = Config.transparent_background and "NONE" or C.bg }, + ModeMsg = { fg = C.fg, bg = C.bg }, + MsgSeparator = { fg = C.fg, bg = C.bg }, + SpellBad = { fg = C.error_red, style = "underline" }, + SpellCap = { fg = C.yellow, style = "underline" }, + SpellLocal = { fg = C.green, style = "underline" }, + SpellRare = { fg = C.purple, style = "underline" }, + NormalNC = { fg = C.fg, bg = Config.transparent_background and "NONE" or C.bg }, + Pmenu = { fg = C.light_gray, bg = C.popup_back }, + PmenuSel = { fg = C.alt_bg, bg = C.blue }, + WildMenu = { fg = C.alt_bg, bg = C.blue }, + CursorLineNr = { fg = C.light_gray, style = "bold" }, + Comment = { fg = C.green, style = "italic" }, + Folded = { fg = C.accent, bg = C.alt_bg }, + FoldColumn = { fg = C.accent, bg = C.alt_bg }, + LineNr = { fg = C.context }, + FloatBoder = { fg = C.gray, bg = C.alt_bg }, + Whitespace = { fg = C.bg }, + VertSplit = { fg = C.bg, bg = C.fg }, + CursorLine = { bg = C.dark }, + CursorColumn = { bg = C.dark }, + ColorColumn = { bg = C.dark }, + NormalFloat = { bg = C.dark }, + Visual = { bg = C.ui_blue }, + VisualNOS = { bg = C.alt_bg }, + WarningMsg = { fg = C.error_red, bg = C.bg }, + DiffAdd = { fg = C.alt_bg, bg = C.sign_add }, + DiffChange = { fg = C.alt_bg, bg = C.sign_change, style = "underline" }, + DiffDelete = { fg = C.alt_bg, bg = C.sign_delete }, + QuickFixLine = { bg = C.dark_gray }, + PmenuSbar = { bg = C.alt_bg }, + PmenuThumb = { bg = C.gray }, + MatchWord = { style = "underline" }, + MatchParen = { fg = C.hint_blue, bg = C.bg, style = "underline" }, + MatchWordCur = { style = "underline" }, + MatchParenCur = { style = "underline" }, + Cursor = { fg = C.cursor_fg, bg = C.cursor_bg }, + lCursor = { fg = C.cursor_fg, bg = C.cursor_bg }, + CursorIM = { fg = C.cursor_fg, bg = C.cursor_bg }, + TermCursor = { fg = C.cursor_fg, bg = C.cursor_bg }, + TermCursorNC = { fg = C.cursor_fg, bg = C.cursor_bg }, + Conceal = { fg = C.accent }, + Directory = { fg = C.blue }, + SpecialKey = { fg = C.blue, style = "bold" }, + Title = { fg = C.blue, style = "bold" }, + ErrorMsg = { fg = C.error_red, bg = C.bg, style = "bold" }, + Search = { fg = C.light_gray, bg = C.search_blue }, + IncSearch = { fg = C.light_gray, bg = C.search_blue }, + Substitute = { fg = C.light_gray, bg = C.search_orange }, + MoreMsg = { fg = C.orange }, + Question = { fg = C.orange }, + EndOfBuffer = { fg = C.bg }, + NonText = { fg = C.bg }, + Variable = { fg = C.cyan }, + String = { fg = C.green }, + Character = { fg = C.green }, + Constant = { fg = C.orange }, + Number = { fg = C.orange }, + Boolean = { fg = C.orange }, + Float = { fg = C.orange }, + Identifier = { fg = C.fg }, + Function = { fg = C.blue }, + Operator = { fg = C.purple }, + Type = { fg = C.cyan }, + StorageClass = { fg = C.cyan }, + Structure = { fg = C.purple }, + Typedef = { fg = C.purple }, + Keyword = { fg = C.purple }, + Statement = { fg = C.purple }, + Conditional = { fg = C.purple }, + Repeat = { fg = C.purple }, + Label = { fg = C.cyan }, + Exception = { fg = C.purple }, + Include = { fg = C.purple }, + PreProc = { fg = C.purple }, + Define = { fg = C.purple }, + Macro = { fg = C.purple }, + PreCondit = { fg = C.purple }, + Special = { fg = C.purple }, + SpecialChar = { fg = C.fg }, + Tag = { fg = C.blue }, + Debug = { fg = C.red }, + Delimiter = { fg = C.fg }, + SpecialComment = { fg = C.gray }, + Underlined = { style = "underline" }, + Bold = { style = "bold" }, + Italic = { style = "italic" }, + Ignore = { fg = C.cyan, bg = C.bg, style = "bold" }, + Todo = { fg = C.red, bg = C.bg, style = "bold" }, + Error = { fg = C.error_red, bg = C.bg, style = "bold" }, + TabLine = { fg = C.light_gray, bg = C.alt_bg }, + TabLineSel = { fg = C.fg, bg = C.alt_bg }, + TabLineFill = { fg = C.fg, bg = C.alt_bg }, +} + +return highlights diff --git a/lua/onedarker/init.lua b/lua/onedarker/init.lua new file mode 100644 index 00000000..852e0103 --- /dev/null +++ b/lua/onedarker/init.lua @@ -0,0 +1,30 @@ +vim.api.nvim_command "hi clear" +if vim.fn.exists "syntax_on" then + vim.api.nvim_command "syntax reset" +end +vim.o.background = "dark" +vim.o.termguicolors = true +vim.g.colors_name = "onedarker" + +local util = require "onedarker.util" +Config = require "onedarker.config" +C = require "onedarker.palette" +local highlights = require "onedarker.highlights" +local Treesitter = require "onedarker.Treesitter" +local markdown = require "onedarker.markdown" +local Whichkey = require "onedarker.Whichkey" +local Git = require "onedarker.Git" +local LSP = require "onedarker.LSP" + +local skeletons = { + highlights, + Treesitter, + markdown, + Whichkey, + Git, + LSP, +} + +for _, skeleton in ipairs(skeletons) do + util.initialise(skeleton) +end diff --git a/lua/onedarker/markdown.lua b/lua/onedarker/markdown.lua new file mode 100644 index 00000000..2b83e056 --- /dev/null +++ b/lua/onedarker/markdown.lua @@ -0,0 +1,27 @@ +local markdown = { + markdownBlockquote = { fg = C.accent }, + markdownBold = { fg = C.yellow, style = "bold" }, + markdownCode = { fg = C.green }, + markdownCodeBlock = { fg = C.green }, + markdownCodeDelimiter = { fg = C.green }, + markdownH1 = { fg = C.blue }, + markdownH2 = { fg = C.blue }, + markdownH3 = { fg = C.blue }, + markdownH4 = { fg = C.blue }, + markdownH5 = { fg = C.blue }, + markdownH6 = { fg = C.blue }, + markdownHeadingDelimiter = { fg = C.red }, + markdownHeadingRule = { fg = C.accent }, + markdownId = { fg = C.purple }, + markdownIdDeclaration = { fg = C.blue }, + markdownIdDelimiter = { fg = C.light_gray }, + markdownLinkDelimiter = { fg = C.light_gray }, + markdownItalic = { style = "italic" }, + markdownLinkText = { fg = C.blue }, + markdownListMarker = { fg = C.red }, + markdownOrderedListMarker = { fg = C.red }, + markdownRule = { fg = C.accent }, + markdownUrl = { fg = C.cyan, style = "underline" }, +} + +return markdown diff --git a/lua/onedarker/palette.lua b/lua/onedarker/palette.lua new file mode 100644 index 00000000..c3116b1e --- /dev/null +++ b/lua/onedarker/palette.lua @@ -0,0 +1,39 @@ +local colors = { + fg = "#abb2bf", + bg = "#1f2227", + alt_bg = "#282c34", + dark = "#282c34", + accent = "#BBBBBB", + dark_gray = "#2a2f3e", + context = "#4b5263", + popup_back = "#282c34", + search_orange = "#613214", + search_blue = "#5e81ac", + gray = "#5c6370", + light_gray = "#abb2bf", + blue = "#61AFEF", + dark_blue = "#223E55", + green = "#98C379", + cyan = "#56B6C2", + red = "#e06c75", + orange = "#D19A66", + light_red = "#be5046", + yellow = "#E5C07B", + yellow_orange = "#D7BA7D", + purple = "#C678DD", + magenta = "#D16D9E", + cursor_fg = "#515052", + cursor_bg = "#AEAFAD", + sign_add = "#587c0c", + sign_change = "#0c7d9d", + sign_delete = "#94151b", + error_red = "#F44747", + warning_orange = "#ff8800", + info_yellow = "#FFCC66", + hint_blue = "#4FC1FF", + purple_test = "#ff007c", + cyan_test = "#00dfff", + ui_blue = "#264F78", +} + +return colors diff --git a/lua/onedarker/util.lua b/lua/onedarker/util.lua new file mode 100644 index 00000000..dbac18a2 --- /dev/null +++ b/lua/onedarker/util.lua @@ -0,0 +1,25 @@ +local M = {} + +local function highlight(group, properties) + local bg = properties.bg == nil and "" or "guibg=" .. properties.bg + local fg = properties.fg == nil and "" or "guifg=" .. properties.fg + local style = properties.style == nil and "" or "gui=" .. properties.style + + local cmd = table.concat({ + "highlight", + group, + bg, + fg, + style, + }, " ") + + vim.api.nvim_command(cmd) +end + +function M.initialise(skeleton) + for group, properties in pairs(skeleton) do + highlight(group, properties) + end +end + +return M diff --git a/lua/spacegray/Git.lua b/lua/spacegray/Git.lua deleted file mode 100644 index b47ccf23..00000000 --- a/lua/spacegray/Git.lua +++ /dev/null @@ -1,10 +0,0 @@ -local Git = { - SignAdd = { fg = C.sign_add }, - SignChange = { fg = C.sign_change }, - SignDelete = { fg = C.sign_delete }, - GitSignsAdd = { fg = C.sign_add }, - GitSignsChange = { fg = C.sign_change }, - GitSignsDelete = { fg = C.sign_delete }, -} - -return Git diff --git a/lua/spacegray/LSP.lua b/lua/spacegray/LSP.lua deleted file mode 100644 index dd3d77ac..00000000 --- a/lua/spacegray/LSP.lua +++ /dev/null @@ -1,99 +0,0 @@ -local LSP = { - LspDiagnosticsDefaultError = { fg = C.error_red }, - LspDiagnosticsDefaultWarning = { fg = C.warning_orange }, - LspDiagnosticsDefaultInformation = { fg = C.info_yellow }, - LspDiagnosticsDefaultHint = { fg = C.hint_blue }, - LspDiagnosticsVirtualTextError = { fg = C.error_red }, - LspDiagnosticsVirtualTextWarning = { fg = C.warning_orange }, - LspDiagnosticsVirtualTextInformation = { fg = C.info_yellow }, - LspDiagnosticsVirtualTextHint = { fg = C.hint_blue }, - LspDiagnosticsFloatingError = { fg = C.error_red }, - LspDiagnosticsFloatingWarning = { fg = C.warning_orange }, - LspDiagnosticsFloatingInformation = { fg = C.info_yellow }, - LspDiagnosticsFloatingHint = { fg = C.hint_blue }, - LspDiagnosticsSignError = { fg = C.error_red }, - LspDiagnosticsSignWarning = { fg = C.warning_orange }, - LspDiagnosticsSignInformation = { fg = C.info_yellow }, - LspDiagnosticsSignHint = { fg = C.hint_blue }, - LspDiagnosticsError = { fg = C.error_red }, - LspDiagnosticsWarning = { fg = C.warning_orange }, - LspDiagnosticsInformation = { fg = C.info_yellow }, - LspDiagnosticsHint = { fg = C.hint_blue }, - LspDiagnosticsUnderlineError = { style = "underline" }, - LspDiagnosticsUnderlineWarning = { style = "underline" }, - LspDiagnosticsUnderlineInformation = { style = "underline" }, - LspDiagnosticsUnderlineHint = { style = "underline" }, - QuickScopePrimary = { fg = C.purple_test, style = "underline" }, - QuickScopeSecondary = { fg = C.cyan_test, style = "underline" }, - TelescopeSelection = { fg = C.hint_blue }, - TelescopeMatching = { fg = C.info_yellow, style = "bold" }, - TelescopeBorder = { fg = C.cyan, bg = Config.transparent_background and "NONE" or C.bg }, - NvimTreeFolderIcon = { fg = C.blue }, - NvimTreeIndentMarker = { fg = C.gray }, - NvimTreeNormal = { fg = C.light_gray, bg = C.alt_bg }, - NvimTreeVertSplit = { fg = C.alt_bg, bg = C.alt_bg }, - NvimTreeFolderName = { fg = C.blue }, - NvimTreeOpenedFolderName = { fg = C.cyan, style = "italic" }, - NvimTreeImageFile = { fg = C.purple }, - NvimTreeSpecialFile = { fg = C.orange }, - NvimTreeGitStaged = { fg = C.sign_add }, - NvimTreeGitNew = { fg = C.sign_add }, - NvimTreeGitDirty = { fg = C.sign_add }, - NvimTreeGitDeleted = { fg = C.sign_delete }, - NvimTreeGitMerge = { fg = C.sign_change }, - NvimTreeGitRenamed = { fg = C.sign_change }, - NvimTreeSymlink = { fg = C.cyan }, - NvimTreeRootFolder = { fg = C.fg, style = "bold" }, - NvimTreeExecFile = { fg = C.green }, - LirFloatNormal = { fg = C.light_gray, bg = C.alt_bg }, - LirDir = { fg = C.blue }, - LirSymLink = { fg = C.cyan }, - LirEmptyDirText = { fg = C.blue }, - BufferCurrent = { fg = C.fg, bg = C.bg }, - BufferCurrentIndex = { fg = C.fg, bg = C.bg }, - BufferCurrentMod = { fg = C.info_yellow, bg = C.bg }, - BufferCurrentSign = { fg = C.hint_blue, bg = C.bg }, - BufferCurrentTarget = { fg = C.red, bg = C.bg, style = "bold" }, - BufferVisible = { fg = C.fg, bg = C.bg }, - BufferVisibleIndex = { fg = C.fg, bg = C.bg }, - BufferVisibleMod = { fg = C.info_yellow, bg = C.bg }, - BufferVisibleSign = { fg = C.gray, bg = C.bg }, - BufferVisibleTarget = { fg = C.red, bg = C.bg, style = "bold" }, - BufferInactive = { fg = C.gray, bg = C.alt_bg }, - BufferInactiveIndex = { fg = C.gray, bg = C.alt_bg }, - BufferInactiveMod = { fg = C.info_yellow, bg = C.alt_bg }, - BufferInactiveSign = { fg = C.gray, bg = C.alt_bg }, - BufferInactiveTarget = { fg = C.red, bg = C.alt_bg, style = "bold" }, - StatusLine = { fg = C.alt_bg }, - StatusLineNC = { fg = C.alt_bg }, - StatusLineSeparator = { fg = C.alt_bg }, - StatusLineTerm = { fg = C.alt_bg }, - StatusLineTermNC = { fg = C.alt_bg }, - CodiVirtualText = { fg = C.hint_blue }, - IndentBlanklineContextChar = { fg = C.accent }, - DashboardHeader = { fg = C.blue }, - DashboardCenter = { fg = C.purple }, - DashboardFooter = { fg = C.cyan }, - xmlTag = { fg = C.cyan }, - xmlTagName = { fg = C.cyan }, - xmlEndTag = { fg = C.cyan }, - CompeDocumentation = { bg = C.alt_bg }, - DiffViewNormal = { fg = C.gray, bg = C.alt_bg }, - DiffviewStatusAdded = { fg = C.sign_add }, - DiffviewStatusModified = { fg = C.sign_change }, - DiffviewStatusRenamed = { fg = C.sign_change }, - DiffviewStatusDeleted = { fg = C.sign_delete }, - DiffviewFilePanelInsertion = { fg = C.sign_add }, - DiffviewFilePanelDeletion = { fg = C.sign_delete }, - DiffviewVertSplit = { bg = C.bg }, - diffAdded = { fg = C.sign_add }, - diffRemoved = { fg = C.sign_delete }, - diffFileId = { fg = C.blue, style = "bold,reverse" }, - diffFile = { fg = C.alt_bg }, - diffNewFile = { fg = C.green }, - diffOldFile = { fg = C.red }, - debugPc = { bg = C.cyan }, - debugBreakpoint = { fg = C.red, style = "reverse" }, -} - -return LSP diff --git a/lua/spacegray/Treesitter.lua b/lua/spacegray/Treesitter.lua deleted file mode 100644 index 4e5ce16e..00000000 --- a/lua/spacegray/Treesitter.lua +++ /dev/null @@ -1,56 +0,0 @@ -local Treesitter = { - TSComment = { fg = C.gray }, - TSAnnotation = { fg = C.purple }, - TSAttribute = { fg = C.cyan }, - TSConstructor = { fg = C.purple }, - TSType = { fg = C.purple }, - TSTypeBuiltin = { fg = C.purple }, - TSConditional = { fg = C.blue }, - TSException = { fg = C.blue }, - TSInclude = { fg = C.blue }, - TSKeyword = { fg = C.blue }, - TSKeywordFunction = { fg = C.blue }, - TSLabel = { fg = C.blue }, - TSNamespace = { fg = C.blue }, - TSRepeat = { fg = C.blue }, - TSConstant = { fg = C.orange }, - TSConstBuiltin = { fg = C.red }, - TSFloat = { fg = C.red }, - TSNumber = { fg = C.red }, - TSBoolean = { fg = C.red }, - TSCharacter = { fg = C.light_green }, - TSError = { fg = C.error_red }, - TSFunction = { fg = C.yellow }, - TSFuncBuiltin = { fg = C.yellow }, - TSMethod = { fg = C.yellow }, - TSConstMacro = { fg = C.cyan }, - TSFuncMacro = { fg = C.yellow }, - TSVariable = { fg = C.light_blue }, - TSVariableBuiltin = { fg = C.light_blue }, - TSProperty = { fg = C.light_blue }, - TSOperator = { fg = C.gray }, - TSField = { fg = C.light_blue }, - TSParameter = { fg = C.light_blue }, - TSParameterReference = { fg = C.light_blue }, - TSSymbol = { fg = C.light_blue }, - TSText = { fg = C.fg }, - TSPunctDelimiter = { fg = C.gray }, - TSTagDelimiter = { fg = C.gray }, - TSPunctBracket = { fg = C.gray }, - TSPunctSpecial = { fg = C.gray }, - TSString = { fg = C.green }, - TSStringRegex = { fg = C.yellow_orange }, - TSStringEscape = { fg = C.yellow_orange }, - TSTag = { fg = C.blue }, - TSEmphasis = { style = "italic" }, - TSUnderline = { style = "underline" }, - TSTitle = { fg = C.blue, style = "bold" }, - TSLiteral = { fg = C.yellow_orange }, - TSURI = { fg = C.yellow_orange, style = "underline" }, - TSKeywordOperator = { fg = C.blue }, - TSStructure = { fg = C.light_blue }, - TSStrong = { fg = C.yellow_orange }, - TSQueryLinterError = { fg = C.warning_orange }, -} - -return Treesitter diff --git a/lua/spacegray/Whichkey.lua b/lua/spacegray/Whichkey.lua deleted file mode 100644 index 5d1ae7ce..00000000 --- a/lua/spacegray/Whichkey.lua +++ /dev/null @@ -1,9 +0,0 @@ -local Whichkey = { - WhichKey = { fg = C.purple }, - WhichKeySeperator = { fg = C.green }, - WhichKeyGroup = { fg = C.blue }, - WhichKeyDesc = { fg = C.light_blue }, - WhichKeyFloat = { bg = C.dark }, -} - -return Whichkey diff --git a/lua/spacegray/config.lua b/lua/spacegray/config.lua deleted file mode 100644 index ebac7109..00000000 --- a/lua/spacegray/config.lua +++ /dev/null @@ -1,23 +0,0 @@ -local config - -vim = vim or { g = {}, o = {} } - -local function opt(key, default) - if vim.g[key] == nil then - return default - end - if vim.g[key] == 0 then - return false - end - return vim.g[key] -end - -config = { - transparent_background = opt("transparent_background", false), - italic_comments = opt("italic_keywords", true) and "italic" or "NONE", - italic_keywords = opt("italic_keywords", true) and "italic" or "NONE", - italic_functions = opt("italic_function", false) and "italic" or "NONE", - italic_variables = opt("italic_variables", true) and "italic" or "NONE", -} - -return config diff --git a/lua/spacegray/highlights.lua b/lua/spacegray/highlights.lua deleted file mode 100644 index 208c2c62..00000000 --- a/lua/spacegray/highlights.lua +++ /dev/null @@ -1,99 +0,0 @@ -local highlights = { - Normal = { fg = C.fg, bg = Config.transparent_background and "NONE" or C.bg }, - SignColumn = { bg = C.bg }, - MsgArea = { fg = C.fg, bg = Config.transparent_background and "NONE" or C.bg }, - ModeMsg = { fg = C.fg, bg = C.bg }, - MsgSeparator = { fg = C.fg, bg = C.bg }, - SpellBad = { fg = C.error_red, style = "underline" }, - SpellCap = { fg = C.yellow, style = "underline" }, - SpellLocal = { fg = C.green, style = "underline" }, - SpellRare = { fg = C.purple, style = "underline" }, - NormalNC = { fg = C.fg, bg = Config.transparent_background and "NONE" or C.bg }, - Pmenu = { fg = C.light_gray, bg = C.popup_back }, - PmenuSel = { fg = C.alt_bg, bg = C.blue }, - WildMenu = { fg = C.alt_bg, bg = C.blue }, - CursorLineNr = { fg = C.light_gray, style = "bold" }, - Comment = { fg = C.gray, style = "italic" }, - Folded = { fg = C.accent, bg = C.alt_bg }, - FoldColumn = { fg = C.accent, bg = C.alt_bg }, - LineNr = { fg = C.gray }, - FloatBoder = { fg = C.gray, bg = C.alt_bg }, - Whitespace = { fg = C.bg }, - VertSplit = { fg = C.bg, bg = C.fg }, - CursorLine = { bg = C.dark }, - CursorColumn = { bg = C.dark }, - ColorColumn = { bg = C.dark }, - NormalFloat = { bg = C.dark }, - Visual = { bg = C.ui_blue }, - VisualNOS = { bg = C.alt_bg }, - WarningMsg = { fg = C.error_red, bg = C.bg }, - DiffAdd = { fg = C.alt_bg, bg = C.sign_add }, - DiffChange = { fg = C.alt_bg, bg = C.sign_change, style = "underline" }, - DiffDelete = { fg = C.alt_bg, bg = C.sign_delete }, - QuickFixLine = { bg = C.accent }, - PmenuSbar = { bg = C.alt_bg }, - PmenuThumb = { bg = C.gray }, - MatchWord = { style = "underline" }, - MatchParen = { fg = C.hint_blue, bg = C.bg, style = "underline" }, - MatchWordCur = { style = "underline" }, - MatchParenCur = { style = "underline" }, - Cursor = { fg = C.cursor_fg, bg = C.cursor_bg }, - lCursor = { fg = C.cursor_fg, bg = C.cursor_bg }, - CursorIM = { fg = C.cursor_fg, bg = C.cursor_bg }, - TermCursor = { fg = C.cursor_fg, bg = C.cursor_bg }, - TermCursorNC = { fg = C.cursor_fg, bg = C.cursor_bg }, - Conceal = { fg = C.accent }, - Directory = { fg = C.blue }, - SpecialKey = { fg = C.blue, style = "bold" }, - Title = { fg = C.blue, style = "bold" }, - ErrorMsg = { fg = C.error_red, bg = C.bg, style = "bold" }, - Search = { fg = C.light_gray, bg = C.search_blue }, - IncSearch = { fg = C.light_gray, bg = C.search_blue }, - Substitute = { fg = C.light_gray, bg = C.search_orange }, - MoreMsg = { fg = C.orange }, - Question = { fg = C.orange }, - EndOfBuffer = { fg = C.bg }, - NonText = { fg = C.bg }, - Variable = { fg = C.light_blue }, - String = { fg = C.green }, - Character = { fg = C.light_green }, - Constant = { fg = C.blue }, - Number = { fg = C.red }, - Boolean = { fg = C.red }, - Float = { fg = C.red }, - Identifier = { fg = C.light_blue }, - Function = { fg = C.yellow }, - Operator = { fg = C.gray }, - Type = { fg = C.purple }, - StorageClass = { fg = C.purple }, - Structure = { fg = C.purple }, - Typedef = { fg = C.purple }, - Keyword = { fg = C.blue }, - Statement = { fg = C.blue }, - Conditional = { fg = C.blue }, - Repeat = { fg = C.blue }, - Label = { fg = C.blue }, - Exception = { fg = C.blue }, - Include = { fg = C.blue }, - PreProc = { fg = C.purple }, - Define = { fg = C.purple }, - Macro = { fg = C.purple }, - PreCondit = { fg = C.purple }, - Special = { fg = C.orange }, - SpecialChar = { fg = C.white }, - Tag = { fg = C.blue }, - Debug = { fg = C.red }, - Delimiter = { fg = C.gray }, - SpecialComment = { fg = C.gray }, - Underlined = { style = "underline" }, - Bold = { style = "bold" }, - Italic = { style = "italic" }, - Ignore = { fg = C.cyan, bg = C.bg, style = "bold" }, - Todo = { fg = C.red, bg = C.bg, style = "bold" }, - Error = { fg = C.error_red, bg = C.bg, style = "bold" }, - TabLine = { fg = C.light_gray, bg = C.alt_bg }, - TabLineSel = { fg = C.white, bg = C.alt_bg }, - TabLineFill = { fg = C.white, bg = C.alt_bg }, -} - -return highlights diff --git a/lua/spacegray/init.lua b/lua/spacegray/init.lua deleted file mode 100644 index 9ae24dbb..00000000 --- a/lua/spacegray/init.lua +++ /dev/null @@ -1,43 +0,0 @@ -vim.api.nvim_command "hi clear" -if vim.fn.exists "syntax_on" then - vim.api.nvim_command "syntax reset" -end -vim.o.background = "dark" -vim.o.termguicolors = true -vim.g.colors_name = "spacegray" - -local util = require "spacegray.util" -Config = require "spacegray.config" -C = require "spacegray.palette" - -local async -async = vim.loop.new_async(vim.schedule_wrap(function() - local skeletons = {} - for _, skeleton in ipairs(skeletons) do - util.initialise(skeleton) - end - - async:close() -end)) - -local highlights = require "spacegray.highlights" -local Treesitter = require "spacegray.Treesitter" -local markdown = require "spacegray.markdown" -local Whichkey = require "spacegray.Whichkey" -local Git = require "spacegray.Git" -local LSP = require "spacegray.LSP" - -local skeletons = { - highlights, - Treesitter, - markdown, - Whichkey, - Git, - LSP, -} - -for _, skeleton in ipairs(skeletons) do - util.initialise(skeleton) -end - -async:send() diff --git a/lua/spacegray/markdown.lua b/lua/spacegray/markdown.lua deleted file mode 100644 index 2b83e056..00000000 --- a/lua/spacegray/markdown.lua +++ /dev/null @@ -1,27 +0,0 @@ -local markdown = { - markdownBlockquote = { fg = C.accent }, - markdownBold = { fg = C.yellow, style = "bold" }, - markdownCode = { fg = C.green }, - markdownCodeBlock = { fg = C.green }, - markdownCodeDelimiter = { fg = C.green }, - markdownH1 = { fg = C.blue }, - markdownH2 = { fg = C.blue }, - markdownH3 = { fg = C.blue }, - markdownH4 = { fg = C.blue }, - markdownH5 = { fg = C.blue }, - markdownH6 = { fg = C.blue }, - markdownHeadingDelimiter = { fg = C.red }, - markdownHeadingRule = { fg = C.accent }, - markdownId = { fg = C.purple }, - markdownIdDeclaration = { fg = C.blue }, - markdownIdDelimiter = { fg = C.light_gray }, - markdownLinkDelimiter = { fg = C.light_gray }, - markdownItalic = { style = "italic" }, - markdownLinkText = { fg = C.blue }, - markdownListMarker = { fg = C.red }, - markdownOrderedListMarker = { fg = C.red }, - markdownRule = { fg = C.accent }, - markdownUrl = { fg = C.cyan, style = "underline" }, -} - -return markdown diff --git a/lua/spacegray/palette.lua b/lua/spacegray/palette.lua deleted file mode 100644 index 924482fd..00000000 --- a/lua/spacegray/palette.lua +++ /dev/null @@ -1,40 +0,0 @@ -local colors = { - fg = "#ABB2BF", - bg = "#202020", - alt_bg = "#262626", - dark = "#222222", - accent = "#AAAAAA", - popup_back = "#2D2D30", - search_orange = "#613214", - search_blue = "#5e81ac", - white = "#D8DEE9", - gray = "#9BA1AB", - light_gray = "#c8c9c1", - blue = "#5f8ccd", - dark_blue = "#223E55", - light_blue = "#8dc0d5", - green = "#83ba8b", - cyan = "#4EC9B0", - light_green = "#B5CEA8", - red = "#D16969", - orange = "#D1866B", - light_red = "#CA535F", - yellow = "#ECCC8E", - yellow_orange = "#D7BA7D", - purple = "#BF82B4", - magenta = "#D16D9E", - cursor_fg = "#515052", - cursor_bg = "#AEAFAD", - sign_add = "#587c0c", - sign_change = "#0c7d9d", - sign_delete = "#94151b", - error_red = "#F44747", - warning_orange = "#ff8800", - info_yellow = "#FFCC66", - hint_blue = "#4FC1FF", - purple_test = "#ff007c", - cyan_test = "#00dfff", - ui_blue = "#264F78", -} - -return colors diff --git a/lua/spacegray/util.lua b/lua/spacegray/util.lua deleted file mode 100644 index dbac18a2..00000000 --- a/lua/spacegray/util.lua +++ /dev/null @@ -1,25 +0,0 @@ -local M = {} - -local function highlight(group, properties) - local bg = properties.bg == nil and "" or "guibg=" .. properties.bg - local fg = properties.fg == nil and "" or "guifg=" .. properties.fg - local style = properties.style == nil and "" or "gui=" .. properties.style - - local cmd = table.concat({ - "highlight", - group, - bg, - fg, - style, - }, " ") - - vim.api.nvim_command(cmd) -end - -function M.initialise(skeleton) - for group, properties in pairs(skeleton) do - highlight(group, properties) - end -end - -return M -- cgit v1.2.3