Merge pull request #3 from polak-jan/main

Reworked the code, fixed built-in highlight groups
This commit is contained in:
Jan Polák 2023-12-07 05:20:28 +01:00 committed by GitHub
commit 5930500954
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 811 additions and 802 deletions

View File

@ -1,6 +1,12 @@
# flexoki-nvim # flexoki-neovim
A nvim adaptation of flexoki by Steph Ango (stephango.com/flexoki) Neovim adaptation of [Flexoki](stephango.com/flexoki) by Steph Ango
Currently still **work in progress** and missing support for event the most
common plugins. This will be fixed shortly. If you are using a plugin that
isn't supported please create an issue, or upvote an existing one, we will use
this to prioritize them.
> These aren't currently up to date
![Flexoki Dark for Neovim](screenshots/flexoki-neovim-dark.png) ![Flexoki Dark for Neovim](screenshots/flexoki-neovim-dark.png)
![Flexoki Light for Neovim](screenshots/flexoki-neovim-light.png) ![Flexoki Light for Neovim](screenshots/flexoki-neovim-light.png)

2
colors/flexoki-dark.lua Normal file
View File

@ -0,0 +1,2 @@
local flexoki = require('flexoki')
flexoki.colorscheme({ variant = 'dark' })

View File

@ -1,4 +0,0 @@
lua << EOF
local flexoki = require("flexoki")
flexoki.setup({})
EOF

2
colors/flexoki-light.lua Normal file
View File

@ -0,0 +1,2 @@
local flexoki = require('flexoki')
flexoki.colorscheme({ variant = 'light' })

View File

@ -1,4 +0,0 @@
lua << EOF
local flexoki = require("flexoki")
flexoki.setup({ variant = 'light' })
EOF

32
lua/flexoki/config.lua Normal file
View File

@ -0,0 +1,32 @@
---@alias Variant 'dark' | 'light'
local M = {}
---@class FlexokiOptions
M.options = {
---Set the desired variant: 'auto' will follow the vim background,
---defaulting to 'main' for dark and 'dawn' for light. To change the dark
---variant, use `options.dark_variant = 'moon'`.
---@type 'auto' | Variant
variant = 'auto',
---Set the desired dark variant: applies when `options.variant` is set to
---'auto' to match `vim.o.background`.
---@type Variant
dark_variant = 'dark',
---Set the desired light variant: applies when `options.variant` is set to
---'auto' to match `vim.o.background`
---@type Variant
light_variant = 'light',
---@type table<string, vim.api.keyset.highlight>
highlight_groups = {},
}
---@param options FlexokiOptions|nil
function M.extend(options)
M.options = vim.tbl_deep_extend('force', M.options, options or {})
end
return M

View File

@ -0,0 +1,13 @@
local palette = require('flexoki.palette')
local M = {}
M.groups = function()
local c = palette.palette()
--- @type table<string, vim.api.keyset.highlight>
return {
}
end
return M

View File

@ -0,0 +1,145 @@
local palette = require('flexoki.palette')
local M = {}
M.groups = function()
local c = palette.palette()
--- @type table<string, vim.api.keyset.highlight>
return {
["Normal"] = { fg = c['tx'], bg = c['bg'] },
["NormalNC"] = { fg = 'NONE', bg = 'NONE' },
["Underlined"] = { fg = 'NONE', bg = 'NONE', underline = true, },
["Bold"] = { fg = 'NONE', bg = 'NONE', bold = true, },
["Italic"] = { fg = 'NONE', bg = 'NONE', italic = true, },
["SpellBad"] = { fg = c['re-2'], bg = 'NONE', underline = true, },
["SpellCap"] = { fg = c['ye'], bg = 'NONE', underline = true, },
["SpellLocal"] = { fg = c['gr'], bg = 'NONE', underline = true, },
["SpellRare"] = { fg = c['pu'], bg = 'NONE', underline = true, },
["NonText"] = { fg = c['tx-3'], bg = 'NONE' },
["EndOfBuffer"] = { fg = 'NONE', bg = 'NONE' },
["Search"] = { fg = c['tx'], bg = c['cy-2'] },
["IncSearch"] = { fg = c['tx'], bg = c['cy-2'] },
["Substitute"] = { fg = 'NONE', bg = c['cy'] },
["DiffAdd"] = { fg = c['bg'], bg = c['gr'] },
["DiffChange"] = { fg = c['bg-2'], bg = c['pu'] },
["DiffDelete"] = { fg = c['bg-2'], bg = c['re'] },
["DiffText"] = { fg = c['bg'], bg = c['bl-2'] },
--#region Actual text highlighting
["Comment"] = { fg = c['tx-3'], bg = 'NONE', italic = true, },
["Constant"] = { fg = c['ye'], bg = 'NONE' },
["String"] = { fg = c['cy'], bg = 'NONE' },
["Character"] = { fg = c['cy'], bg = 'NONE' },
["Number"] = { fg = c['pu'], bg = 'NONE' },
["Boolean"] = { fg = c['ye'], bg = 'NONE' },
["Float"] = { fg = c['pu'], bg = 'NONE' },
["Identifier"] = { fg = c['bl'], bg = 'NONE' },
["Function"] = { fg = c['or'], bg = 'NONE' },
["Statement"] = { fg = 'NONE', bg = 'NONE' },
["Conditional"] = { link = 'Keyword' },
["Repeat"] = { link = 'Keyword' },
["Label"] = { link = 'Keyword' },
["Operator"] = { fg = c['tx-2'], bg = 'NONE' },
["Keyword"] = { fg = c['gr'], bg = 'NONE' },
["Exception"] = { link = 'Keyword' },
["PreProc"] = { fg = c['ma'], bg = 'NONE' },
["Include"] = { fg = c['re'], bg = 'NONE' },
["Define"] = { fg = c['ma'], bg = 'NONE' },
["Macro"] = { fg = c['ma'], bg = 'NONE' },
["PreCondit"] = { fg = c['ma'], bg = 'NONE' },
["Type"] = { fg = c['gr'], bg = 'NONE' },
["StorageClass"] = { fg = c['or'], bg = 'NONE' },
["Structure"] = { fg = c['or'], bg = 'NONE' },
["Typedef"] = { fg = c['or'], bg = 'NONE' },
["SpecialComment"] = { fg = c['tx'], bg = 'NONE' },
["Special"] = { fg = c['tx-2'], bg = 'NONE' },
["SpecialChar"] = { fg = c['ma'], bg = 'NONE' },
["Tag"] = { fg = c['cy'], bg = 'NONE' },
["Debug"] = { fg = c['ma'], bg = 'NONE' },
["Delimiter"] = { link = 'Special' },
["Error"] = { fg = c['re'], bg = c['bg'], bold = true, },
["Todo"] = { fg = c['ma'], bg = 'NONE', bold = true, },
--#endregion
["SignColumn"] = { fg = 'NONE', bg = 'NONE' },
["MsgArea"] = { fg = 'NONE', bg = c['bg-2'] },
["ModeMsg"] = { fg = 'NONE', bg = c['bg-2'] },
["MsgSeparator"] = { fg = 'NONE', bg = c['bg-2'] },
-- Pop-up menu
["Pmenu"] = { fg = c['tx-2'], bg = c['bg-2'], sp = 'NONE', blend = 50, },
["PmenuSel"] = { fg = c['tx'], bg = c['cy-2'] },
["PmenuSbar"] = { fg = 'NONE', bg = c['ui'] },
["PmenuThumb"] = { fg = 'NONE', bg = c['ui-3'] },
["TabLine"] = { fg = c['tx-2'], bg = c['ui'] },
["TabLineSel"] = { fg = c['tx'], bg = c['ui-3'] },
["TabLineFill"] = { fg = c['line'], bg = c['ui'] },
["StatusLine"] = { fg = c['tx'], bg = c['ui-3'] },
["StatusLineNC"] = { fg = c['tx-2'], bg = c['ui'] },
["StatusLineTerm"] = { fg = c['tx-2'], bg = c['ui-3'] },
["StatusLineTermNC"] = { fg = c['tx-2'], bg = c['ui-3'] },
["WinBar"] = { fg = c['tx'], bg = c['ui-3'] },
["WinBarNC"] = { fg = c['tx-2'], bg = c['ui'] },
["WildMenu"] = { fg = 'NONE', bg = c['cy-2'] },
["Folded"] = { fg = c['ui-2'], bg = c['alt_bg'] },
["FoldColumn"] = { fg = c['ui-2'], bg = c['alt_bg'] },
["LineNr"] = { fg = c['tx-3'], bg = 'NONE' },
["FloatBorder"] = { fg = c['tx-3'], bg = c['bg-2'] },
["Whitespace"] = { fg = c['tx-3'], bg = 'NONE' },
["WinSeparator"] = { fg = c['ui'], bg = c['ui'] },
["WinSeparatorNC"] = { fg = c['ui-3'], bg = c['ui-3'] },
["NormalFloat"] = { fg = c['tx-2'], bg = c['bg-2'] },
["WarningMsg"] = { fg = c['re'], bg = c['bg'] },
["QuickFixLine"] = { fg = 'NONE', bg = c['ui2_blue'] },
-- The MatchWord groups don't actually exist, but we define them here
-- to link to them in plugin specific files instead of redefining the
-- same group multiple times
["MatchWord"] = { fg = 'NONE', bg = c['ui'], underline = true, },
["MatchParen"] = { fg = 'NONE', bg = c['ui'], underline = true, },
["MatchWordCur"] = { fg = 'NONE', bg = 'NONE', underline = true, },
["MatchParenCur"] = { fg = 'NONE', bg = 'NONE', underline = true, },
["Conceal"] = { fg = 'NONE', bg = 'NONE' },
["Directory"] = { fg = c['bl'], bg = 'NONE' },
["SpecialKey"] = { fg = c['blue'], bg = 'NONE', bold = true, },
["Title"] = { fg = c['bl'], bg = 'NONE', bold = true, },
["ErrorMsg"] = { fg = c['re-2'], bg = 'NONE', bold = true, },
["MoreMsg"] = { fg = c['orange'], bg = 'NONE' },
["Question"] = { fg = c['orange'], bg = 'NONE' },
-- Cursor and selection related
["Cursor"] = { fg = c['bg'], bg = c['tx'] },
["lCursor"] = { fg = c['bg'], bg = c['tx'] },
["CursorLine"] = { fg = 'NONE', bg = c['bg-2'] },
["CursorLineNr"] = { fg = c['tx'], bg = 'NONE', bold = true, },
["CursorColumn"] = { fg = 'NONE', bg = c['bg-2'] },
["ColorColumn"] = { fg = 'NONE', bg = c['ui'] },
["CursorIM"] = { fg = c['bg'], bg = c['tx'] },
["TermCursor"] = { fg = c['bg'], bg = c['tx'] },
["TermCursorNC"] = { fg = c['bg'], bg = c['tx-3'] },
["Visual"] = { fg = 'NONE', bg = c['ui'] },
["VisualNOS"] = { fg = 'NONE', bg = c['ui-2'] },
}
end
return M

View File

