summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/dark
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/dark')
-rw-r--r--.config/nvim/lua/dark/Git.lua10
-rw-r--r--.config/nvim/lua/dark/LSP.lua92
-rw-r--r--.config/nvim/lua/dark/Treesitter.lua56
-rw-r--r--.config/nvim/lua/dark/Whichkey.lua9
-rw-r--r--.config/nvim/lua/dark/config.lua23
-rw-r--r--.config/nvim/lua/dark/highlights.lua99
-rw-r--r--.config/nvim/lua/dark/init.lua30
-rw-r--r--.config/nvim/lua/dark/markdown.lua27
-rw-r--r--.config/nvim/lua/dark/palette.lua33
-rw-r--r--.config/nvim/lua/dark/util.lua25
10 files changed, 404 insertions, 0 deletions
diff --git a/.config/nvim/lua/dark/Git.lua b/.config/nvim/lua/dark/Git.lua
new file mode 100644
index 0000000..b47ccf2
--- /dev/null
+++ b/.config/nvim/lua/dark/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/.config/nvim/lua/dark/LSP.lua b/.config/nvim/lua/dark/LSP.lua
new file mode 100644
index 0000000..2dfa07f
--- /dev/null
+++ b/.config/nvim/lua/dark/LSP.lua
@@ -0,0 +1,92 @@
+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 = { fg = C.error_red },
+ LspDiagnosticsUnderlineWarning = { fg = C.warning_orange },
+ LspDiagnosticsUnderlineInformation = { fg = C.info_yellow },
+ LspDiagnosticsUnderlineHint = { fg = C.hint_blue },
+ QuickScopePrimary = { fg = C.cyan_test, style = "underline" },
+ QuickScopeSecondary = { fg = C.purple_test, style = "underline" },
+ TelescopeSelection = { fg = C.hint_blue },
+ TelescopeMatching = { fg = C.info_yellow, style = "bold" },
+ TelescopeBorder = { fg = C.cyan, bg = 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 },
+ 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.hint_blue, 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.pale_purple },
+ IndentBlanklineContextChar = { fg = C.accent },
+ DashboardHeader = { fg = C.blue },
+ DashboardCenter = { fg = C.purple },
+ DashboardFooter = { 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/.config/nvim/lua/dark/Treesitter.lua b/.config/nvim/lua/dark/Treesitter.lua
new file mode 100644
index 0000000..d2d965a
--- /dev/null
+++ b/.config/nvim/lua/dark/Treesitter.lua
@@ -0,0 +1,56 @@
+local Treesitter = {
+ TSComment = { fg = C.blue },
+ TSAnnotation = { fg = C.purple },
+ TSAttribute = { fg = C.cyan },
+ TSConstructor = { fg = C.white },
+ TSType = { fg = C.white },
+ TSTypeBuiltin = { fg = C.white },
+ TSConditional = { fg = C.orange },
+ TSException = { fg = C.orange },
+ TSInclude = { fg = C.orange },
+ TSKeyword = { fg = C.orange },
+ TSKeywordFunction = { fg = C.orange },
+ TSLabel = { fg = C.orange },
+ TSNamespace = { fg = C.orange },
+ TSRepeat = { fg = C.orange },
+ TSConstant = { fg = C.orange },
+ TSConstBuiltin = { fg = C.orange },
+ 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.purple },
+ TSFuncBuiltin = { fg = C.purple },
+ TSMethod = { fg = C.purple },
+ TSConstMacro = { fg = C.orange },
+ TSFuncMacro = { fg = C.orange },
+ TSVariable = { fg = C.white },
+ TSVariableBuiltin = { fg = C.cyan },
+ TSProperty = { fg = C.white },
+ TSOperator = { fg = C.orange },
+ TSField = { fg = C.white },
+ TSParameter = { fg = C.white },
+ TSParameterReference = { fg = C.white },
+ TSSymbol = { fg = C.white },
+ TSText = { fg = C.fg },
+ TSPunctDelimiter = { fg = C.gray },
+ TSTagDelimiter = { fg = C.gray },
+ TSPunctBracket = { fg = C.gray },
+ TSPunctSpecial = { fg = C.gray },
+ TSString = { fg = C.blue },
+ TSStringRegex = { fg = C.blue },
+ TSStringEscape = { fg = C.blue },
+ TSTag = { fg = C.pale_purple },
+ TSEmphasis = { style = "italic" },
+ TSUnderline = { style = "underline" },
+ TSTitle = { fg = C.blue, style = "bold" },
+ TSLiteral = { fg = C.blue },
+ TSURI = { fg = C.cyan, style = "underline" },
+ TSKeywordOperator = { fg = C.blue },
+ TSStructure = { fg = C.purple_test },
+ TSStrong = { fg = C.yellow },
+ TSQueryLinterError = { fg = C.warning_orange },
+}
+
+return Treesitter
diff --git a/.config/nvim/lua/dark/Whichkey.lua b/.config/nvim/lua/dark/Whichkey.lua
new file mode 100644
index 0000000..2aa3d3e
--- /dev/null
+++ b/.config/nvim/lua/dark/Whichkey.lua
@@ -0,0 +1,9 @@
+local Whichkey = {
+ WhichKey = { fg = C.light_gray },
+ WhichKeySeperator = { fg = C.gray },
+ WhichKeyGroup = { fg = C.yellow },
+ WhichKeyDesc = { fg = C.light_gray },
+ WhichKeyFloat = { bg = C.alt_bg },
+}
+
+return Whichkey
diff --git a/.config/nvim/lua/dark/config.lua b/.config/nvim/lua/dark/config.lua
new file mode 100644
index 0000000..ebac710
--- /dev/null
+++ b/.config/nvim/lua/dark/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/.config/nvim/lua/dark/highlights.lua b/.config/nvim/lua/dark/highlights.lua
new file mode 100644
index 0000000..376b341
--- /dev/null
+++ b/.config/nvim/lua/dark/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 = 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 = C.bg },
+ Pmenu = { fg = C.white, bg = C.accent },
+ 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.blue, 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.gray },
+ VertSplit = { fg = C.bg, bg = C.accent },
+ CursorLine = { bg = C.alt_bg },
+ CursorColumn = { bg = C.alt_bg },
+ ColorColumn = { bg = C.alt_bg },
+ NormalFloat = { bg = C.alt_bg },
+ Visual = { bg = C.alt_bg },
+ 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.white },
+ MatchWord = { style = "underline" },
+ MatchParen = { fg = C.pale_purple, 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.hint_blue, bg = C.alt_bg },
+ IncSearch = { fg = C.hint_blue, bg = C.alt_bg },
+ Substitute = { fg = C.alt_bg, bg = C.gray_blue },
+ MoreMsg = { fg = C.cyan },
+ Question = { fg = C.cyan },
+ EndOfBuffer = { fg = C.bg },
+ NonText = { fg = C.bg },
+ Variable = { fg = C.white },
+ String = { fg = C.blue },
+ Character = { fg = C.light_green },
+ Constant = { fg = C.orange },
+ Number = { fg = C.red },
+ Boolean = { fg = C.red },
+ Float = { fg = C.red },
+ Identifier = { fg = C.white },
+ Function = { fg = C.purple },
+ Operator = { fg = C.orange },
+ Type = { fg = C.white },
+ StorageClass = { fg = C.yellow },
+ Structure = { fg = C.orange },
+ Typedef = { fg = C.purple },
+ Keyword = { fg = C.orange },
+ Statement = { fg = C.orange },
+ Conditional = { fg = C.orange },
+ Repeat = { fg = C.orange },
+ Label = { fg = C.orange },
+ Exception = { fg = C.orange },
+ Include = { fg = C.orange },
+ PreProc = { fg = C.orange },
+ Define = { fg = C.orange },
+ Macro = { fg = C.orange },
+ PreCondit = { fg = C.orange },
+ Special = { fg = C.orange },
+ SpecialChar = { fg = C.orange },
+ Tag = { fg = C.pale_purple },
+ Debug = { fg = C.red },
+ Delimiter = { fg = C.gray },
+ SpecialComment = { fg = C.blue },
+ 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.white, 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/.config/nvim/lua/dark/init.lua b/.config/nvim/lua/dark/init.lua
new file mode 100644
index 0000000..dd24d95
--- /dev/null
+++ b/.config/nvim/lua/dark/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 = "dark"
+
+local util = require "dark.util"
+Config = require "dark.config"
+C = require "dark.palette"
+local highlights = require "dark.highlights"
+local Treesitter = require "dark.Treesitter"
+local markdown = require "dark.markdown"
+local Whichkey = require "dark.Whichkey"
+local Git = require "dark.Git"
+local LSP = require "dark.LSP"
+
+local skeletons = {
+ highlights,
+ Treesitter,
+ markdown,
+ Whichkey,
+ Git,
+ LSP,
+}
+
+for _, skeleton in ipairs(skeletons) do
+ util.initialise(skeleton)
+end
diff --git a/.config/nvim/lua/dark/markdown.lua b/.config/nvim/lua/dark/markdown.lua
new file mode 100644
index 0000000..2b83e05
--- /dev/null
+++ b/.config/nvim/lua/dark/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/.config/nvim/lua/dark/palette.lua b/.config/nvim/lua/dark/palette.lua
new file mode 100644
index 0000000..5fd955c
--- /dev/null
+++ b/.config/nvim/lua/dark/palette.lua
@@ -0,0 +1,33 @@
+local colors = {
+ fg = "#F5F5F5",
+ bg = "#0A0A0A",
+ alt_bg = "#0D0D0D",
+ accent = "#383d45",
+ white = "#F5F5F5",
+ gray = "#505050",
+ light_gray = "#D0D0D0",
+ blue = "#A5D6FF",
+ gray_blue = "#5F819D",
+ cyan = "#5E8D87",
+ red = "#AA4142 ",
+ green = "#A1B56C",
+ light_green = "#A1B56C",
+ yellow = "#F4BF75",
+ orange = "#FFA557",
+ purple = "#AA749F",
+ pale_purple = "#A5D6FF",
+ magenta = "#AA759F",
+ cursor_fg = "#D0D0D0",
+ cursor_bg = "#151515",
+ sign_add = "#A1B56C",
+ sign_change = "#A5D6FF",
+ sign_delete = "#AA4142",
+ error_red = "#AC4142",
+ warning_orange = "#F4BF75",
+ info_yellow = "#F4BF75",
+ hint_blue = "#A5D6FF",
+ purple_test = "#ff00ff",
+ cyan_test = "#00ffff",
+}
+
+return colors
diff --git a/.config/nvim/lua/dark/util.lua b/.config/nvim/lua/dark/util.lua
new file mode 100644
index 0000000..dbac18a
--- /dev/null
+++ b/.config/nvim/lua/dark/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