@ -0,0 +1,28 @@
local palette = require('flexoki.palette')
local M = {}
M.groups = function()
local c = palette.palette()
--- @type table<string, vim.api.keyset.highlight>
return {
["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, bold = true, },
["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, bold = true, },
["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, bold = true, },
}
end
return M

View File

@ -0,0 +1,41 @@
local palette = require('flexoki.palette')
local M = {}
M.groups = function()
local c = palette.palette()
--- @type table<string, vim.api.keyset.highlight>
return {
["CmpItemAbbrDeprecated"] = { fg = c.gray, bg = 'NONE', strikethrough = true, },
["CmpItemAbbrMatch"] = { fg = c.ui3_blue, bg = 'NONE' },
["CmpItemAbbrMatchFuzzy"] = { fg = c.ui3_blue, bg = 'NONE' },
["CmpItemKindFunction"] = { fg = c.blue, bg = 'NONE' },
["CmpItemKindMethod"] = { fg = c.blue, bg = 'NONE' },
["CmpItemKindConstructor"] = { fg = c.cyan, bg = 'NONE' },
["CmpItemKindClass"] = { fg = c.cyan, bg = 'NONE' },
["CmpItemKindEnum"] = { fg = c.cyan, bg = 'NONE' },
["CmpItemKindEvent"] = { fg = c.yellow, bg = 'NONE' },
["CmpItemKindInterface"] = { fg = c.cyan, bg = 'NONE' },
["CmpItemKindStruct"] = { fg = c.cyan, bg = 'NONE' },
["CmpItemKindVariable"] = { fg = c.red, bg = 'NONE' },
["CmpItemKindField"] = { fg = c.red, bg = 'NONE' },
["CmpItemKindProperty"] = { fg = c.red, bg = 'NONE' },
["CmpItemKindEnumMember"] = { fg = c.orange, bg = 'NONE' },
["CmpItemKindConstant"] = { fg = c.orange, bg = 'NONE' },
["CmpItemKindKeyword"] = { fg = c.purple, bg = 'NONE' },
["CmpItemKindModule"] = { fg = c.cyan, bg = 'NONE' },
["CmpItemKindValue"] = { fg = c.fg, bg = 'NONE' },
["CmpItemKindUnit"] = { fg = c.fg, bg = 'NONE' },
["CmpItemKindText"] = { fg = c.fg, bg = 'NONE' },
["CmpItemKindSnippet"] = { fg = c.yellow, bg = 'NONE' },
["CmpItemKindFile"] = { fg = c.fg, bg = 'NONE' },
["CmpItemKindFolder"] = { fg = c.fg, bg = 'NONE' },
["CmpItemKindColor"] = { fg = c.fg, bg = 'NONE' },
["CmpItemKindReference"] = { fg = c.fg, bg = 'NONE' },
["CmpItemKindOperator"] = { fg = c.fg, bg = 'NONE' },
["CmpItemKindTypeParameter"] = { fg = c.red, bg = 'NONE' },
}
end
return M

View File

@ -0,0 +1,16 @@
local palette = require('flexoki.palette')
local M = {}
M.groups = function()
local c = palette.palette()
--- @type table<string, vim.api.keyset.highlight>
return {
["DashboardHeader"] = { fg = c.blue, bg = 'NONE' },
["DashboardCenter"] = { fg = c.purple, bg = 'NONE' },
["DashboardFooter"] = { fg = c.cyan, bg = 'NONE' },
}
end
return M

View File

@ -0,0 +1,19 @@
local palette = require('flexoki.palette')
local M = {}
M.groups = function()
local c = palette.palette()
--- @type table<string, vim.api.keyset.highlight>
return {
["SignAdd"] = { fg = c.sign_add, bg = 'NONE' },
["SignChange"] = { fg = c.sign_change, bg = 'NONE' },
["SignDelete"] = { fg = c.sign_delete, bg = 'NONE' },
["GitSignsAdd"] = { fg = c.sign_add, bg = 'NONE' },
["GitSignsChange"] = { fg = c.sign_change, bg = 'NONE' },
["GitSignsDelete"] = { fg = c.sign_delete, bg = 'NONE' },
}
end
return M

View File

@ -0,0 +1,18 @@
local palette = require('flexoki.palette')
local M = {}
M.groups = function()
local c = palette.palette()
--- @type table<string, vim.api.keyset.highlight>
return {
["IndentBlanklineContextChar"] = { fg = c.context, bg = 'NONE' },
["IndentBlanklineContextStart"] = { fg = 'NONE', bg = 'NONE', underline = true, },
["IndentBlanklineChar"] = { fg = c.dark_gray, bg = 'NONE' },
["IndentBlanklineSpaceChar"] = { fg = c.cyan_test, bg = 'NONE' },
["IndentBlanklineSpaceCharBlankline"] = { fg = c.info_yellow, bg = 'NONE' },
}
end
return M

View File

@ -0,0 +1,34 @@
local M = {}
M.groups = function ()
-- This could be done dynamically by looking for all files, but this approach is fine and is safer
local modules = {
require('flexoki.highlights.base').groups(),
-- require('flexoki.highlights.buffer').groups(),
-- require('flexoki.highlights.cmp').groups(),
-- require('flexoki.highlights.dashboard').groups(),
-- require('flexoki.highlights.git').groups(),
-- require('flexoki.highlights.indent-blank-line').groups(),
-- require('flexoki.highlights.lsp').groups(),
-- require('flexoki.highlights.markdown').groups(),
-- require('flexoki.highlights.nvimtree').groups(),
-- require('flexoki.highlights.telescope').groups(),
-- require('flexoki.highlights.treesitter').groups(),
-- require('flexoki.highlights.whichkey').groups(),
}
--- @type table<string, vim.api.keyset.highlight>
local result = {}
-- Just takes the list of "modules" from above and combines them all into a single table/array
for _, groups in pairs(modules) do
for highlightGroup, group in pairs(groups) do
result[highlightGroup] = group
end
end
return result
end
return M

View File

@ -0,0 +1,53 @@
local palette = require('flexoki.palette')
local M = {}
M.groups = function()
local c = palette.palette()
--- @type table<string, vim.api.keyset.highlight>
return {
["LspDiagnosticsDefaultError"] = { fg = c.error_red, bg = 'NONE' },
["LspDiagnosticsDefaultWarning"] = { fg = c.warning_orange, bg = 'NONE' },
["LspDiagnosticsDefaultInformation"] = { fg = c.info_yellow, bg = 'NONE' },
["LspDiagnosticsDefaultInfo"] = { fg = c.info_yellow, bg = 'NONE' },
["LspDiagnosticsDefaultHint"] = { fg = c.hint_blue, bg = 'NONE' },
["LspDiagnosticsVirtualTextError"] = { fg = c.error_red, bg = 'NONE' },
["LspDiagnosticsVirtualTextWarning"] = { fg = c.warning_orange, bg = 'NONE' },
["LspDiagnosticsVirtualTextInformation"] = { fg = c.info_yellow, bg = 'NONE' },
["LspDiagnosticsVirtualTextInfo"] = { fg = c.info_yellow, bg = 'NONE' },
["LspDiagnosticsVirtualTextHint"] = { fg = c.hint_blue, bg = 'NONE' },
["LspDiagnosticsFloatingError"] = { fg = c.error_red, bg = 'NONE' },
["LspDiagnosticsFloatingWarning"] = { fg = c.warning_orange, bg = 'NONE' },
["LspDiagnosticsFloatingInformation"] = { fg = c.info_yellow, bg = 'NONE' },
["LspDiagnosticsFloatingInfo"] = { fg = c.info_yellow, bg = 'NONE' },
["LspDiagnosticsFloatingHint"] = { fg = c.hint_blue, bg = 'NONE' },
["DiagnosticSignError"] = { fg = c.error_red, bg = 'NONE' },
["DiagnosticSignWarning"] = { fg = c.warning_orange, bg = 'NONE' },
["DiagnosticSignInformation"] = { fg = c.info_yellow, bg = 'NONE' },
["DiagnosticSignInfo"] = { fg = c.info_yellow, bg = 'NONE' },
["DiagnosticSignHint"] = { fg = c.hint_blue, bg = 'NONE' },
["LspDiagnosticsSignError"] = { fg = c.error_red, bg = 'NONE' },
["LspDiagnosticsSignWarning"] = { fg = c.warning_orange, bg = 'NONE' },
["LspDiagnosticsSignInformation"] = { fg = c.info_yellow, bg = 'NONE' },
["LspDiagnosticsSignInfo"] = { fg = c.info_yellow, bg = 'NONE' },
["LspDiagnosticsSignHint"] = { fg = c.hint_blue, bg = 'NONE' },
["LspDiagnosticsError"] = { fg = c.error_red, bg = 'NONE' },
["LspDiagnosticsWarning"] = { fg = c.warning_orange, bg = 'NONE' },
["LspDiagnosticsInformation"] = { fg = c.info_yellow, bg = 'NONE' },
["LspDiagnosticsInfo"] = { fg = c.info_yellow, bg = 'NONE' },
["LspDiagnosticsHint"] = { fg = c.hint_blue, bg = 'NONE' },
["LspDiagnosticsUnderlineError"] = { fg = 'NONE', bg = 'NONE', underline = true, },
["LspDiagnosticsUnderlineWarning"] = { fg = 'NONE', bg = 'NONE', underline = true, },
["LspDiagnosticsUnderlineInformation"] = { fg = 'NONE', bg = 'NONE', underline = true, },
["LspDiagnosticsUnderlineInfo"] = { fg = 'NONE', bg = 'NONE', underline = true, },
["LspDiagnosticsUnderlineHint"] = { fg = 'NONE', bg = 'NONE', underline = true, },
["LspReferenceRead"] = { fg = 'NONE', bg = '#2e303b' },
["LspReferenceText"] = { fg = 'NONE', bg = '#2e303b' },
["LspReferenceWrite"] = { fg = 'NONE', bg = '#2e303b' },
["LspCodeLens"] = { fg = c.context, bg = 'NONE', italic = true, },
["LspCodeLensSeparator"] = { fg = c.context, bg = 'NONE', italic = true, },
}
end
return M

View File

@ -0,0 +1,40 @@
local palette = require('flexoki.palette')
local M = {}
M.groups = function()
local c = palette.palette()
--- @type table<string, vim.api.keyset.highlight>
return {
["markdownBlockquote"] = { fg = c.green, bg = 'NONE' },
["markdownCode"] = { fg = c.orange, bg = 'NONE' },
["markdownCodeBlock"] = { fg = c.orange, bg = 'NONE' },
["markdownCodeDelimiter"] = { fg = c.orange, bg = 'NONE' },
["markdownH1"] = { fg = c.blue, bg = 'NONE' },
["markdownH2"] = { fg = c.blue, bg = 'NONE' },
["markdownH3"] = { fg = c.blue, bg = 'NONE' },
["markdownH4"] = { fg = c.blue, bg = 'NONE' },
["markdownH5"] = { fg = c.blue, bg = 'NONE' },
["markdownH6"] = { fg = c.blue, bg = 'NONE' },
["markdownHeadingDelimiter"] = { fg = c.blue, bg = 'NONE' },
["markdownHeadingRule"] = { fg = c.fg, bg = 'NONE', bold = true, },
["markdownId"] = { fg = c.purple, bg = 'NONE' },
["markdownIdDeclaration"] = { fg = c.blue, bg = 'NONE' },
["markdownIdDelimiter"] = { fg = c.light_gray, bg = 'NONE' },
["markdownLinkDelimiter"] = { fg = c.light_gray, bg = 'NONE' },
["markdownBold"] = { fg = c.blue, bg = 'NONE', bold = true, },
["markdownItalic"] = { fg = 'NONE', bg = 'NONE', italic = true, },
["markdownBoldItalic"] = { fg = c.yellow, bg = 'NONE', bold = true, italic = true, },
["markdownListMarker"] = { fg = c.blue, bg = 'NONE' },
["markdownOrderedListMarker"] = { fg = c.blue, bg = 'NONE' },
["markdownRule"] = { fg = c.accent, bg = 'NONE' },
["markdownUrl"] = { fg = c.cyan, bg = 'NONE', underline = true, },
["markdownLinkText"] = { fg = c.blue, bg = 'NONE' },
["markdownFootnote"] = { fg = c.orange, bg = 'NONE' },
["markdownFootnoteDefinition"] = { fg = c.orange, bg = 'NONE' },
["markdownEscape"] = { fg = c.yellow, bg = 'NONE' },
}
end
return M

View File

View File

@ -0,0 +1,35 @@
local palette = require('flexoki.palette')
local M = {}
M.groups = function()
local c = palette.palette()
--- @type table<string, vim.api.keyset.highlight>
return {
["NvimTreeFolderIcon"] = { fg = c.folder_blue, bg = 'NONE' },
["NvimTreeIndentMarker"] = { fg = '#c5c5c5', bg = 'NONE' },
["NvimTreeNormal"] = { fg = c.light_gray, bg = c.tree_gray },
["NvimTreeVertSplit"] = { fg = c.alt_bg, bg = c.alt_bg },
["NvimTreeFolderName"] = { fg = c.folder_blue, bg = 'NONE' },
["NvimTreeOpenedFolderName"] = { fg = c.folder_blue, bg = 'NONE', bold = true, italic = true, },
["NvimTreeEmptyFolderName"] = { fg = c.gray, bg = 'NONE', italic = true, },
["NvimTreeGitIgnored"] = { fg = c.gray, bg = 'NONE', italic = true, },
["NvimTreeImageFile"] = { fg = c.light_gray, bg = 'NONE' },
["NvimTreeSpecialFile"] = { fg = c.orange, bg = 'NONE' },
["NvimTreeEndOfBuffer"] = { fg = c.tree_gray, bg = 'NONE' },
["NvimTreeCursorLine"] = { fg = 'NONE', bg = '#282b37' },
["NvimTreeGitignoreIcon"] = { fg = '#E64A19', bg = 'NONE' },
["NvimTreeGitStaged"] = { fg = c.tree_sign_add, bg = 'NONE' },
["NvimTreeGitNew"] = { fg = c.tree_sign_add, bg = 'NONE' },
["NvimTreeGitRenamed"] = { fg = c.tree_sign_add, bg = 'NONE' },
["NvimTreeGitDeleted"] = { fg = c.sign_delete, bg = 'NONE' },
["NvimTreeGitMerge"] = { fg = c.tree_sign_change, bg = 'NONE' },
["NvimTreeGitDirty"] = { fg = c.tree_sign_change, bg = 'NONE' },
["NvimTreeSymlink"] = { fg = c.cyan, bg = 'NONE' },
["NvimTreeRootFolder"] = { fg = c.fg, bg = 'NONE', bold = true, },
["NvimTreeExecFile"] = { fg = '#9FBA89', bg = 'NONE' },
}
end
return M

View File

@ -0,0 +1,16 @@
local palette = require('flexoki.palette')
local M = {}
M.groups = function()
local c = palette.palette()
--- @type table<string, vim.api.keyset.highlight>
return {
["TelescopeSelection"] = { fg = c.hint_blue, bg = 'NONE' },
["TelescopeMatching"] = { fg = c.info_yellow, bg = 'NONE', bold = true, },
["TelescopeBorder"] = { fg = c.blue, bg = c.bg },
}
end
return M

View File

@ -0,0 +1,68 @@
local palette = require('flexoki.palette')
local M = {}
M.groups = function()
local c = palette.palette()
--- @type table<string, vim.api.keyset.highlight>
return {
["TSComment"] = { link = 'Comment' },
["TSAnnotation"] = { fg = c.blue, bg = 'NONE' },
["TSAttribute"] = { fg = c.cyan, bg = 'NONE' },
["TSConstructor"] = { fg = c.cyan, bg = 'NONE' },
["TSType"] = { fg = c.cyan, bg = 'NONE' },
["TSTypeBuiltin"] = { fg = c.orange, bg = 'NONE' },
["TSConditional"] = { fg = c.yellow, bg = 'NONE' },
["TSException"] = { fg = c.purple, bg = 'NONE' },
["TSInclude"] = { fg = c.purple, bg = 'NONE' },
["TSKeywordReturn"] = { fg = c.purple, bg = 'NONE' },
["TSKeyword"] = { fg = c.purple, bg = 'NONE' },
["TSKeywordFunction"] = { fg = c.purple, bg = 'NONE' },
["TSLabel"] = { fg = c.light_blue, bg = 'NONE' },
["TSNamespace"] = { fg = c.cyan, bg = 'NONE' },
["TSRepeat"] = { fg = c.yellow, bg = 'NONE' },
["TSConstant"] = { fg = c.orange, bg = 'NONE' },
["TSConstBuiltin"] = { fg = c.orange, bg = 'NONE' },
["TSFloat"] = { fg = c.orange, bg = 'NONE' },
["TSNumber"] = { fg = c.orange, bg = 'NONE' },
["TSBoolean"] = { fg = c.orange, bg = 'NONE' },
["TSCharacter"] = { fg = c.green, bg = 'NONE' },
["TSError"] = { fg = c.error_red, bg = 'NONE' },
["TSFunction"] = { fg = c.blue, bg = 'NONE' },
["TSFuncBuiltin"] = { fg = c.blue, bg = 'NONE' },
["TSMethod"] = { fg = c.blue, bg = 'NONE' },
["TSConstMacro"] = { fg = c.orange, bg = 'NONE' },
["TSFuncMacro"] = { fg = c.blue, bg = 'NONE' },
["TSVariable"] = { fg = c.light_blue, bg = 'NONE' },
["TSVariableBuiltin"] = { fg = c.red, bg = 'NONE' },
["TSProperty"] = { fg = c.red, bg = 'NONE' },
["TSField"] = { fg = c.fg, bg = 'NONE' },
["TSParameter"] = { fg = c.red, bg = 'NONE' },
["TSParameterReference"] = { fg = c.red, bg = 'NONE' },
["TSSymbol"] = { fg = c.light_blue, bg = 'NONE' },
["TSText"] = { fg = c.alt_fg, bg = 'NONE' },
["TSOperator"] = { fg = c.alt_fg, bg = 'NONE' },
["TSPunctDelimiter"] = { fg = c.alt_fg, bg = 'NONE' },
["TSTagDelimiter"] = { fg = c.alt_fg, bg = 'NONE' },
["TSTagAttribute"] = { fg = c.orange, bg = 'NONE' },
["TSPunctBracket"] = { fg = c.alt_fg, bg = 'NONE' },
["TSPunctSpecial"] = { fg = c.purple, bg = 'NONE' },
["TSString"] = { fg = c.green, bg = 'NONE' },
["TSStringRegex"] = { fg = c.green, bg = 'NONE' },
["TSStringEscape"] = { fg = c.green, bg = 'NONE' },
["TSTag"] = { fg = c.blue, bg = 'NONE' },
["TSEmphasis"] = { fg = 'NONE', bg = 'NONE', italic = true, },
["TSUnderline"] = { fg = 'NONE', bg = 'NONE', underline = true, },
["TSTitle"] = { fg = c.fg, bg = 'NONE', },
["TSLiteral"] = { fg = c.orange, bg = 'NONE' },
["TSURI"] = { fg = c.orange, bg = 'NONE', underline = true, },
["TSKeywordOperator"] = { fg = c.purple, bg = 'NONE' },
["TSStructure"] = { fg = c.light_blue, bg = 'NONE' },
["TSStrong"] = { fg = c.blue, bg = 'NONE', bold = true, },
["TSQueryLinterError"] = { fg = c.warning_orange, bg = 'NONE' },
["TreesitterContext"] = { fg = 'NONE', bg = c.tree_gray },
}
end
return M

View File

@ -0,0 +1,18 @@
local palette = require('flexoki.palette')
local M = {}
M.groups = function()
local c = palette.palette()
--- @type table<string, vim.api.keyset.highlight>
return {
["WhichKey"] = { fg = c.purple, bg = 'NONE' },
["WhichKeySeparator"] = { fg = c.green, bg = 'NONE' },
["WhichKeyGroup"] = { fg = c.blue, bg = 'NONE' },
["WhichKeyDesc"] = { fg = c.light_blue, bg = 'NONE' },
["WhichKeyFloat"] = { fg = 'NONE', bg = c.dark },
}
end
return M

View File

@ -1,19 +1,28 @@
local config = require('flexoki.config')
local M = {} local M = {}
M.setup = function(opts) ---Load the Flexoki colorscheme
local theme = opts.variant == 'light' and require('flexoki.theme-light') or require('flexoki.theme') ---@param opts FlexokiOptions
M.colorscheme = function(opts)
config.extend(opts)
vim.o.termguicolors = true
if vim.g.colors_name then
vim.cmd('hi clear') vim.cmd('hi clear')
vim.o.background = 'dark'
if vim.fn.exists('syntax_on') then
vim.cmd('syntax reset') vim.cmd('syntax reset')
end end
vim.o.termguicolors = true
vim.g.colors_name = 'flexoki' vim.g.colors_name = 'flexoki'
theme.set_highlights() require('flexoki.theme').set_highlights(opts)
end
---Set up the Flexoki colorscheme
---@param opts FlexokiOptions
M.setup = function (opts)
config.extend(opts)
end end
return M return M

View File

@ -1,54 +0,0 @@
local colors = {
fg = "#100F0F",
bg = "#FFFCF0",
alt_fg = "#100F0F",
alt_bg = "#FFFCF0",
dark = "#100F0F",
accent = "#575653",
popup_back = "#282726",
search_orange = "#DA702C",
line = "#282726",
search_blue = "#3AA99F",
white = "#CECDC3",
gray = "#E6E4D9",
dark_gray = "#B7B5AC",
context = "#878580",
light_gray = "#878580",
tree_gray = "#FFFCF0",
blue = "#4385BE",
vivid_blue = "#4385BE",
dark_blue = "#4385BE",
folder_blue = "#4385BE",
light_blue = "#4385BE",
green = "#879A39",
cyan = "#3AA99F",
light_green = "#DA702C",
red = "#D14D41",
orange = "#DA702C",
light_red = "#D14D41",
yellow = "#D0A215",
purple = "#8B7EC8",
magenta = "#CE5D97",
cursor_fg = "#100F0F",
cursor_bg = "#F2F0E5",
sign_add = "#879A39",
sign_change = "#4385BE",
sign_delete = "#D14D41",
tree_sign_add = "#879A39",
tree_sign_change = "#D0A215",
error_red = "#D14D41",
warning_orange = "#DA702C",
info_yellow = "#D0A215",
hint_blue = "#4385BE",
success_green = "#879A39",
purple_test = "#8B7EC8",
cyan_test = "#3AA99F",
ui_blue = "#4385BE",
ui2_blue = "#4385BE",
ui3_blue = "#4385BE",
ui4_blue = "#4385BE",
ui_orange = "#DA702C",
ui_purple = "#8B7EC8",
}
return colors

View File

@ -1,54 +1,120 @@
local colors = { local config = require('flexoki.config')
fg = "#CECDC3",
bg = "#100F0F", local M = {}
alt_fg = "#878580",
alt_bg = "#1C1B1A", local base_colors = {
dark = "#100F0F", ['flexoki-black'] = '#100F0F',
accent = "#575653", ['flexoki-paper'] = '#FFFCF0',
popup_back = "#282726",
search_orange = "#BC5215", ['flexoki-950'] = '#1C1B1A',
line = "#282726", ['flexoki-900'] = '#282726',
search_blue = "#24837B", ['flexoki-850'] = '#343331',
white = "#CECDC3", ['flexoki-800'] = '#403E3C',
gray = "#878580", ['flexoki-700'] = '#575653',
dark_gray = "#575653", ['flexoki-600'] = '#6F6E69',
context = "#878580", ['flexoki-500'] = '#878580',
light_gray = "#878580", ['flexoki-300'] = '#B7B5AC',
tree_gray = "#282726", ['flexoki-200'] = '#CECDC3',
blue = "#205EA6", ['flexoki-150'] = '#DAD8CE',
vivid_blue = "#4385BE", ['flexoki-100'] = '#E6E4D9',
dark_blue = "#205EA6", ['flexoki-50'] = '#F2F0E5',
folder_blue = "#205EA6",
light_blue = "#4385BE", ['flexoki-red-600'] = '#AF3029',
green = "#66800B", ['flexoki-red-400'] = '#D14D41',
cyan = "#24837B",
light_green = "#BC5215", ['flexoki-orange-600'] = '#BC5215',
red = "#AF3029", ['flexoki-orange-400'] = '#DA702C',
orange = "#BC5215",
light_red = "#AF3029", ['flexoki-yellow-900'] = '#4D3A0B',
yellow = "#AD8301", ['flexoki-yellow-600'] = '#AD8301',
purple = "#5E409D", ['flexoki-yellow-400'] = '#D0A215',
magenta = "#A02F6F", ['flexoki-yellow-100'] = '#FCEEB8',
cursor_fg = "#575653",
cursor_bg = "#878580", ['flexoki-green-600'] = '#66800B',
sign_add = "#66800B", ['flexoki-green-400'] = '#879A39',
sign_change = "#205EA6",
sign_delete = "#AF3029", ['flexoki-cyan-950'] = '#142625',
tree_sign_add = "#66800B", ['flexoki-cyan-600'] = '#24837B',
tree_sign_change = "#AD8301", ['flexoki-cyan-400'] = '#3AA99F',
error_red = "#AF3029", ['flexoki-cyan-50'] = '#EBF2E7',
warning_orange = "#BC5215",
info_yellow = "#AD8301", ['flexoki-blue-600'] = '#205EA6',
hint_blue = "#205EA6", ['flexoki-blue-400'] = '#4385BE',
success_green = "#66800B",
purple_test = "#5E409D", ['flexoki-purple-600'] = '#5E409D',
cyan_test = "#24837B", ['flexoki-purple-400'] = '#8B7EC8',
ui_blue = "#205EA6",
ui2_blue = "#205EA6", ['flexoki-magenta-600'] = '#A02F6F',
ui3_blue = "#205EA6", ['flexoki-magenta-400'] = '#CE5D97',
ui4_blue = "#205EA6",
ui_orange = "#BC5215",
ui_purple = "#5E409D",
} }
return colors local variants = {
dark = {
_name = 'dark',
['bg'] = base_colors['flexoki-black'],
['bg-2'] = base_colors['flexoki-950'],
['ui'] = base_colors['flexoki-900'],
['ui-2'] = base_colors['flexoki-850'],
['ui-3'] = base_colors['flexoki-800'],
['tx-3'] = base_colors['flexoki-700'],
['tx-2'] = base_colors['flexoki-500'],
['tx'] = base_colors['flexoki-200'],
['re'] = base_colors['flexoki-red-400'],
['re-2'] = base_colors['flexoki-red-600'],
['or'] = base_colors['flexoki-orange-400'],
['or-2'] = base_colors['flexoki-orange-600'],
['ye'] = base_colors['flexoki-yellow-400'],
['ye-2'] = base_colors['flexoki-yellow-600'],
['gr'] = base_colors['flexoki-green-400'],
['gr-2'] = base_colors['flexoki-green-600'],
['cy'] = base_colors['flexoki-cyan-400'],
['cy-2'] = base_colors['flexoki-cyan-600'],
['bl'] = base_colors['flexoki-blue-400'],
['bl-2'] = base_colors['flexoki-blue-600'],
['pu'] = base_colors['flexoki-purple-400'],
['pu-2'] = base_colors['flexoki-purple-600'],
['ma'] = base_colors['flexoki-magenta-400'],
['ma-2'] = base_colors['flexoki-magenta-600'],
},
light = {
_name = 'light',
['bg'] = base_colors['flexoki-paper'],
['bg-2'] = base_colors['flexoki-50'],
['ui'] = base_colors['flexoki-100'],
['ui-2'] = base_colors['flexoki-150'],
['ui-3'] = base_colors['flexoki-200'],
['tx-3'] = base_colors['flexoki-300'],
['tx-2'] = base_colors['flexoki-600'],
['tx'] = base_colors['flexoki-black'],
['re'] = base_colors['flexoki-red-600'],
['re-2'] = base_colors['flexoki-red-400'],
['or'] = base_colors['flexoki-orange-600'],
['or-2'] = base_colors['flexoki-orange-400'],
['ye'] = base_colors['flexoki-yellow-600'],
['ye-2'] = base_colors['flexoki-yellow-400'],
['gr'] = base_colors['flexoki-green-600'],
['gr-2'] = base_colors['flexoki-green-400'],
['cy'] = base_colors['flexoki-cyan-600'],
['cy-2'] = base_colors['flexoki-cyan-400'],
['bl'] = base_colors['flexoki-blue-600'],
['bl-2'] = base_colors['flexoki-blue-400'],
['pu'] = base_colors['flexoki-purple-600'],
['pu-2'] = base_colors['flexoki-purple-400'],
['ma'] = base_colors['flexoki-magenta-600'],
['ma-2'] = base_colors['flexoki-magenta-400'],
}
}
M.palette = function ()
if config.options.variant == 'auto' then
if vim.o.background == 'dark' then
return variants[config.options.dark_variant]
else
return variants[config.options.light_variant]
end
else
return variants[config.options.variant]
end
end
return M

View File

@ -1,344 +0,0 @@
local c = require('flexoki.palette-light')
local hl = vim.api.nvim_set_hl
local theme = {}
theme.set_highlights = function()
-- highlights
hl(0, "Normal", { fg = c.fg, bg = c.bg })
hl(0, "SignColumn", { fg = 'NONE', bg = c.bg })
hl(0, "MsgArea", { fg = c.fg, bg = c.bg })
hl(0, "ModeMsg", { fg = c.fg, bg = c.bg })
hl(0, "MsgSeparator", { fg = c.fg, bg = c.bg })
hl(0, "SpellBad", { fg = c.light_red, bg = 'NONE', underline=true, })
hl(0, "SpellCap", { fg = c.yellow, bg = 'NONE', underline=true, })
hl(0, "SpellLocal", { fg = c.green, bg = 'NONE', underline=true, })
hl(0, "SpellRare", { fg = c.purple, bg = 'NONE', underline=true, })
hl(0, "NormalNC", { fg = c.fg, bg = c.bg })
hl(0, "Pmenu", { fg = c.light_gray, bg = c.tree_gray, sp = 'NONE', blend=50, })
hl(0, "PmenuSel", { fg = 'NONE', bg = c.ui2_blue })
hl(0, "WildMenu", { fg = c.fg, bg = c.ui2_blue })
hl(0, "CursorLineNr", { fg = c.light_gray, bg = 'NONE', bold=true, })
hl(0, "Comment", { fg = c.dark_gray, bg = 'NONE', italic=true, })
hl(0, "Folded", { fg = c.accent, bg = c.alt_bg })
hl(0, "FoldColumn", { fg = c.accent, bg = c.alt_bg })
hl(0, "LineNr", { fg = c.gray, bg = 'NONE' })
hl(0, "FloatBorder", { fg = c.gray, bg = c.alt_bg })
hl(0, "Whitespace", { fg = c.bg, bg = 'NONE' })
hl(0, "VertSplit", { fg = c.gray, bg = c.bg })
hl(0, "CursorLine", { fg = 'NONE', bg = c.cursor_bg })
hl(0, "CursorColumn", { fg = 'NONE', bg = c.cursor_bg })
hl(0, "ColorColumn", { fg = 'NONE', bg = c.cursor_bg })
hl(0, "NormalFloat", { fg = 'NONE', bg = c.dark })
hl(0, "Visual", { fg = 'NONE', bg = c.gray })
hl(0, "VisualNOS", { fg = 'NONE', bg = c.alt_bg })
hl(0, "WarningMsg", { fg = c.error_red, bg = c.bg })
hl(0, "DiffAdd", { fg = c.alt_bg, bg = c.sign_add })
hl(0, "DiffChange", { fg = c.alt_bg, bg = c.sign_change, underline=true, })
hl(0, "DiffDelete", { fg = c.alt_bg, bg = c.sign_delete })
hl(0, "QuickFixLine", { fg = 'NONE', bg = c.ui2_blue })
hl(0, "PmenuSbar", { fg = 'NONE', bg = c.alt_bg })
hl(0, "PmenuThumb", { fg = 'NONE', bg = c.gray })
hl(0, "MatchWord", { fg = 'NONE', bg = 'NONE', underline=true, })
hl(0, "MatchParen", { fg = c.hint_blue, bg = c.bg, underline=true, })
hl(0, "MatchWordCur", { fg = 'NONE', bg = 'NONE', underline=true, })
hl(0, "MatchParenCur", { fg = 'NONE', bg = 'NONE', underline=true, })
hl(0, "Cursor", { fg = c.cursor_fg, bg = c.cursor_bg })
hl(0, "lCursor", { fg = c.cursor_fg, bg = c.cursor_bg })
hl(0, "CursorIM", { fg = c.cursor_fg, bg = c.cursor_bg })
hl(0, "TermCursor", { fg = c.cursor_fg, bg = c.cursor_bg })
hl(0, "TermCursorNC", { fg = c.cursor_fg, bg = c.cursor_bg })
hl(0, "Conceal", { fg = c.accent, bg = 'NONE' })
hl(0, "Directory", { fg = c.blue, bg = 'NONE' })
hl(0, "SpecialKey", { fg = c.blue, bg = 'NONE', bold=true, })
hl(0, "Title", { fg = c.blue, bg = 'NONE', bold=true, })
hl(0, "ErrorMsg", { fg = c.error_red, bg = c.bg, bold=true, })
hl(0, "Search", { fg = c.light_gray, bg = c.search_blue })
hl(0, "IncSearch", { fg = c.search_orange, bg = c.light_gray })
hl(0, "Substitute", { fg = c.light_gray, bg = c.search_orange })
hl(0, "MoreMsg", { fg = c.orange, bg = 'NONE' })
hl(0, "Question", { fg = c.orange, bg = 'NONE' })
hl(0, "EndOfBuffer", { fg = c.bg, bg = 'NONE' })
hl(0, "NonText", { fg = c.bg, bg = 'NONE' })
hl(0, "Variable", { fg = c.light_blue, bg = 'NONE' })
hl(0, "String", { fg = c.orange, bg = 'NONE' })
hl(0, "Character", { fg = c.orange, bg = 'NONE' })
hl(0, "Constant", { fg = c.vivid_blue, bg = 'NONE' })
hl(0, "Number", { fg = c.light_green, bg = 'NONE' })
hl(0, "Boolean", { fg = c.blue, bg = 'NONE' })
hl(0, "Float", { fg = c.light_green, bg = 'NONE' })
hl(0, "Identifier", { fg = c.light_blue, bg = 'NONE' })
hl(0, "Function", { fg = c.yellow, bg = 'NONE' })
hl(0, "Operator", { fg = c.fg, bg = 'NONE' })
hl(0, "Type", { fg = c.cyan, bg = 'NONE' })
hl(0, "StorageClass", { fg = c.blue, bg = 'NONE' })
hl(0, "Structure", { fg = c.blue, bg = 'NONE' })
hl(0, "Typedef", { fg = c.blue, bg = 'NONE' })
hl(0, "Keyword", { fg = c.blue, bg = 'NONE' })
hl(0, "Statement", { fg = c.purple, bg = 'NONE' })
hl(0, "Conditional", { fg = c.blue, bg = 'NONE' })
hl(0, "Repeat", { fg = c.purple, bg = 'NONE' })
hl(0, "Label", { fg = c.purple, bg = 'NONE' })
hl(0, "Exception", { fg = c.purple, bg = 'NONE' })
hl(0, "Include", { fg = c.purple, bg = 'NONE' })
hl(0, "PreProc", { fg = c.purple, bg = 'NONE' })
hl(0, "Define", { fg = c.purple, bg = 'NONE' })
hl(0, "Macro", { fg = c.purple, bg = 'NONE' })
hl(0, "PreCondit", { fg = c.purple, bg = 'NONE' })
hl(0, "Special", { fg = c.orange, bg = 'NONE' })
hl(0, "SpecialChar", { fg = c.white, bg = 'NONE' })
hl(0, "Tag", { fg = c.blue, bg = 'NONE' })
hl(0, "Debug", { fg = c.red, bg = 'NONE' })
hl(0, "Delimiter", { fg = c.dark_gray, bg = 'NONE' })
hl(0, "SpecialComment", { fg = c.gray, bg = 'NONE' })
hl(0, "Underlined", { fg = 'NONE', bg = 'NONE', underline=true, })
hl(0, "Bold", { fg = 'NONE', bg = 'NONE', bold=true, })
hl(0, "Italic", { fg = 'NONE', bg = 'NONE', italic=true, })
hl(0, "Ignore", { fg = c.cyan, bg = c.bg, bold=true, })
hl(0, "Todo", { fg = c.magenta, bg = c.bg, bold=true, })
hl(0, "Error", { fg = c.error_red, bg = c.bg, bold=true, })
hl(0, "TabLine", { fg = c.light_gray, bg = c.line })
hl(0, "TabLineSel", { fg = c.white, bg = c.line })
hl(0, "TabLineFill", { fg = c.line, bg = c.line })
-- Treesitter
hl(0, "TSComment", { link = 'Comment' })
hl(0, "TSAnnotation", { fg = c.blue, bg = 'NONE' })
hl(0, "TSAttribute", { fg = c.cyan, bg = 'NONE' })
hl(0, "TSConstructor", { fg = c.cyan, bg = 'NONE' })
hl(0, "TSType", { fg = c.cyan, bg = 'NONE' })
hl(0, "TSTypeBuiltin", { fg = c.orange, bg = 'NONE' })
hl(0, "TSConditional", { fg = c.yellow, bg = 'NONE' })
hl(0, "TSException", { fg = c.purple, bg = 'NONE' })
hl(0, "TSInclude", { fg = c.purple, bg = 'NONE' })
hl(0, "TSKeywordReturn", { fg = c.purple, bg = 'NONE' })
hl(0, "TSKeyword", { fg = c.purple, bg = 'NONE' })
hl(0, "TSKeywordFunction", { fg = c.purple, bg = 'NONE' })
hl(0, "TSLabel", { fg = c.light_blue, bg = 'NONE' })
hl(0, "TSNamespace", { fg = c.cyan, bg = 'NONE' })
hl(0, "TSRepeat", { fg = c.yellow, bg = 'NONE' })
hl(0, "TSConstant", { fg = c.orange, bg = 'NONE' })
hl(0, "TSConstBuiltin", { fg = c.orange, bg = 'NONE' })
hl(0, "TSFloat", { fg = c.orange, bg = 'NONE' })
hl(0, "TSNumber", { fg = c.orange, bg = 'NONE' })
hl(0, "TSBoolean", { fg = c.orange, bg = 'NONE' })
hl(0, "TSCharacter", { fg = c.green, bg = 'NONE' })
hl(0, "TSError", { fg = c.error_red, bg = 'NONE' })
hl(0, "TSFunction", { fg = c.blue, bg = 'NONE' })
hl(0, "TSFuncBuiltin", { fg = c.blue, bg = 'NONE' })
hl(0, "TSMethod", { fg = c.blue, bg = 'NONE' })
hl(0, "TSConstMacro", { fg = c.orange, bg = 'NONE' })
hl(0, "TSFuncMacro", { fg = c.blue, bg = 'NONE' })
hl(0, "TSVariable", { fg = c.light_blue, bg = 'NONE' })
hl(0, "TSVariableBuiltin", { fg = c.red, bg = 'NONE' })
hl(0, "TSProperty", { fg = c.red, bg = 'NONE' })
hl(0, "TSField", { fg = c.fg, bg = 'NONE' })
hl(0, "TSParameter", { fg = c.red, bg = 'NONE' })
hl(0, "TSParameterReference", { fg = c.red, bg = 'NONE' })
hl(0, "TSSymbol", { fg = c.light_blue, bg = 'NONE' })
hl(0, "TSText", { fg = c.alt_fg, bg = 'NONE' })
hl(0, "TSOperator", { fg = c.alt_fg, bg = 'NONE' })
hl(0, "TSPunctDelimiter", { fg = c.alt_fg, bg = 'NONE' })
hl(0, "TSTagDelimiter", { fg = c.alt_fg, bg = 'NONE' })
hl(0, "TSTagAttribute", { fg = c.orange, bg = 'NONE' })
hl(0, "TSPunctBracket", { fg = c.alt_fg, bg = 'NONE' })
hl(0, "TSPunctSpecial", { fg = c.purple, bg = 'NONE' })
hl(0, "TSString", { fg = c.green, bg = 'NONE' })
hl(0, "TSStringRegex", { fg = c.green, bg = 'NONE' })
hl(0, "TSStringEscape", { fg = c.green, bg = 'NONE' })
hl(0, "TSTag", { fg = c.blue, bg = 'NONE' })
hl(0, "TSEmphasis", { fg = 'NONE', bg = 'NONE', italic=true, })
hl(0, "TSUnderline", { fg = 'NONE', bg = 'NONE', underline=true, })
hl(0, "TSTitle", { fg = c.fg, bg = 'NONE', })
hl(0, "TSLiteral", { fg = c.orange, bg = 'NONE' })
hl(0, "TSURI", { fg = c.orange, bg = 'NONE', underline=true, })
hl(0, "TSKeywordOperator", { fg = c.purple, bg = 'NONE' })
hl(0, "TSStructure", { fg = c.light_blue, bg = 'NONE' })
hl(0, "TSStrong", { fg = c.blue, bg = 'NONE', bold=true, })
hl(0, "TSQueryLinterError", { fg = c.warning_orange, bg = 'NONE' })
hl(0, "TreesitterContext", { fg = 'NONE', bg = c.tree_gray })
-- markdown
hl(0, "markdownBlockquote", { fg = c.green, bg = 'NONE' })
hl(0, "markdownCode", { fg = c.orange, bg = 'NONE' })
hl(0, "markdownCodeBlock", { fg = c.orange, bg = 'NONE' })
hl(0, "markdownCodeDelimiter", { fg = c.orange, bg = 'NONE' })
hl(0, "markdownH1", { fg = c.blue, bg = 'NONE' })
hl(0, "markdownH2", { fg = c.blue, bg = 'NONE' })
hl(0, "markdownH3", { fg = c.blue, bg = 'NONE' })
hl(0, "markdownH4", { fg = c.blue, bg = 'NONE' })
hl(0, "markdownH5", { fg = c.blue, bg = 'NONE' })
hl(0, "markdownH6", { fg = c.blue, bg = 'NONE' })
hl(0, "markdownHeadingDelimiter", { fg = c.blue, bg = 'NONE' })
hl(0, "markdownHeadingRule", { fg = c.fg, bg = 'NONE', bold=true, })
hl(0, "markdownId", { fg = c.purple, bg = 'NONE' })
hl(0, "markdownIdDeclaration", { fg = c.blue, bg = 'NONE' })
hl(0, "markdownIdDelimiter", { fg = c.light_gray, bg = 'NONE' })
hl(0, "markdownLinkDelimiter", { fg = c.light_gray, bg = 'NONE' })
hl(0, "markdownBold", { fg = c.blue, bg = 'NONE', bold=true, })
hl(0, "markdownItalic", { fg = 'NONE', bg = 'NONE', italic=true, })
hl(0, "markdownBoldItalic", { fg = c.yellow, bg = 'NONE', bold=true, italic=true, })
hl(0, "markdownListMarker", { fg = c.blue, bg = 'NONE' })
hl(0, "markdownOrderedListMarker", { fg = c.blue, bg = 'NONE' })
hl(0, "markdownRule", { fg = c.accent, bg = 'NONE' })
hl(0, "markdownUrl", { fg = c.cyan, bg = 'NONE', underline=true, })
hl(0, "markdownLinkText", { fg = c.blue, bg = 'NONE' })
hl(0, "markdownFootnote", { fg = c.orange, bg = 'NONE' })
hl(0, "markdownFootnoteDefinition", { fg = c.orange, bg = 'NONE' })
hl(0, "markdownEscape", { fg = c.yellow, bg = 'NONE' })
-- Whichkey
hl(0, "WhichKey", { fg = c.purple, bg = 'NONE' })
hl(0, "WhichKeySeparator", { fg = c.green, bg = 'NONE' })
hl(0, "WhichKeyGroup", { fg = c.blue, bg = 'NONE' })
hl(0, "WhichKeyDesc", { fg = c.light_blue, bg = 'NONE' })
hl(0, "WhichKeyFloat", { fg = 'NONE', bg = c.dark })
-- Git
hl(0, "SignAdd", { fg = c.sign_add, bg = 'NONE' })
hl(0, "SignChange", { fg = c.sign_change, bg = 'NONE' })
hl(0, "SignDelete", { fg = c.sign_delete, bg = 'NONE' })
hl(0, "GitSignsAdd", { fg = c.sign_add, bg = 'NONE' })
hl(0, "GitSignsChange", { fg = c.sign_change, bg = 'NONE' })
hl(0, "GitSignsDelete", { fg = c.sign_delete, bg = 'NONE' })
-- LSP
hl(0, "LspDiagnosticsDefaultError", { fg = c.error_red, bg = 'NONE' })
hl(0, "LspDiagnosticsDefaultWarning", { fg = c.warning_orange, bg = 'NONE' })
hl(0, "LspDiagnosticsDefaultInformation", { fg = c.info_yellow, bg = 'NONE' })
hl(0, "LspDiagnosticsDefaultInfo", { fg = c.info_yellow, bg = 'NONE' })
hl(0, "LspDiagnosticsDefaultHint", { fg = c.hint_blue, bg = 'NONE' })
hl(0, "LspDiagnosticsVirtualTextError", { fg = c.error_red, bg = 'NONE' })
hl(0, "LspDiagnosticsVirtualTextWarning", { fg = c.warning_orange, bg = 'NONE' })
hl(0, "LspDiagnosticsVirtualTextInformation", { fg = c.info_yellow, bg = 'NONE' })
hl(0, "LspDiagnosticsVirtualTextInfo", { fg = c.info_yellow, bg = 'NONE' })
hl(0, "LspDiagnosticsVirtualTextHint", { fg = c.hint_blue, bg = 'NONE' })
hl(0, "LspDiagnosticsFloatingError", { fg = c.error_red, bg = 'NONE' })
hl(0, "LspDiagnosticsFloatingWarning", { fg = c.warning_orange, bg = 'NONE' })
hl(0, "LspDiagnosticsFloatingInformation", { fg = c.info_yellow, bg = 'NONE' })
hl(0, "LspDiagnosticsFloatingInfo", { fg = c.info_yellow, bg = 'NONE' })
hl(0, "LspDiagnosticsFloatingHint", { fg = c.hint_blue, bg = 'NONE' })
hl(0, "DiagnosticSignError", { fg = c.error_red, bg = 'NONE' })
hl(0, "DiagnosticSignWarning", { fg = c.warning_orange, bg = 'NONE' })
hl(0, "DiagnosticSignInformation", { fg = c.info_yellow, bg = 'NONE' })
hl(0, "DiagnosticSignInfo", { fg = c.info_yellow, bg = 'NONE' })
hl(0, "DiagnosticSignHint", { fg = c.hint_blue, bg = 'NONE' })
hl(0, "LspDiagnosticsSignError", { fg = c.error_red, bg = 'NONE' })
hl(0, "LspDiagnosticsSignWarning", { fg = c.warning_orange, bg = 'NONE' })
hl(0, "LspDiagnosticsSignInformation", { fg = c.info_yellow, bg = 'NONE' })
hl(0, "LspDiagnosticsSignInfo", { fg = c.info_yellow, bg = 'NONE' })
hl(0, "LspDiagnosticsSignHint", { fg = c.hint_blue, bg = 'NONE' })
hl(0, "LspDiagnosticsError", { fg = c.error_red, bg = 'NONE' })
hl(0, "LspDiagnosticsWarning", { fg = c.warning_orange, bg = 'NONE' })
hl(0, "LspDiagnosticsInformation", { fg = c.info_yellow, bg = 'NONE' })
hl(0, "LspDiagnosticsInfo", { fg = c.info_yellow, bg = 'NONE' })
hl(0, "LspDiagnosticsHint", { fg = c.hint_blue, bg = 'NONE' })
hl(0, "LspDiagnosticsUnderlineError", { fg = 'NONE', bg = 'NONE', underline=true, })
hl(0, "LspDiagnosticsUnderlineWarning", { fg = 'NONE', bg = 'NONE', underline=true, })
hl(0, "LspDiagnosticsUnderlineInformation", { fg = 'NONE', bg = 'NONE', underline=true, })
hl(0, "LspDiagnosticsUnderlineInfo", { fg = 'NONE', bg = 'NONE', underline=true, })
hl(0, "LspDiagnosticsUnderlineHint", { fg = 'NONE', bg = 'NONE', underline=true, })
hl(0, "LspReferenceRead", { fg = 'NONE', bg = '#2e303b' })
hl(0, "LspReferenceText", { fg = 'NONE', bg = '#2e303b' })
hl(0, "LspReferenceWrite", { fg = 'NONE', bg = '#2e303b' })
hl(0, "LspCodeLens", { fg = c.context, bg = 'NONE', italic=true, })
hl(0, "LspCodeLensSeparator", { fg = c.context, bg = 'NONE', italic=true, })
-- Telescope
hl(0, "TelescopeSelection", { fg = c.hint_blue, bg = 'NONE' })
hl(0, "TelescopeMatching", { fg = c.info_yellow, bg = 'NONE', bold=true, })
hl(0, "TelescopeBorder", { fg = c.blue, bg = c.bg })
-- NvimTree
hl(0, "NvimTreeFolderIcon", { fg = c.folder_blue, bg = 'NONE' })
hl(0, "NvimTreeIndentMarker", { fg = '#c5c5c5', bg = 'NONE' })
hl(0, "NvimTreeNormal", { fg = c.light_gray, bg = c.tree_gray })
hl(0, "NvimTreeVertSplit", { fg = c.alt_bg, bg = c.alt_bg })
hl(0, "NvimTreeFolderName", { fg = c.folder_blue, bg = 'NONE' })
hl(0, "NvimTreeOpenedFolderName", { fg = c.folder_blue, bg = 'NONE', bold=true, italic=true, })
hl(0, "NvimTreeEmptyFolderName", { fg = c.gray, bg = 'NONE', italic=true, })
hl(0, "NvimTreeGitIgnored", { fg = c.gray, bg = 'NONE', italic=true, })
hl(0, "NvimTreeImageFile", { fg = c.light_gray, bg = 'NONE' })
hl(0, "NvimTreeSpecialFile", { fg = c.orange, bg = 'NONE' })
hl(0, "NvimTreeEndOfBuffer", { fg = c.tree_gray, bg = 'NONE' })
hl(0, "NvimTreeCursorLine", { fg = 'NONE', bg = c.cursor_bg })
hl(0, "NvimTreeGitignoreIcon", { fg = '#E64A19', bg = 'NONE' })
hl(0, "NvimTreeGitStaged", { fg = c.tree_sign_add, bg = 'NONE' })
hl(0, "NvimTreeGitNew", { fg = c.tree_sign_add, bg = 'NONE' })
hl(0, "NvimTreeGitRenamed", { fg = c.tree_sign_add, bg = 'NONE' })
hl(0, "NvimTreeGitDeleted", { fg = c.sign_delete, bg = 'NONE' })
hl(0, "NvimTreeGitMerge", { fg = c.tree_sign_change, bg = 'NONE' })
hl(0, "NvimTreeGitDirty", { fg = c.tree_sign_change, bg = 'NONE' })
hl(0, "NvimTreeSymlink", { fg = c.cyan, bg = 'NONE' })
hl(0, "NvimTreeRootFolder", { fg = c.fg, bg = 'NONE', bold=true, })
hl(0, "NvimTreeExecFile", { fg = '#9FBA89', bg = 'NONE' })
-- Buffer
hl(0, "BufferCurrent", { fg = c.fg, bg = c.bg })
hl(0, "BufferCurrentIndex", { fg = c.fg, bg = c.bg })
hl(0, "BufferCurrentMod", { fg = c.info_yellow, bg = c.bg })
hl(0, "BufferCurrentSign", { fg = c.hint_blue, bg = c.bg })
hl(0, "BufferCurrentTarget", { fg = c.red, bg = c.bg, bold=true, })
hl(0, "BufferVisible", { fg = c.fg, bg = c.bg })
hl(0, "BufferVisibleIndex", { fg = c.fg, bg = c.bg })
hl(0, "BufferVisibleMod", { fg = c.info_yellow, bg = c.bg })
hl(0, "BufferVisibleSign", { fg = c.gray, bg = c.bg })
hl(0, "BufferVisibleTarget", { fg = c.red, bg = c.bg, bold=true, })
hl(0, "BufferInactive", { fg = c.gray, bg = c.alt_bg })
hl(0, "BufferInactiveIndex", { fg = c.gray, bg = c.alt_bg })
hl(0, "BufferInactiveMod", { fg = c.info_yellow, bg = c.alt_bg })
hl(0, "BufferInactiveSign", { fg = c.gray, bg = c.alt_bg })
hl(0, "BufferInactiveTarget", { fg = c.red, bg = c.alt_bg, bold=true, })
-- StatusLine
hl(0, "StatusLine", { fg = c.line, bg = c.gray })
hl(0, "StatusLineNC", { fg = c.line, bg = c.gray })
hl(0, "StatusLineSeparator", { fg = c.line, bg = 'NONE' })
hl(0, "StatusLineTerm", { fg = c.line, bg = 'NONE' })
hl(0, "StatusLineTermNC", { fg = c.line, bg = 'NONE' })
-- IndentBlankline
hl(0, "IndentBlanklineContextChar", { fg = c.context, bg = 'NONE' })
hl(0, "IndentBlanklineContextStart", { fg = 'NONE', bg = 'NONE', underline=true, })
hl(0, "IndentBlanklineChar", { fg = c.dark_gray, bg = 'NONE' })
hl(0, "IndentBlanklineSpaceChar", { fg = c.cyan_test, bg = 'NONE' })
hl(0, "IndentBlanklineSpaceCharBlankline", { fg = c.info_yellow, bg = 'NONE' })
-- Dashboard
hl(0, "DashboardHeader", { fg = c.blue, bg = 'NONE' })
hl(0, "DashboardCenter", { fg = c.purple, bg = 'NONE' })
hl(0, "DashboardFooter", { fg = c.cyan, bg = 'NONE' })
-- Cmp
hl(0, "CmpItemAbbrDeprecated", { fg = c.gray, bg = 'NONE', strikethrough=true, })
hl(0, "CmpItemAbbrMatch", { fg = c.ui3_blue, bg = 'NONE' })
hl(0, "CmpItemAbbrMatchFuzzy", { fg = c.ui3_blue, bg = 'NONE' })
hl(0, "CmpItemKindFunction", { fg = c.blue, bg = 'NONE' })
hl(0, "CmpItemKindMethod", { fg = c.blue, bg = 'NONE' })
hl(0, "CmpItemKindConstructor", { fg = c.cyan, bg = 'NONE' })
hl(0, "CmpItemKindClass", { fg = c.cyan, bg = 'NONE' })
hl(0, "CmpItemKindEnum", { fg = c.cyan, bg = 'NONE' })
hl(0, "CmpItemKindEvent", { fg = c.yellow, bg = 'NONE' })
hl(0, "CmpItemKindInterface", { fg = c.cyan, bg = 'NONE' })
hl(0, "CmpItemKindStruct", { fg = c.cyan, bg = 'NONE' })
hl(0, "CmpItemKindVariable", { fg = c.red, bg = 'NONE' })
hl(0, "CmpItemKindField", { fg = c.red, bg = 'NONE' })
hl(0, "CmpItemKindProperty", { fg = c.red, bg = 'NONE' })
hl(0, "CmpItemKindEnumMember", { fg = c.orange, bg = 'NONE' })
hl(0, "CmpItemKindConstant", { fg = c.orange, bg = 'NONE' })
hl(0, "CmpItemKindKeyword", { fg = c.purple, bg = 'NONE' })
hl(0, "CmpItemKindModule", { fg = c.cyan, bg = 'NONE' })
hl(0, "CmpItemKindValue", { fg = c.fg, bg = 'NONE' })
hl(0, "CmpItemKindUnit", { fg = c.fg, bg = 'NONE' })
hl(0, "CmpItemKindText", { fg = c.fg, bg = 'NONE' })
hl(0, "CmpItemKindSnippet", { fg = c.yellow, bg = 'NONE' })
hl(0, "CmpItemKindFile", { fg = c.fg, bg = 'NONE' })
hl(0, "CmpItemKindFolder", { fg = c.fg, bg = 'NONE' })
hl(0, "CmpItemKindColor", { fg = c.fg, bg = 'NONE' })
hl(0, "CmpItemKindReference", { fg = c.fg, bg = 'NONE' })
hl(0, "CmpItemKindOperator", { fg = c.fg, bg = 'NONE' })
hl(0, "CmpItemKindTypeParameter", { fg = c.red, bg = 'NONE' })
end
return theme

View File

@ -1,344 +1,24 @@
local c = require('flexoki.palette') local highlights = require('flexoki.highlights')
local hl = vim.api.nvim_set_hl local hl = vim.api.nvim_set_hl
local theme = {}
theme.set_highlights = function() local M = {}
-- highlights ---@param opts FlexokiOptions
hl(0, "Normal", { fg = c.fg, bg = c.bg }) M.set_highlights = function(opts)
hl(0, "SignColumn", { fg = 'NONE', bg = c.bg })
hl(0, "MsgArea", { fg = c.fg, bg = c.bg })
hl(0, "ModeMsg", { fg = c.fg, bg = c.dark })
hl(0, "MsgSeparator", { fg = c.fg, bg = c.bg })
hl(0, "SpellBad", { fg = c.light_red, bg = 'NONE', underline=true, })
hl(0, "SpellCap", { fg = c.yellow, bg = 'NONE', underline=true, })
hl(0, "SpellLocal", { fg = c.green, bg = 'NONE', underline=true, })
hl(0, "SpellRare", { fg = c.purple, bg = 'NONE', underline=true, })
hl(0, "NormalNC", { fg = c.fg, bg = c.bg })
hl(0, "Pmenu", { fg = c.light_gray, bg = c.tree_gray, sp = 'NONE', blend=50, })
hl(0, "PmenuSel", { fg = 'NONE', bg = c.ui2_blue })
hl(0, "WildMenu", { fg = c.fg, bg = c.ui2_blue })
hl(0, "CursorLineNr", { fg = c.light_gray, bg = 'NONE', bold=true, })
hl(0, "Comment", { fg = c.gray, bg = 'NONE', italic=true, })
hl(0, "Folded", { fg = c.accent, bg = c.alt_bg })
hl(0, "FoldColumn", { fg = c.accent, bg = c.alt_bg })
hl(0, "LineNr", { fg = c.gray, bg = 'NONE' })
hl(0, "FloatBorder", { fg = c.gray, bg = c.alt_bg })
hl(0, "Whitespace", { fg = c.bg, bg = 'NONE' })
hl(0, "VertSplit", { fg = c.gray, bg = c.bg })
hl(0, "CursorLine", { fg = 'NONE', bg = c.dark })
hl(0, "CursorColumn", { fg = 'NONE', bg = c.dark })
hl(0, "ColorColumn", { fg = 'NONE', bg = c.dark })
hl(0, "NormalFloat", { fg = 'NONE', bg = c.dark })
hl(0, "Visual", { fg = 'NONE', bg = c.ui_blue })
hl(0, "VisualNOS", { fg = 'NONE', bg = c.alt_bg })
hl(0, "WarningMsg", { fg = c.error_red, bg = c.bg })
hl(0, "DiffAdd", { fg = c.alt_bg, bg = c.sign_add })
hl(0, "DiffChange", { fg = c.alt_bg, bg = c.sign_change, underline=true, })
hl(0, "DiffDelete", { fg = c.alt_bg, bg = c.sign_delete })
hl(0, "QuickFixLine", { fg = 'NONE', bg = c.ui2_blue })
hl(0, "PmenuSbar", { fg = 'NONE', bg = c.alt_bg })
hl(0, "PmenuThumb", { fg = 'NONE', bg = c.gray })
hl(0, "MatchWord", { fg = 'NONE', bg = 'NONE', underline=true, })
hl(0, "MatchParen", { fg = c.hint_blue, bg = c.bg, underline=true, })
hl(0, "MatchWordCur", { fg = 'NONE', bg = 'NONE', underline=true, })
hl(0, "MatchParenCur", { fg = 'NONE', bg = 'NONE', underline=true, })
hl(0, "Cursor", { fg = c.cursor_fg, bg = c.cursor_bg })
hl(0, "lCursor", { fg = c.cursor_fg, bg = c.cursor_bg })
hl(0, "CursorIM", { fg = c.cursor_fg, bg = c.cursor_bg })
hl(0, "TermCursor", { fg = c.cursor_fg, bg = c.cursor_bg })
hl(0, "TermCursorNC", { fg = c.cursor_fg, bg = c.cursor_bg })
hl(0, "Conceal", { fg = c.accent, bg = 'NONE' })
hl(0, "Directory", { fg = c.blue, bg = 'NONE' })
hl(0, "SpecialKey", { fg = c.blue, bg = 'NONE', bold=true, })
hl(0, "Title", { fg = c.blue, bg = 'NONE', bold=true, })
hl(0, "ErrorMsg", { fg = c.error_red, bg = c.bg, bold=true, })
hl(0, "Search", { fg = c.light_gray, bg = c.search_blue })
hl(0, "IncSearch", { fg = c.search_orange, bg = c.light_gray })
hl(0, "Substitute", { fg = c.light_gray, bg = c.search_orange })
hl(0, "MoreMsg", { fg = c.orange, bg = 'NONE' })
hl(0, "Question", { fg = c.orange, bg = 'NONE' })
hl(0, "EndOfBuffer", { fg = c.bg, bg = 'NONE' })
hl(0, "NonText", { fg = c.bg, bg = 'NONE' })
hl(0, "Variable", { fg = c.light_blue, bg = 'NONE' })
hl(0, "String", { fg = c.orange, bg = 'NONE' })
hl(0, "Character", { fg = c.orange, bg = 'NONE' })
hl(0, "Constant", { fg = c.vivid_blue, bg = 'NONE' })
hl(0, "Number", { fg = c.light_green, bg = 'NONE' })
hl(0, "Boolean", { fg = c.blue, bg = 'NONE' })
hl(0, "Float", { fg = c.light_green, bg = 'NONE' })
hl(0, "Identifier", { fg = c.light_blue, bg = 'NONE' })
hl(0, "Function", { fg = c.yellow, bg = 'NONE' })
hl(0, "Operator", { fg = c.fg, bg = 'NONE' })
hl(0, "Type", { fg = c.cyan, bg = 'NONE' })
hl(0, "StorageClass", { fg = c.blue, bg = 'NONE' })
hl(0, "Structure", { fg = c.blue, bg = 'NONE' })
hl(0, "Typedef", { fg = c.blue, bg = 'NONE' })
hl(0, "Keyword", { fg = c.blue, bg = 'NONE' })
hl(0, "Statement", { fg = c.purple, bg = 'NONE' })
hl(0, "Conditional", { fg = c.blue, bg = 'NONE' })
hl(0, "Repeat", { fg = c.purple, bg = 'NONE' })
hl(0, "Label", { fg = c.purple, bg = 'NONE' })
hl(0, "Exception", { fg = c.purple, bg = 'NONE' })
hl(0, "Include", { fg = c.purple, bg = 'NONE' })
hl(0, "PreProc", { fg = c.purple, bg = 'NONE' })
hl(0, "Define", { fg = c.purple, bg = 'NONE' })
hl(0, "Macro", { fg = c.purple, bg = 'NONE' })
hl(0, "PreCondit", { fg = c.purple, bg = 'NONE' })
hl(0, "Special", { fg = c.orange, bg = 'NONE' })
hl(0, "SpecialChar", { fg = c.white, bg = 'NONE' })
hl(0, "Tag", { fg = c.blue, bg = 'NONE' })
hl(0, "Debug", { fg = c.red, bg = 'NONE' })
hl(0, "Delimiter", { fg = c.gray, bg = 'NONE' })
hl(0, "SpecialComment", { fg = c.gray, bg = 'NONE' })
hl(0, "Underlined", { fg = 'NONE', bg = 'NONE', underline=true, })
hl(0, "Bold", { fg = 'NONE', bg = 'NONE', bold=true, })
hl(0, "Italic", { fg = 'NONE', bg = 'NONE', italic=true, })
hl(0, "Ignore", { fg = c.cyan, bg = c.bg, bold=true, })
hl(0, "Todo", { fg = c.magenta, bg = c.bg, bold=true, })
hl(0, "Error", { fg = c.error_red, bg = c.bg, bold=true, })
hl(0, "TabLine", { fg = c.light_gray, bg = c.line })
hl(0, "TabLineSel", { fg = c.white, bg = c.line })
hl(0, "TabLineFill", { fg = c.line, bg = c.line })
-- Treesitter local highlight_groups = highlights.groups()
hl(0, "TSComment", { link = 'Comment' })
hl(0, "TSAnnotation", { fg = c.blue, bg = 'NONE' })
hl(0, "TSAttribute", { fg = c.cyan, bg = 'NONE' })
hl(0, "TSConstructor", { fg = c.cyan, bg = 'NONE' })
hl(0, "TSType", { fg = c.cyan, bg = 'NONE' })
hl(0, "TSTypeBuiltin", { fg = c.orange, bg = 'NONE' })
hl(0, "TSConditional", { fg = c.yellow, bg = 'NONE' })
hl(0, "TSException", { fg = c.purple, bg = 'NONE' })
hl(0, "TSInclude", { fg = c.purple, bg = 'NONE' })
hl(0, "TSKeywordReturn", { fg = c.purple, bg = 'NONE' })
hl(0, "TSKeyword", { fg = c.purple, bg = 'NONE' })
hl(0, "TSKeywordFunction", { fg = c.purple, bg = 'NONE' })
hl(0, "TSLabel", { fg = c.light_blue, bg = 'NONE' })
hl(0, "TSNamespace", { fg = c.cyan, bg = 'NONE' })
hl(0, "TSRepeat", { fg = c.yellow, bg = 'NONE' })
hl(0, "TSConstant", { fg = c.orange, bg = 'NONE' })
hl(0, "TSConstBuiltin", { fg = c.orange, bg = 'NONE' })
hl(0, "TSFloat", { fg = c.orange, bg = 'NONE' })
hl(0, "TSNumber", { fg = c.orange, bg = 'NONE' })
hl(0, "TSBoolean", { fg = c.orange, bg = 'NONE' })
hl(0, "TSCharacter", { fg = c.green, bg = 'NONE' })
hl(0, "TSError", { fg = c.error_red, bg = 'NONE' })
hl(0, "TSFunction", { fg = c.blue, bg = 'NONE' })
hl(0, "TSFuncBuiltin", { fg = c.blue, bg = 'NONE' })
hl(0, "TSMethod", { fg = c.blue, bg = 'NONE' })
hl(0, "TSConstMacro", { fg = c.orange, bg = 'NONE' })
hl(0, "TSFuncMacro", { fg = c.blue, bg = 'NONE' })
hl(0, "TSVariable", { fg = c.light_blue, bg = 'NONE' })
hl(0, "TSVariableBuiltin", { fg = c.red, bg = 'NONE' })
hl(0, "TSProperty", { fg = c.red, bg = 'NONE' })
hl(0, "TSField", { fg = c.fg, bg = 'NONE' })
hl(0, "TSParameter", { fg = c.red, bg = 'NONE' })
hl(0, "TSParameterReference", { fg = c.red, bg = 'NONE' })
hl(0, "TSSymbol", { fg = c.light_blue, bg = 'NONE' })
hl(0, "TSText", { fg = c.alt_fg, bg = 'NONE' })
hl(0, "TSOperator", { fg = c.alt_fg, bg = 'NONE' })
hl(0, "TSPunctDelimiter", { fg = c.alt_fg, bg = 'NONE' })
hl(0, "TSTagDelimiter", { fg = c.alt_fg, bg = 'NONE' })
hl(0, "TSTagAttribute", { fg = c.orange, bg = 'NONE' })
hl(0, "TSPunctBracket", { fg = c.alt_fg, bg = 'NONE' })
hl(0, "TSPunctSpecial", { fg = c.purple, bg = 'NONE' })
hl(0, "TSString", { fg = c.green, bg = 'NONE' })
hl(0, "TSStringRegex", { fg = c.green, bg = 'NONE' })
hl(0, "TSStringEscape", { fg = c.green, bg = 'NONE' })
hl(0, "TSTag", { fg = c.blue, bg = 'NONE' })
hl(0, "TSEmphasis", { fg = 'NONE', bg = 'NONE', italic=true, })
hl(0, "TSUnderline", { fg = 'NONE', bg = 'NONE', underline=true, })
hl(0, "TSTitle", { fg = c.fg, bg = 'NONE', })
hl(0, "TSLiteral", { fg = c.orange, bg = 'NONE' })
hl(0, "TSURI", { fg = c.orange, bg = 'NONE', underline=true, })
hl(0, "TSKeywordOperator", { fg = c.purple, bg = 'NONE' })
hl(0, "TSStructure", { fg = c.light_blue, bg = 'NONE' })
hl(0, "TSStrong", { fg = c.blue, bg = 'NONE', bold=true, })
hl(0, "TSQueryLinterError", { fg = c.warning_orange, bg = 'NONE' })
hl(0, "TreesitterContext", { fg = 'NONE', bg = c.tree_gray })
-- markdown -- Set users highlight_group customisations.
hl(0, "markdownBlockquote", { fg = c.green, bg = 'NONE' }) if not opts.highlight_groups == nil then
hl(0, "markdownCode", { fg = c.orange, bg = 'NONE' }) for group, highlight in pairs(opts.highlight_groups) do
hl(0, "markdownCodeBlock", { fg = c.orange, bg = 'NONE' }) highlight_groups[group] = highlight
hl(0, "markdownCodeDelimiter", { fg = c.orange, bg = 'NONE' }) end
hl(0, "markdownH1", { fg = c.blue, bg = 'NONE' }) end
hl(0, "markdownH2", { fg = c.blue, bg = 'NONE' })
hl(0, "markdownH3", { fg = c.blue, bg = 'NONE' })
hl(0, "markdownH4", { fg = c.blue, bg = 'NONE' })
hl(0, "markdownH5", { fg = c.blue, bg = 'NONE' })
hl(0, "markdownH6", { fg = c.blue, bg = 'NONE' })
hl(0, "markdownHeadingDelimiter", { fg = c.blue, bg = 'NONE' })
hl(0, "markdownHeadingRule", { fg = c.fg, bg = 'NONE', bold=true, })
hl(0, "markdownId", { fg = c.purple, bg = 'NONE' })
hl(0, "markdownIdDeclaration", { fg = c.blue, bg = 'NONE' })
hl(0, "markdownIdDelimiter", { fg = c.light_gray, bg = 'NONE' })
hl(0, "markdownLinkDelimiter", { fg = c.light_gray, bg = 'NONE' })
hl(0, "markdownBold", { fg = c.blue, bg = 'NONE', bold=true, })
hl(0, "markdownItalic", { fg = 'NONE', bg = 'NONE', italic=true, })
hl(0, "markdownBoldItalic", { fg = c.yellow, bg = 'NONE', bold=true, italic=true, })
hl(0, "markdownListMarker", { fg = c.blue, bg = 'NONE' })
hl(0, "markdownOrderedListMarker", { fg = c.blue, bg = 'NONE' })
hl(0, "markdownRule", { fg = c.accent, bg = 'NONE' })
hl(0, "markdownUrl", { fg = c.cyan, bg = 'NONE', underline=true, })
hl(0, "markdownLinkText", { fg = c.blue, bg = 'NONE' })
hl(0, "markdownFootnote", { fg = c.orange, bg = 'NONE' })
hl(0, "markdownFootnoteDefinition", { fg = c.orange, bg = 'NONE' })
hl(0, "markdownEscape", { fg = c.yellow, bg = 'NONE' })
-- Whichkey for group, highlight in pairs(highlight_groups) do
hl(0, "WhichKey", { fg = c.purple, bg = 'NONE' }) hl(0, group, highlight)
hl(0, "WhichKeySeparator", { fg = c.green, bg = 'NONE' }) end
hl(0, "WhichKeyGroup", { fg = c.blue, bg = 'NONE' })
hl(0, "WhichKeyDesc", { fg = c.light_blue, bg = 'NONE' })
hl(0, "WhichKeyFloat", { fg = 'NONE', bg = c.dark })
-- Git
hl(0, "SignAdd", { fg = c.sign_add, bg = 'NONE' })
hl(0, "SignChange", { fg = c.sign_change, bg = 'NONE' })
hl(0, "SignDelete", { fg = c.sign_delete, bg = 'NONE' })
hl(0, "GitSignsAdd", { fg = c.sign_add, bg = 'NONE' })
hl(0, "GitSignsChange", { fg = c.sign_change, bg = 'NONE' })
hl(0, "GitSignsDelete", { fg = c.sign_delete, bg = 'NONE' })
-- LSP
hl(0, "LspDiagnosticsDefaultError", { fg = c.error_red, bg = 'NONE' })
hl(0, "LspDiagnosticsDefaultWarning", { fg = c.warning_orange, bg = 'NONE' })
hl(0, "LspDiagnosticsDefaultInformation", { fg = c.info_yellow, bg = 'NONE' })
hl(0, "LspDiagnosticsDefaultInfo", { fg = c.info_yellow, bg = 'NONE' })
hl(0, "LspDiagnosticsDefaultHint", { fg = c.hint_blue, bg = 'NONE' })
hl(0, "LspDiagnosticsVirtualTextError", { fg = c.error_red, bg = 'NONE' })
hl(0, "LspDiagnosticsVirtualTextWarning", { fg = c.warning_orange, bg = 'NONE' })
hl(0, "LspDiagnosticsVirtualTextInformation", { fg = c.info_yellow, bg = 'NONE' })
hl(0, "LspDiagnosticsVirtualTextInfo", { fg = c.info_yellow, bg = 'NONE' })
hl(0, "LspDiagnosticsVirtualTextHint", { fg = c.hint_blue, bg = 'NONE' })
hl(0, "LspDiagnosticsFloatingError", { fg = c.error_red, bg = 'NONE' })
hl(0, "LspDiagnosticsFloatingWarning", { fg = c.warning_orange, bg = 'NONE' })
hl(0, "LspDiagnosticsFloatingInformation", { fg = c.info_yellow, bg = 'NONE' })
hl(0, "LspDiagnosticsFloatingInfo", { fg = c.info_yellow, bg = 'NONE' })
hl(0, "LspDiagnosticsFloatingHint", { fg = c.hint_blue, bg = 'NONE' })
hl(0, "DiagnosticSignError", { fg = c.error_red, bg = 'NONE' })
hl(0, "DiagnosticSignWarning", { fg = c.warning_orange, bg = 'NONE' })
hl(0, "DiagnosticSignInformation", { fg = c.info_yellow, bg = 'NONE' })
hl(0, "DiagnosticSignInfo", { fg = c.info_yellow, bg = 'NONE' })
hl(0, "DiagnosticSignHint", { fg = c.hint_blue, bg = 'NONE' })
hl(0, "LspDiagnosticsSignError", { fg = c.error_red, bg = 'NONE' })
hl(0, "LspDiagnosticsSignWarning", { fg = c.warning_orange, bg = 'NONE' })
hl(0, "LspDiagnosticsSignInformation", { fg = c.info_yellow, bg = 'NONE' })
hl(0, "LspDiagnosticsSignInfo", { fg = c.info_yellow, bg = 'NONE' })
hl(0, "LspDiagnosticsSignHint", { fg = c.hint_blue, bg = 'NONE' })
hl(0, "LspDiagnosticsError", { fg = c.error_red, bg = 'NONE' })
hl(0, "LspDiagnosticsWarning", { fg = c.warning_orange, bg = 'NONE' })
hl(0, "LspDiagnosticsInformation", { fg = c.info_yellow, bg = 'NONE' })
hl(0, "LspDiagnosticsInfo", { fg = c.info_yellow, bg = 'NONE' })
hl(0, "LspDiagnosticsHint", { fg = c.hint_blue, bg = 'NONE' })
hl(0, "LspDiagnosticsUnderlineError", { fg = 'NONE', bg = 'NONE', underline=true, })
hl(0, "LspDiagnosticsUnderlineWarning", { fg = 'NONE', bg = 'NONE', underline=true, })
hl(0, "LspDiagnosticsUnderlineInformation", { fg = 'NONE', bg = 'NONE', underline=true, })
hl(0, "LspDiagnosticsUnderlineInfo", { fg = 'NONE', bg = 'NONE', underline=true, })
hl(0, "LspDiagnosticsUnderlineHint", { fg = 'NONE', bg = 'NONE', underline=true, })
hl(0, "LspReferenceRead", { fg = 'NONE', bg = '#2e303b' })
hl(0, "LspReferenceText", { fg = 'NONE', bg = '#2e303b' })
hl(0, "LspReferenceWrite", { fg = 'NONE', bg = '#2e303b' })
hl(0, "LspCodeLens", { fg = c.context, bg = 'NONE', italic=true, })
hl(0, "LspCodeLensSeparator", { fg = c.context, bg = 'NONE', italic=true, })
-- Telescope
hl(0, "TelescopeSelection", { fg = c.hint_blue, bg = 'NONE' })
hl(0, "TelescopeMatching", { fg = c.info_yellow, bg = 'NONE', bold=true, })
hl(0, "TelescopeBorder", { fg = c.blue, bg = c.bg })
-- NvimTree
hl(0, "NvimTreeFolderIcon", { fg = c.folder_blue, bg = 'NONE' })
hl(0, "NvimTreeIndentMarker", { fg = '#c5c5c5', bg = 'NONE' })
hl(0, "NvimTreeNormal", { fg = c.light_gray, bg = c.tree_gray })
hl(0, "NvimTreeVertSplit", { fg = c.alt_bg, bg = c.alt_bg })
hl(0, "NvimTreeFolderName", { fg = c.folder_blue, bg = 'NONE' })
hl(0, "NvimTreeOpenedFolderName", { fg = c.folder_blue, bg = 'NONE', bold=true, italic=true, })
hl(0, "NvimTreeEmptyFolderName", { fg = c.gray, bg = 'NONE', italic=true, })
hl(0, "NvimTreeGitIgnored", { fg = c.gray, bg = 'NONE', italic=true, })
hl(0, "NvimTreeImageFile", { fg = c.light_gray, bg = 'NONE' })
hl(0, "NvimTreeSpecialFile", { fg = c.orange, bg = 'NONE' })
hl(0, "NvimTreeEndOfBuffer", { fg = c.tree_gray, bg = 'NONE' })
hl(0, "NvimTreeCursorLine", { fg = 'NONE', bg = '#282b37' })
hl(0, "NvimTreeGitignoreIcon", { fg = '#E64A19', bg = 'NONE' })
hl(0, "NvimTreeGitStaged", { fg = c.tree_sign_add, bg = 'NONE' })
hl(0, "NvimTreeGitNew", { fg = c.tree_sign_add, bg = 'NONE' })
hl(0, "NvimTreeGitRenamed", { fg = c.tree_sign_add, bg = 'NONE' })
hl(0, "NvimTreeGitDeleted", { fg = c.sign_delete, bg = 'NONE' })
hl(0, "NvimTreeGitMerge", { fg = c.tree_sign_change, bg = 'NONE' })
hl(0, "NvimTreeGitDirty", { fg = c.tree_sign_change, bg = 'NONE' })
hl(0, "NvimTreeSymlink", { fg = c.cyan, bg = 'NONE' })
hl(0, "NvimTreeRootFolder", { fg = c.fg, bg = 'NONE', bold=true, })
hl(0, "NvimTreeExecFile", { fg = '#9FBA89', bg = 'NONE' })
-- Buffer
hl(0, "BufferCurrent", { fg = c.fg, bg = c.bg })
hl(0, "BufferCurrentIndex", { fg = c.fg, bg = c.bg })
hl(0, "BufferCurrentMod", { fg = c.info_yellow, bg = c.bg })
hl(0, "BufferCurrentSign", { fg = c.hint_blue, bg = c.bg })
hl(0, "BufferCurrentTarget", { fg = c.red, bg = c.bg, bold=true, })
hl(0, "BufferVisible", { fg = c.fg, bg = c.bg })
hl(0, "BufferVisibleIndex", { fg = c.fg, bg = c.bg })
hl(0, "BufferVisibleMod", { fg = c.info_yellow, bg = c.bg })
hl(0, "BufferVisibleSign", { fg = c.gray, bg = c.bg })
hl(0, "BufferVisibleTarget", { fg = c.red, bg = c.bg, bold=true, })
hl(0, "BufferInactive", { fg = c.gray, bg = c.alt_bg })
hl(0, "BufferInactiveIndex", { fg = c.gray, bg = c.alt_bg })
hl(0, "BufferInactiveMod", { fg = c.info_yellow, bg = c.alt_bg })
hl(0, "BufferInactiveSign", { fg = c.gray, bg = c.alt_bg })
hl(0, "BufferInactiveTarget", { fg = c.red, bg = c.alt_bg, bold=true, })
-- StatusLine
hl(0, "StatusLine", { fg = c.line, bg = c.gray })
hl(0, "StatusLineNC", { fg = c.line, bg = c.gray })
hl(0, "StatusLineSeparator", { fg = c.line, bg = 'NONE' })
hl(0, "StatusLineTerm", { fg = c.line, bg = 'NONE' })
hl(0, "StatusLineTermNC", { fg = c.line, bg = 'NONE' })
-- IndentBlankline
hl(0, "IndentBlanklineContextChar", { fg = c.context, bg = 'NONE' })
hl(0, "IndentBlanklineContextStart", { fg = 'NONE', bg = 'NONE', underline=true, })
hl(0, "IndentBlanklineChar", { fg = c.dark_gray, bg = 'NONE' })
hl(0, "IndentBlanklineSpaceChar", { fg = c.cyan_test, bg = 'NONE' })
hl(0, "IndentBlanklineSpaceCharBlankline", { fg = c.info_yellow, bg = 'NONE' })
-- Dashboard
hl(0, "DashboardHeader", { fg = c.blue, bg = 'NONE' })
hl(0, "DashboardCenter", { fg = c.purple, bg = 'NONE' })
hl(0, "DashboardFooter", { fg = c.cyan, bg = 'NONE' })
-- Cmp
hl(0, "CmpItemAbbrDeprecated", { fg = c.gray, bg = 'NONE', strikethrough=true, })
hl(0, "CmpItemAbbrMatch", { fg = c.ui3_blue, bg = 'NONE' })
hl(0, "CmpItemAbbrMatchFuzzy", { fg = c.ui3_blue, bg = 'NONE' })
hl(0, "CmpItemKindFunction", { fg = c.blue, bg = 'NONE' })
hl(0, "CmpItemKindMethod", { fg = c.blue, bg = 'NONE' })
hl(0, "CmpItemKindConstructor", { fg = c.cyan, bg = 'NONE' })
hl(0, "CmpItemKindClass", { fg = c.cyan, bg = 'NONE' })
hl(0, "CmpItemKindEnum", { fg = c.cyan, bg = 'NONE' })
hl(0, "CmpItemKindEvent", { fg = c.yellow, bg = 'NONE' })
hl(0, "CmpItemKindInterface", { fg = c.cyan, bg = 'NONE' })
hl(0, "CmpItemKindStruct", { fg = c.cyan, bg = 'NONE' })
hl(0, "CmpItemKindVariable", { fg = c.red, bg = 'NONE' })
hl(0, "CmpItemKindField", { fg = c.red, bg = 'NONE' })
hl(0, "CmpItemKindProperty", { fg = c.red, bg = 'NONE' })
hl(0, "CmpItemKindEnumMember", { fg = c.orange, bg = 'NONE' })
hl(0, "CmpItemKindConstant", { fg = c.orange, bg = 'NONE' })
hl(0, "CmpItemKindKeyword", { fg = c.purple, bg = 'NONE' })
hl(0, "CmpItemKindModule", { fg = c.cyan, bg = 'NONE' })
hl(0, "CmpItemKindValue", { fg = c.fg, bg = 'NONE' })
hl(0, "CmpItemKindUnit", { fg = c.fg, bg = 'NONE' })
hl(0, "CmpItemKindText", { fg = c.fg, bg = 'NONE' })
hl(0, "CmpItemKindSnippet", { fg = c.yellow, bg = 'NONE' })
hl(0, "CmpItemKindFile", { fg = c.fg, bg = 'NONE' })
hl(0, "CmpItemKindFolder", { fg = c.fg, bg = 'NONE' })
hl(0, "CmpItemKindColor", { fg = c.fg, bg = 'NONE' })
hl(0, "CmpItemKindReference", { fg = c.fg, bg = 'NONE' })
hl(0, "CmpItemKindOperator", { fg = c.fg, bg = 'NONE' })
hl(0, "CmpItemKindTypeParameter", { fg = c.red, bg = 'NONE' })
end end
return theme return M

74
lua/flexoki/util.lua Normal file
View File

@ -0,0 +1,74 @@
local util = {}
local function byte(value, offset)
return bit.band(bit.rshift(value, offset), 0xFF)
end
local function rgb(color)
color = vim.api.nvim_get_color_by_name(color)
if color == -1 then
color = vim.opt.background:get() == 'dark' and 000 or 255255255
end
return { byte(color, 16), byte(color, 8), byte(color, 0) }
end
---comment
---@param color any
---@return nil
local function parse_color(color)
if color == nil then
return print('invalid color')
end
color = color:lower()
if not color:find('#') and color ~= 'none' then
color = require('rose-pine.palette')[color]
or vim.api.nvim_get_color_by_name(color)
end
return color
end
---@param fg string foreground color
---@param bg string background color
---@param alpha number number between 0 (background) and 1 (foreground)
util.blend = function(fg, bg, alpha)
local fg_rgb = rgb(parse_color(fg))
local bg_rgb = rgb(parse_color(bg))
local function blend_channel(i)
local ret = (alpha * fg_rgb[i] + ((1 - alpha) * bg_rgb[i]))
return math.floor(math.min(math.max(0, ret), 255) + 0.5)
end
return string.format(
'#%02X%02X%02X',
blend_channel(1),
blend_channel(2),
blend_channel(3)
)
end
---@param group string
---@param color table<string, any>
util.highlight = function(group, color)
local fg = color.fg and parse_color(color.fg) or 'none'
local bg = color.bg and parse_color(color.bg) or 'none'
local sp = color.sp and parse_color(color.sp) or ''
if
color.blend ~= nil
and (color.blend >= 0 or color.blend <= 100)
and bg ~= nil
then
bg = util.blend(bg, parse_color('base') or '', color.blend / 100)
end
color = vim.tbl_extend('force', color, { fg = fg, bg = bg, sp = sp })
vim.api.nvim_set_hl(0, group, color)
end
return util