refactor: rename to flatwhite
authorhylo <hylo@posteo.de>
Sun, 19 Mar 2023 19:23:06 +0000 (20:23 +0100)
committerhylo <hylo@posteo.de>
Sun, 19 Mar 2023 19:23:38 +0000 (20:23 +0100)
15 files changed:
LICENSE.md
README.md
assets/1.png [deleted file]
assets/2.png [deleted file]
assets/colors.png [deleted file]
colors/dracula.lua [deleted file]
colors/flatwhite.lua [new file with mode: 0644]
lua/dracula/groups.lua [deleted file]
lua/dracula/init.lua [deleted file]
lua/dracula/palette.lua [deleted file]
lua/flatwhite/groups.lua [new file with mode: 0644]
lua/flatwhite/init.lua [new file with mode: 0644]
lua/flatwhite/palette.lua [new file with mode: 0644]
lua/lualine/themes/dracula-nvim.lua [deleted file]
lua/lualine/themes/flatwhite.nvim [new file with mode: 0644]

index 1b833b10976f614f83e1c73b96ae4b444be6ae64..3333d1470e5746a80ca9410ee79dd758d3fd66cc 100644 (file)
@@ -1,6 +1,6 @@
 MIT License
 
-Copyright (c) 2021 Mofiqul Islam
+Copyright (c) 2021 hylo
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
index 793b845c70d0bcab2adc91a18a88881aa4da2646..37a1b79dec9226f3846aff864517ae82c9fa7497 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,10 +1,8 @@
-<h1 align="center" >🧛‍♂️ dracula.nvim</h1>
+<p align="center"><a href="https://nope.com/">Flatwhite</a> colorscheme for <a href="https://neovim.io/">NEOVIM</a> written in Lua</p>
 
-<p align="center"><a href="https://draculatheme.com/">Dracula</a> colorscheme for <a href="https://neovim.io/">NEOVIM</a> written in Lua</p>
+<!-- ![TypeScript and NvimTree](./assets/1.png) -->
 
-![TypeScript and NvimTree](./assets/1.png)
-
-![Lua](./assets/2.png)
+<!-- ![Lua](./assets/2.png) -->
 
 ## ✔️ Requirements
 
@@ -33,35 +31,35 @@ Install via package manager
 
 ```lua
 -- Using Packer:
-use 'Mofiqul/dracula.nvim'
+use 'Mofiqul/flatwhite.nvim'
 ```
 
 ```vim
 " Using Vim-Plug:
-Plug 'Mofiqul/dracula.nvim'
+Plug 'Mofiqul/flatwhite.nvim'
 ```
 
 ## 🚀 Usage
 
 ```lua
 -- Lua:
-vim.cmd[[colorscheme dracula]]
+vim.cmd[[colorscheme flatwhite]]
 ```
 
 ```vim
 " Vim-Script:
-colorscheme dracula
+colorscheme flatwhite
 ```
 
 If you are using [`lualine`](https://github.com/hoob3rt/lualine.nvim), you can also enable the provided theme:
 
-> Make sure to set theme as 'dracula-nvim' as dracula already exists in lualine built in themes
+> Make sure to set theme as 'flatwhite' as flatwhite already exists in lualine built in themes
 
 ```lua
 require('lualine').setup {
   options = {
     -- ...
-    theme = 'dracula-nvim'
+    theme = 'flatwhite'
     -- ...
   }
 }
@@ -74,9 +72,9 @@ The configuration must be run before `colorscheme` command to take effect.
 If you're using lua
 
 ```lua
-local dracula = require("dracula")
-dracula.setup({
-  -- customize dracula color palette
+local flatwhite = require("flatwhite")
+flatwhite.setup({
+  -- customize flatwhite color palette
   colors = {
     bg = "#282A36",
     fg = "#F8F8F2",
@@ -112,7 +110,7 @@ dracula.setup({
   -- overrides the default highlights see `:h synIDattr`
   overrides = {
     -- Examples
-    -- NonText = { fg = dracula.colors().white }, -- set NonText fg to white
+    -- NonText = { fg = flatwhite.colors().white }, -- set NonText fg to white
     -- NvimTreeIndentMarker = { link = "NonText" }, -- link to NonText highlight
     -- Nothing = {} -- clear highlight of Nothing
   },
@@ -123,9 +121,9 @@ The same works in viml
 
 ```vim
 lua << EOF
-local dracula = require("dracula")
-dracula.setup({
-  -- customize dracula color palette
+local flatwhite = require("flatwhite")
+flatwhite.setup({
+  -- customize flatwhite color palette
   colors = {
     bg = "#282A36",
     fg = "#F8F8F2",
@@ -161,7 +159,7 @@ dracula.setup({
   -- overrides the default highlights see `:h synIDattr`
   overrides = {
     -- Examples
-    -- NonText = { fg = dracula.colors().white }, -- set NonText fg to white
+    -- NonText = { fg = flatwhite.colors().white }, -- set NonText fg to white
     -- NvimTreeIndentMarker = { link = "NonText" }, -- link to NonText highlight
     -- Nothing = {} -- clear highlight of Nothing
   },
@@ -172,9 +170,9 @@ EOF
 ## 🎨 Importing colors for other usage
 
 ```lua
-local colors = require('dracula').colors()
+local colors = require('flatwhite').colors()
 ```
 
 This will return the folowing table
 
-![colors](./assets/colors.png)
+<!-- ![colors](./assets/colors.png) -->
diff --git a/assets/1.png b/assets/1.png
deleted file mode 100644 (file)
index 024e141..0000000
Binary files a/assets/1.png and /dev/null differ
diff --git a/assets/2.png b/assets/2.png
deleted file mode 100644 (file)
index 7651428..0000000
Binary files a/assets/2.png and /dev/null differ
diff --git a/assets/colors.png b/assets/colors.png
deleted file mode 100644 (file)
index 55fb1ef..0000000
Binary files a/assets/colors.png and /dev/null differ
diff --git a/colors/dracula.lua b/colors/dracula.lua
deleted file mode 100644 (file)
index 8601f28..0000000
+++ /dev/null
@@ -1 +0,0 @@
-require("dracula").load()
diff --git a/colors/flatwhite.lua b/colors/flatwhite.lua
new file mode 100644 (file)
index 0000000..b7148e8
--- /dev/null
@@ -0,0 +1 @@
+require("flatwhite").load()
diff --git a/lua/dracula/groups.lua b/lua/dracula/groups.lua
deleted file mode 100644 (file)
index ca8d0f8..0000000
+++ /dev/null
@@ -1,454 +0,0 @@
----@class Highlight
----@field fg string color name or "#RRGGBB"
----@field foreground string same fg, color name or "#RRGGBB"
----@field bg string color name or "#RRGGBB"
----@field background string same bg, color name or "#RRGGBB"
----@field sp string color name or "#RRGGBB"
----@field special string same sg, color name or "#RRGGBB"
----@field blend integer value between 0 and 100
----@field bold boolean
----@field standout boolean
----@field underline boolean
----@field undercurl boolean
----@field underdouble boolean
----@field underdotted boolean
----@field underdashed boolean
----@field strikethrough boolean
----@field italic boolean
----@field reverse boolean
----@field nocombine boolean
----@field link string name of another highlight group to link to, see |:hi-link|.
----@field default string Don't override existing definition |:hi-default|
----@field ctermfg integer Sets foreground of cterm color |highlight-ctermfg|
----@field ctermbg integer Sets background of cterm color |highlight-ctermbg|
----@field cterm table cterm attribute map, like |highlight-args|.
-
----setup highlight groups
----@param configs DefaultConfig
----@return table<string, Highlight>
----@nodiscard
-local function setup(configs)
-       local colors = configs.colors
-       local endOfBuffer = {
-               fg = configs.show_end_of_buffer and colors.visual or colors.bg,
-       }
-
-       return {
-               Normal = { fg = colors.fg, bg = colors.bg },
-               NormalFloat = { fg = colors.fg, bg = colors.bg },
-               Comment = { fg = colors.comment, italic = configs.italic_comment },
-               Constant = { fg = colors.yellow },
-               String = colors.fw_green,
-               Character = { fg = colors.green },
-               Number = { fg = colors.orange },
-               Boolean = { fg = colors.cyan },
-               Float = { fg = colors.orange },
-               FloatBorder = { fg = colors.white },
-               Operator = { fg = colors.purple },
-               Keyword = { fg = colors.cyan },
-               Keywords = { fg = colors.cyan },
-               Identifier = { fg = colors.cyan },
-               Function = { fg = colors.yellow },
-               Statement = { fg = colors.purple },
-               Conditional = { fg = colors.pink },
-               Repeat = { fg = colors.pink },
-               Label = { fg = colors.cyan },
-               Exception = { fg = colors.purple },
-               PreProc = { fg = colors.yellow },
-               Include = { fg = colors.purple },
-               Define = { fg = colors.purple },
-               Title = { fg = colors.cyan },
-               Macro = { fg = colors.purple },
-               PreCondit = { fg = colors.cyan },
-               Type = { fg = colors.cyan },
-               StorageClass = { fg = colors.pink },
-               Structure = { fg = colors.yellow },
-               TypeDef = { fg = colors.yellow },
-               Special = { fg = colors.green, italic = true },
-               SpecialComment = { fg = colors.comment, italic = true },
-               Error = { fg = colors.bright_red },
-               Todo = { fg = colors.purple, bold = true, italic = true },
-               Underlined = { fg = colors.cyan, underline = true },
-
-               Cursor = { reverse = true },
-               CursorLineNr = { fg = colors.fg, bold = true },
-
-               SignColumn = { bg = colors.bg },
-
-               Conceal = { fg = colors.comment },
-               CursorColumn = { bg = colors.black },
-               CursorLine = { bg = colors.selection },
-               ColorColumn = { bg = colors.selection },
-
-               StatusLine = { fg = colors.white, bg = colors.black },
-               StatusLineNC = { fg = colors.comment },
-               StatusLineTerm = { fg = colors.white, bg = colors.black },
-               StatusLineTermNC = { fg = colors.comment },
-
-               Directory = { fg = colors.cyan },
-               DiffAdd = { fg = colors.bg, bg = colors.green },
-               DiffChange = { fg = colors.orange },
-               DiffDelete = { fg = colors.red },
-               DiffText = { fg = colors.comment },
-
-               ErrorMsg = { fg = colors.bright_red },
-               VertSplit = { fg = colors.black },
-               Folded = { fg = colors.comment },
-               FoldColumn = {},
-               Search = { fg = colors.black, bg = colors.orange },
-               IncSearch = { fg = colors.orange, bg = colors.comment },
-               LineNr = { fg = colors.comment },
-               MatchParen = { fg = colors.fg, underline = true },
-               NonText = { fg = colors.nontext },
-               Pmenu = { fg = colors.fg, bg = colors.menu },
-               PmenuSel = { fg = colors.white, bg = colors.selection },
-               PmenuSbar = { bg = colors.bg },
-               PmenuThumb = { bg = colors.selection },
-
-               Question = { fg = colors.purple },
-               QuickFixLine = { fg = colors.black, bg = colors.yellow },
-               SpecialKey = { fg = colors.nontext },
-
-               SpellBad = { fg = colors.bright_red, underline = true },
-               SpellCap = { fg = colors.yellow },
-               SpellLocal = { fg = colors.yellow },
-               SpellRare = { fg = colors.yellow },
-
-               TabLine = { fg = colors.comment, bg = colors.base4 },
-               TabLineSel = { fg = colors.white },
-               TabLineFill = { bg = colors.base4 },
-               Terminal = { fg = colors.white, bg = colors.black },
-               Visual = { bg = colors.visual },
-               VisualNOS = { fg = colors.visual },
-               WarningMsg = { fg = colors.yellow },
-               WildMenu = { fg = colors.fg, bg = colors.menu },
-
-               EndOfBuffer = endOfBuffer,
-
-               -- TreeSitter
-               ["@error"] = colors.fw_red,
-               ["@punctuation.delimiter"] = { fg = colors.fg },
-               ["@punctuation.bracket"] = { fg = colors.fg },
-               ["@punctuation.special"] = { fg = colors.fg },
-
-               ["@constant"] = { fg = colors.fg },
-               ["@constant.builtin"] = { fg = colors.fg },
-               ["@symbol"] = { fg = colors.fg },
-
-               ["@comment"] = { fg = colors.base2, italic = true },
-
-               ["@constant.macro"] = colors.fw_teal,
-               ["@string.regex"] = colors.fw_red,
-               ["@string"] = colors.fw_green,
-               ["@string.escape"] = colors.fw_blue,
-               ["@character"] = colors.fw_green,
-               ["@number"] = colors.fw_teal,
-               ["@boolean"] = colors.fw_teal,
-               ["@float"] = colors.fw_teal,
-               ["@annotation"] = { fg = colors.yellow },
-               ["@attribute"] = { fg = colors.cyan },
-               ["@namespace"] = { fg = colors.fg },
-
-               ["@function.builtin"] = { fg = colors.fg }, --, bold = true },
-               ["@function"] = { fg = colors.fg }, -- bold = true },
-               ["@function.macro"] = { fg = colors.fg },
-               ["@parameter"] = { fg = colors.fg },
-               ["@parameter.reference"] = { fg = colors.fg },
-               ["@method"] = { fg = colors.fg }, --, bold = true },
-               ["@field"] = { fg = colors.fg },
-               ["@property"] = { fg = colors.fg },
-               ["@constructor"] = { fg = colors.fg },
-
-               ["@conditional"] = colors.fw_purple,
-               ["@repeat"] = colors.fw_purple,
-               ["@label"] = colors.fw_teal,
-
-               ["@keyword"] = colors.fw_purple,
-               ["@keyword.function"] = colors.fw_purple,
-               ["@keyword.operator"] = colors.fw_purple,
-               ["@operator"] = { fg = colors.fg },
-               ["@exception"] = colors.fw_purple,
-               ["@type"] = colors.fw_teal,
-               ["@type.builtin"] = colors.fw_teal,
-               ["@type.qualifier"] = colors.fw_purple,
-               ["@structure"] = colors.fw_purple,
-               ["@include"] = colors.fw_purple,
-
-               ["@variable"] = { fg = colors.fg },
-               ["@variable.builtin"] = { fg = colors.fg },
-
-               ["@text"] = { fg = colors.orange },
-               ["@text.strong"] = { fg = colors.orange, bold = true }, -- bold
-               ["@text.emphasis"] = { fg = colors.yellow, italic = true }, -- italic
-               ["@text.underline"] = { fg = colors.orange },
-               ["@text.title"] = { fg = colors.pink, bold = true }, -- title
-               ["@text.literal"] = { fg = colors.yellow }, -- inline code
-               ["@text.uri"] = { fg = colors.yellow, italic = true }, -- urls
-               ["@text.reference"] = { fg = colors.orange, bold = true },
-
-               ["@tag"] = { fg = colors.cyan },
-               ["@tag.attribute"] = { fg = colors.green },
-               ["@tag.delimiter"] = { fg = colors.cyan },
-
-               -- Semantic
-               ["@class"] = { fg = colors.cyan },
-               ["@struct"] = { fg = colors.cyan },
-               ["@enum"] = { fg = colors.cyan },
-               ["@enumMember"] = { fg = colors.purple },
-               ["@event"] = { fg = colors.cyan },
-               ["@interface"] = { fg = colors.cyan },
-               ["@modifier"] = { fg = colors.cyan },
-               ["@regexp"] = { fg = colors.yellow },
-               ["@typeParameter"] = { fg = colors.cyan },
-               ["@decorator"] = { fg = colors.cyan },
-
-               -- HTML
-               htmlArg = { fg = colors.green },
-               htmlBold = { fg = colors.yellow, bold = true },
-               htmlEndTag = { fg = colors.cyan },
-               htmlH1 = { fg = colors.pink },
-               htmlH2 = { fg = colors.pink },
-               htmlH3 = { fg = colors.pink },
-               htmlH4 = { fg = colors.pink },
-               htmlH5 = { fg = colors.pink },
-               htmlH6 = { fg = colors.pink },
-               htmlItalic = { fg = colors.purple, italic = true },
-               htmlLink = { fg = colors.purple, underline = true },
-               htmlSpecialChar = { fg = colors.yellow },
-               htmlSpecialTagName = { fg = colors.cyan },
-               htmlTag = { fg = colors.cyan },
-               htmlTagN = { fg = colors.cyan },
-               htmlTagName = { fg = colors.cyan },
-               htmlTitle = { fg = colors.white },
-
-               -- Markdown
-               markdownBlockquote = { fg = colors.yellow, italic = true },
-               markdownBold = { fg = colors.orange, bold = true },
-               markdownCode = { fg = colors.green },
-               markdownCodeBlock = { fg = colors.orange },
-               markdownCodeDelimiter = { fg = colors.red },
-               markdownH1 = { fg = colors.pink, bold = true },
-               markdownH2 = { fg = colors.pink, bold = true },
-               markdownH3 = { fg = colors.pink, bold = true },
-               markdownH4 = { fg = colors.pink, bold = true },
-               markdownH5 = { fg = colors.pink, bold = true },
-               markdownH6 = { fg = colors.pink, bold = true },
-               markdownHeadingDelimiter = { fg = colors.red },
-               markdownHeadingRule = { fg = colors.comment },
-               markdownId = { fg = colors.purple },
-               markdownIdDeclaration = { fg = colors.cyan },
-               markdownIdDelimiter = { fg = colors.purple },
-               markdownItalic = { fg = colors.yellow, italic = true },
-               markdownLinkDelimiter = { fg = colors.purple },
-               markdownLinkText = { fg = colors.pink },
-               markdownListMarker = { fg = colors.cyan },
-               markdownOrderedListMarker = { fg = colors.red },
-               markdownRule = { fg = colors.comment },
-
-               --  Diff
-               diffAdded = { fg = colors.green },
-               diffRemoved = { fg = colors.red },
-               diffFileId = { fg = colors.yellow, bold = true, reverse = true },
-               diffFile = { fg = colors.nontext },
-               diffNewFile = { fg = colors.green },
-               diffOldFile = { fg = colors.red },
-
-               debugPc = { bg = colors.cyan },
-               debugBreakpoint = { fg = colors.red, reverse = true },
-
-               -- Git Signs
-               GitSignsAdd = colors.fw_green,
-               GitSignsChange = colors.fw_orange,
-               GitSignsDelete = colors.fw_red,
-               GitSignsAddLn = { fg = colors.black, bg = colors.bright_green },
-               GitSignsChangeLn = { fg = colors.black, bg = colors.cyan },
-               GitSignsDeleteLn = { fg = colors.black, bg = colors.bright_red },
-               GitSignsCurrentLineBlame = { fg = colors.white },
-
-               -- Telescope
-               TelescopePromptBorder = { fg = colors.comment },
-               TelescopeResultsBorder = { fg = colors.comment },
-               TelescopePreviewBorder = { fg = colors.comment },
-               TelescopeSelection = { fg = colors.white, bg = colors.selection },
-               TelescopeMultiSelection = { fg = colors.purple, bg = colors.selection },
-               TelescopeNormal = { fg = colors.fg, bg = colors.bg },
-               TelescopeMatching = { fg = colors.green },
-               TelescopePromptPrefix = { fg = colors.purple },
-
-               -- NvimTree
-               NvimTreeNormal = { fg = colors.fg, bg = colors.menu },
-               NvimTreeVertSplit = { fg = colors.bg, bg = colors.bg },
-               NvimTreeRootFolder = { fg = colors.fg, bold = true },
-               NvimTreeGitDirty = { fg = colors.yellow },
-               NvimTreeGitNew = { fg = colors.bright_green },
-               NvimTreeImageFile = { fg = colors.pink },
-               NvimTreeFolderIcon = { fg = colors.purple },
-               NvimTreeIndentMarker = { fg = colors.nontext },
-               NvimTreeEmptyFolderName = { fg = colors.comment },
-               NvimTreeFolderName = { fg = colors.fg },
-               NvimTreeSpecialFile = { fg = colors.pink, underline = true },
-               NvimTreeOpenedFolderName = { fg = colors.fg },
-               NvimTreeCursorLine = { bg = colors.selection },
-               NvimTreeIn = { bg = colors.selection },
-
-               NvimTreeEndOfBuffer = endOfBuffer,
-
-               -- NeoTree
-               NeoTreeNormal = { fg = colors.fg, bg = colors.menu },
-               NeoTreeNormalNC = { fg = colors.fg, bg = colors.menu },
-               NeoTreeDirectoryName = { fg = colors.fg },
-               NeoTreeGitUnstaged = { fg = colors.bright_magenta },
-               NeoTreeGitModified = { fg = colors.bright_magenta },
-               NeoTreeGitUntracked = { fg = colors.bright_green },
-               NeoTreeDirectoryIcon = { fg = colors.purple },
-               NeoTreeIndentMarker = { fg = colors.nontext },
-               NeoTreeDotfile = { fg = colors.comment },
-
-               -- Bufferline
-               BufferLineIndicatorSelected = { fg = colors.purple },
-               BufferLineFill = { bg = colors.black },
-               BufferLineBufferSelected = { bg = colors.bg },
-
-               -- LSP
-               DiagnosticError = { fg = colors.red },
-               DiagnosticWarn = { fg = colors.yellow },
-               DiagnosticInfo = { fg = colors.cyan },
-               DiagnosticHint = { fg = colors.cyan },
-               DiagnosticUnderlineError = { undercurl = true, sp = colors.red },
-               DiagnosticUnderlineWarn = { undercurl = true, sp = colors.yellow },
-               DiagnosticUnderlineInfo = { undercurl = true, sp = colors.cyan },
-               DiagnosticUnderlineHint = { undercurl = true, sp = colors.cyan },
-               DiagnosticSignError = colors.fw_red,
-               DiagnosticSignWarn = colors.fw_orange,
-               DiagnosticSignInfo = colors.fw_teal,
-               DiagnosticSignHint = colors.fw_teal,
-               DiagnosticFloatingError = { fg = colors.red },
-               DiagnosticFloatingWarn = { fg = colors.yellow },
-               DiagnosticFloatingInfo = { fg = colors.cyan },
-               DiagnosticFloatingHint = { fg = colors.cyan },
-               DiagnosticVirtualTextError = { fg = colors.red },
-               DiagnosticVirtualTextWarn = { fg = colors.yellow },
-               DiagnosticVirtualTextInfo = { fg = colors.cyan },
-               DiagnosticVirtualTextHint = { fg = colors.cyan },
-
-               LspDiagnosticsDefaultError = { fg = colors.red },
-               LspDiagnosticsDefaultWarning = { fg = colors.yellow },
-               LspDiagnosticsDefaultInformation = { fg = colors.cyan },
-               LspDiagnosticsDefaultHint = { fg = colors.cyan },
-               LspDiagnosticsUnderlineError = { fg = colors.red, undercurl = true },
-               LspDiagnosticsUnderlineWarning = { fg = colors.yellow, undercurl = true },
-               LspDiagnosticsUnderlineInformation = { fg = colors.cyan, undercurl = true },
-               LspDiagnosticsUnderlineHint = { fg = colors.cyan, undercurl = true },
-               LspReferenceText = { fg = colors.orange },
-               LspReferenceRead = { fg = colors.orange },
-               LspReferenceWrite = { fg = colors.orange },
-               LspCodeLens = { fg = colors.cyan },
-
-               --LSP Saga
-               -- LspFloatWinNormal = { fg = colors.fg, bg = colors.menu },
-               -- LspFloatWinBorder = { fg = colors.comment },
-               -- LspSagaHoverBorder = { fg = colors.comment },
-               -- LspSagaSignatureHelpBorder = { fg = colors.comment },
-               -- LspSagaCodeActionBorder = { fg = colors.comment },
-               -- LspSagaDefPreviewBorder = { fg = colors.comment },
-               -- LspLinesDiagBorder = { fg = colors.comment },
-               -- LspSagaRenameBorder = { fg = colors.comment },
-               -- LspSagaBorderTitle = { fg = colors.menu },
-               -- LSPSagaDiagnosticTruncateLine = { fg = colors.comment },
-               -- LspSagaDiagnosticBorder = { fg = colors.comment },
-               -- LspSagaShTruncateLine = { fg = colors.comment },
-               -- LspSagaDocTruncateLine = { fg = colors.comment },
-               -- LspSagaLspFinderBorder = { fg = colors.comment },
-
-               -- IndentBlankLine
-               IndentBlanklineContextChar = { fg = colors.bright_red, nocombine = true },
-               -- Whitespace = { fg = colors.base3 },
-               IndentBlanklineChar = { fg = colors.base4 },
-
-               -- Nvim compe
-               CmpItemAbbrDeprecated = { fg = colors.white, bg = colors.menu },
-               CmpItemAbbrMatch = { fg = colors.cyan, bg = colors.menu },
-
-               --barbar
-               BufferCurrentTarget = { fg = colors.red },
-               BufferVisibleTarget = { fg = colors.red },
-               BufferInactiveTarget = { fg = colors.red },
-
-               -- Compe
-               CompeDocumentation = { link = "Pmenu" },
-               CompeDocumentationBorder = { link = "Pmenu" },
-
-               -- Cmp
-               CmpItemKind = { link = "Pmenu" },
-               CmpItemAbbr = { link = "Pmenu" },
-               CmpItemKindMethod = { link = "@method" },
-               CmpItemKindText = { link = "@text" },
-               CmpItemKindFunction = { link = "@function" },
-               CmpItemKindConstructor = { link = "@type" },
-               CmpItemKindVariable = { link = "@variable" },
-               CmpItemKindClass = { link = "@type" },
-               CmpItemKindInterface = { link = "@type" },
-               CmpItemKindModule = { link = "@namespace" },
-               CmpItemKindProperty = { link = "@property" },
-               CmpItemKindOperator = { link = "@operator" },
-               CmpItemKindReference = { link = "@parameter.reference" },
-               CmpItemKindUnit = { link = "@field" },
-               CmpItemKindValue = { link = "@field" },
-               CmpItemKindField = { link = "@field" },
-               CmpItemKindEnum = { link = "@field" },
-               CmpItemKindKeyword = { link = "@keyword" },
-               CmpItemKindSnippet = { link = "@text" },
-               CmpItemKindColor = { link = "DevIconCss" },
-               CmpItemKindFile = { link = "TSURI" },
-               CmpItemKindFolder = { link = "TSURI" },
-               CmpItemKindEvent = { link = "@constant" },
-               CmpItemKindEnumMember = { link = "@field" },
-               CmpItemKindConstant = { link = "@constant" },
-               CmpItemKindStruct = { link = "@structure" },
-               CmpItemKindTypeParameter = { link = "@parameter" },
-
-               -- navic
-               NavicIconsFile = { link = "CmpItemKindFile" },
-               NavicIconsModule = { link = "CmpItemKindModule" },
-               NavicIconsNamespace = { link = "CmpItemKindModule" },
-               NavicIconsPackage = { link = "CmpItemKindModule" },
-               NavicIconsClass = { link = "CmpItemKindClass" },
-               NavicIconsMethod = { link = "CmpItemKindMethod" },
-               NavicIconsProperty = { link = "CmpItemKindProperty" },
-               NavicIconsField = { link = "CmpItemKindField" },
-               NavicIconsConstructor = { link = "CmpItemKindConstructor" },
-               NavicIconsEnum = { link = "CmpItemKindEnum" },
-               NavicIconsInterface = { link = "CmpItemKindInterface" },
-               NavicIconsFunction = { link = "CmpItemKindFunction" },
-               NavicIconsVariable = { link = "CmpItemKindVariable" },
-               NavicIconsConstant = { link = "CmpItemKindConstant" },
-               NavicIconsString = { link = "String" },
-               NavicIconsNumber = { link = "Number" },
-               NavicIconsBoolean = { link = "Boolean" },
-               NavicIconsArray = { link = "CmpItemKindClass" },
-               NavicIconsObject = { link = "CmpItemKindClass" },
-               NavicIconsKey = { link = "CmpItemKindKeyword" },
-               NavicIconsKeyword = { link = "CmpItemKindKeyword" },
-               NavicIconsNull = { fg = "blue" },
-               NavicIconsEnumMember = { link = "CmpItemKindEnumMember" },
-               NavicIconsStruct = { link = "CmpItemKindStruct" },
-               NavicIconsEvent = { link = "CmpItemKindEvent" },
-               NavicIconsOperator = { link = "CmpItemKindOperator" },
-               NavicIconsTypeParameter = { link = "CmpItemKindTypeParameter" },
-               NavicText = { fg = "gray" },
-               NavicSeparator = { fg = "gray" },
-
-               -- TS rainbow colors
-               rainbowcol1 = { fg = colors.red },
-               rainbowcol2 = { fg = colors.green },
-               rainbowcol3 = { fg = colors.yellow },
-               rainbowcol4 = { fg = colors.purple },
-               rainbowcol5 = { fg = colors.pink },
-               rainbowcol6 = { fg = colors.cyan },
-               rainbowcol7 = { fg = colors.white },
-       }
-end
-
-return {
-       setup = setup,
-}
diff --git a/lua/dracula/init.lua b/lua/dracula/init.lua
deleted file mode 100644 (file)
index 73d7d51..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-local o = vim.o
-local g = vim.g
-local cmd = vim.cmd
-local nvim_set_hl = vim.api.nvim_set_hl
-local tbl_deep_extend = vim.tbl_deep_extend
-
----@class DefaultConfig
----@field italic_comment boolean
----@field transparent_bg boolean
----@field show_end_of_buffer boolean
----@field lualine_bg_color string?
----@field colors Palette
----@field overrides table<string, Highlight>
-local DEFAULT_CONFIG = {
-   italic_comment = false,
-   transparent_bg = false,
-   show_end_of_buffer = false,
-   lualine_bg_color = nil,
-   colors = require("dracula.palette"),
-   overrides = {},
-}
-
-local TRANSPARENTS = {
-   "Normal",
-   "SignColumn",
-   "NvimTreeNormal",
-   "NvimTreeVertSplit",
-}
-
-local function apply_term_colors(colors)
-   g.terminal_color_0 = colors.black
-   g.terminal_color_1 = colors.red
-   g.terminal_color_2 = colors.green
-   g.terminal_color_3 = colors.yellow
-   g.terminal_color_4 = colors.purple
-   g.terminal_color_5 = colors.pink
-   g.terminal_color_6 = colors.cyan
-   g.terminal_color_7 = colors.white
-   g.terminal_color_8 = colors.selection
-   g.terminal_color_9 = colors.bright_red
-   g.terminal_color_10 = colors.bright_green
-   g.terminal_color_11 = colors.bright_yellow
-   g.terminal_color_12 = colors.bright_blue
-   g.terminal_color_13 = colors.bright_magenta
-   g.terminal_color_14 = colors.bright_cyan
-   g.terminal_color_15 = colors.bright_white
-   g.terminal_color_background = colors.bg
-   g.terminal_color_foreground = colors.fg
-end
-
----apply dracula colorscheme
----@param configs DefaultConfig
-local function apply(configs)
-   local colors = configs.colors
-   apply_term_colors(colors)
-   local groups = require("dracula.groups").setup(configs)
-
-   -- apply transparents
-   if configs.transparent_bg then
-      for _, group in ipairs(TRANSPARENTS) do
-         groups[group].bg = nil
-      end
-   end
-
-   for group, setting in pairs(configs.overrides) do
-      groups[group] = setting
-   end
-
-   -- set defined highlights
-   for group, setting in pairs(groups) do
-      nvim_set_hl(0, group, setting)
-   end
-end
-
-local local_configs = DEFAULT_CONFIG
-
----setup dracula colorscheme
----@param configs DefaultConfig?
-local function setup(configs)
-   if type(configs) == "table" then
-      local_configs = tbl_deep_extend("force", DEFAULT_CONFIG, configs) --[[@as DefaultConfig]]
-   end
-end
-
----load dracula colorscheme
-local function load()
-   if vim.version().minor < 7 then
-      vim.notify_once("dracula.nvim: you must use neovim 0.7 or higher")
-      return
-   end
-
-   -- reset colors
-   if g.colors_name then
-      cmd("hi clear")
-   end
-
-   if vim.fn.exists("syntax_on") then
-      cmd("syntax reset")
-   end
-
-   o.background = "dark"
-   o.termguicolors = true
-   g.colors_name = "dracula"
-
-   apply(local_configs)
-end
-
-return {
-   load = load,
-   setup = setup,
-   configs = function() return local_configs end,
-   colors = function() return local_configs.colors end,
-}
diff --git a/lua/dracula/palette.lua b/lua/dracula/palette.lua
deleted file mode 100644 (file)
index 55a6459..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
--- wtf
-local base1 = "#605a52"
-local base2 = "#93836c"
-local base3 = "#b9a992"
-local base4 = "#dcd3c6"
-local base5 = "#e4ddd2"
-local base6 = "#f1ece4"
-local base7 = "#f7f3ee"
-local accent = "#6a4cff"
-
-local orange_text = "#5b5143"
-local orange_text_sec = "#957f5f"
-local orange_bg = "#f7e0c3"
-
-local green_text = "#525643"
-local green_text_sec = "#81895d"
-local green_bg = "#e2e9c1"
-
-local teal_text = "#465953"
-local teal_text_sec = "#5f8c7d"
-local teal_bg = "#d2ebe3"
-
-local blue_text = "#4c5361"
-local blue_text_sec = "#7382a0"
-local blue_bg = "#dde4f2"
-
-local purple_text = "#614c61"
-local purple_text_sec = "#9c739c"
-local purple_bg = "#f1ddf1"
-
-local red_text = "#5b4343"
-local red_text_sec = "#955f5f"
-local red_bg = "#f6cfcb"
-
-local diff_add = "#2db448"
-local diff_change = "#f2a60d"
-local diff_change_dark = "#795306"
-local diff_delete = "#ff1414"
-local diff_renamed = "#52aeff"
-
-local white = "#ffffff"
----@class Palette
---
-return {
-       base1 = "#605a52",
-       base2 = "#93836c",
-       base3 = "#b9a992",
-       base4 = "#dcd3c6",
-       base5 = "#e4ddd2",
-       base6 = "#f1ece4",
-       base7 = "#f7f3ee",
-       accent = "#6a4cff",
-       orange_text = "#5b5143",
-       orange_text_sec = "#957f5f",
-       orange_bg = "#f7e0c3",
-       green_text = "#525643",
-       green_text_sec = "#81895d",
-       green_bg = "#e2e9c1",
-       teal_text = "#465953",
-       teal_text_sec = "#5f8c7d",
-       teal_bg = "#d2ebe3",
-       blue_text = "#4c5361",
-       blue_text_sec = "#7382a0",
-       blue_bg = "#dde4f2",
-       purple_text = "#614c61",
-       purple_text_sec = "#9c739c",
-       purple_bg = "#f1ddf1",
-       red_text = "#5b4343",
-       red_text_sec = "#955f5f",
-       red_bg = "#f6cfcb",
-       diff_add = "#2db448",
-       diff_change = "#f2a60d",
-       diff_change_dark = "#795306",
-       diff_delete = "#ff1414",
-       diff_renamed = "#52aeff",
-       bg = base7,
-       fg = base1,
-       selection = base4,
-       comment = base2,
-       red = red_text_sec,
-       orange = orange_text_sec,
-       yellow = base2,
-       green = green_text_sec,
-       purple = purple_text_sec,
-       cyan = teal_text_sec,
-       pink = purple_text_sec,
-       bright_red = red_text_sec,
-       bright_green = green_text_sec,
-       bright_yellow = orange_text_sec,
-       bright_blue = blue_text_sec,
-       bright_magenta = purple_text_sec,
-       bright_cyan = teal_text_sec,
-       bright_white = "#000000",
-       menu = base4,
-       visual = base4,
-       gutter_fg = "#4B5263",
-       nontext = "#3B4048",
-       white = base1,
-       black = base7,
-       fw_green = { fg = green_text, bg = green_bg },
-       fw_teal = { fg = teal_text, bg = teal_bg },
-       fw_blue = { fg = blue_text, bg = blue_bg },
-       fw_orange = { fg = orange_text, bg = orange_bg },
-       fw_purple = { fg = purple_text, bg = purple_bg },
-       fw_red = { fg = red_text, bg = red_bg },
-}
diff --git a/lua/flatwhite/groups.lua b/lua/flatwhite/groups.lua
new file mode 100644 (file)
index 0000000..ca8d0f8
--- /dev/null
@@ -0,0 +1,454 @@
+---@class Highlight
+---@field fg string color name or "#RRGGBB"
+---@field foreground string same fg, color name or "#RRGGBB"
+---@field bg string color name or "#RRGGBB"
+---@field background string same bg, color name or "#RRGGBB"
+---@field sp string color name or "#RRGGBB"
+---@field special string same sg, color name or "#RRGGBB"
+---@field blend integer value between 0 and 100
+---@field bold boolean
+---@field standout boolean
+---@field underline boolean
+---@field undercurl boolean
+---@field underdouble boolean
+---@field underdotted boolean
+---@field underdashed boolean
+---@field strikethrough boolean
+---@field italic boolean
+---@field reverse boolean
+---@field nocombine boolean
+---@field link string name of another highlight group to link to, see |:hi-link|.
+---@field default string Don't override existing definition |:hi-default|
+---@field ctermfg integer Sets foreground of cterm color |highlight-ctermfg|
+---@field ctermbg integer Sets background of cterm color |highlight-ctermbg|
+---@field cterm table cterm attribute map, like |highlight-args|.
+
+---setup highlight groups
+---@param configs DefaultConfig
+---@return table<string, Highlight>
+---@nodiscard
+local function setup(configs)
+       local colors = configs.colors
+       local endOfBuffer = {
+               fg = configs.show_end_of_buffer and colors.visual or colors.bg,
+       }
+
+       return {
+               Normal = { fg = colors.fg, bg = colors.bg },
+               NormalFloat = { fg = colors.fg, bg = colors.bg },
+               Comment = { fg = colors.comment, italic = configs.italic_comment },
+               Constant = { fg = colors.yellow },
+               String = colors.fw_green,
+               Character = { fg = colors.green },
+               Number = { fg = colors.orange },
+               Boolean = { fg = colors.cyan },
+               Float = { fg = colors.orange },
+               FloatBorder = { fg = colors.white },
+               Operator = { fg = colors.purple },
+               Keyword = { fg = colors.cyan },
+               Keywords = { fg = colors.cyan },
+               Identifier = { fg = colors.cyan },
+               Function = { fg = colors.yellow },
+               Statement = { fg = colors.purple },
+               Conditional = { fg = colors.pink },
+               Repeat = { fg = colors.pink },
+               Label = { fg = colors.cyan },
+               Exception = { fg = colors.purple },
+               PreProc = { fg = colors.yellow },
+               Include = { fg = colors.purple },
+               Define = { fg = colors.purple },
+               Title = { fg = colors.cyan },
+               Macro = { fg = colors.purple },
+               PreCondit = { fg = colors.cyan },
+               Type = { fg = colors.cyan },
+               StorageClass = { fg = colors.pink },
+               Structure = { fg = colors.yellow },
+               TypeDef = { fg = colors.yellow },
+               Special = { fg = colors.green, italic = true },
+               SpecialComment = { fg = colors.comment, italic = true },
+               Error = { fg = colors.bright_red },
+               Todo = { fg = colors.purple, bold = true, italic = true },
+               Underlined = { fg = colors.cyan, underline = true },
+
+               Cursor = { reverse = true },
+               CursorLineNr = { fg = colors.fg, bold = true },
+
+               SignColumn = { bg = colors.bg },
+
+               Conceal = { fg = colors.comment },
+               CursorColumn = { bg = colors.black },
+               CursorLine = { bg = colors.selection },
+               ColorColumn = { bg = colors.selection },
+
+               StatusLine = { fg = colors.white, bg = colors.black },
+               StatusLineNC = { fg = colors.comment },
+               StatusLineTerm = { fg = colors.white, bg = colors.black },
+               StatusLineTermNC = { fg = colors.comment },
+
+               Directory = { fg = colors.cyan },
+               DiffAdd = { fg = colors.bg, bg = colors.green },
+               DiffChange = { fg = colors.orange },
+               DiffDelete = { fg = colors.red },
+               DiffText = { fg = colors.comment },
+
+               ErrorMsg = { fg = colors.bright_red },
+               VertSplit = { fg = colors.black },
+               Folded = { fg = colors.comment },
+               FoldColumn = {},
+               Search = { fg = colors.black, bg = colors.orange },
+               IncSearch = { fg = colors.orange, bg = colors.comment },
+               LineNr = { fg = colors.comment },
+               MatchParen = { fg = colors.fg, underline = true },
+               NonText = { fg = colors.nontext },
+               Pmenu = { fg = colors.fg, bg = colors.menu },
+               PmenuSel = { fg = colors.white, bg = colors.selection },
+               PmenuSbar = { bg = colors.bg },
+               PmenuThumb = { bg = colors.selection },
+
+               Question = { fg = colors.purple },
+               QuickFixLine = { fg = colors.black, bg = colors.yellow },
+               SpecialKey = { fg = colors.nontext },
+
+               SpellBad = { fg = colors.bright_red, underline = true },
+               SpellCap = { fg = colors.yellow },
+               SpellLocal = { fg = colors.yellow },
+               SpellRare = { fg = colors.yellow },
+
+               TabLine = { fg = colors.comment, bg = colors.base4 },
+               TabLineSel = { fg = colors.white },
+               TabLineFill = { bg = colors.base4 },
+               Terminal = { fg = colors.white, bg = colors.black },
+               Visual = { bg = colors.visual },
+               VisualNOS = { fg = colors.visual },
+               WarningMsg = { fg = colors.yellow },
+               WildMenu = { fg = colors.fg, bg = colors.menu },
+
+               EndOfBuffer = endOfBuffer,
+
+               -- TreeSitter
+               ["@error"] = colors.fw_red,
+               ["@punctuation.delimiter"] = { fg = colors.fg },
+               ["@punctuation.bracket"] = { fg = colors.fg },
+               ["@punctuation.special"] = { fg = colors.fg },
+
+               ["@constant"] = { fg = colors.fg },
+               ["@constant.builtin"] = { fg = colors.fg },
+               ["@symbol"] = { fg = colors.fg },
+
+               ["@comment"] = { fg = colors.base2, italic = true },
+
+               ["@constant.macro"] = colors.fw_teal,
+               ["@string.regex"] = colors.fw_red,
+               ["@string"] = colors.fw_green,
+               ["@string.escape"] = colors.fw_blue,
+               ["@character"] = colors.fw_green,
+               ["@number"] = colors.fw_teal,
+               ["@boolean"] = colors.fw_teal,
+               ["@float"] = colors.fw_teal,
+               ["@annotation"] = { fg = colors.yellow },
+               ["@attribute"] = { fg = colors.cyan },
+               ["@namespace"] = { fg = colors.fg },
+
+               ["@function.builtin"] = { fg = colors.fg }, --, bold = true },
+               ["@function"] = { fg = colors.fg }, -- bold = true },
+               ["@function.macro"] = { fg = colors.fg },
+               ["@parameter"] = { fg = colors.fg },
+               ["@parameter.reference"] = { fg = colors.fg },
+               ["@method"] = { fg = colors.fg }, --, bold = true },
+               ["@field"] = { fg = colors.fg },
+               ["@property"] = { fg = colors.fg },
+               ["@constructor"] = { fg = colors.fg },
+
+               ["@conditional"] = colors.fw_purple,
+               ["@repeat"] = colors.fw_purple,
+               ["@label"] = colors.fw_teal,
+
+               ["@keyword"] = colors.fw_purple,
+               ["@keyword.function"] = colors.fw_purple,
+               ["@keyword.operator"] = colors.fw_purple,
+               ["@operator"] = { fg = colors.fg },
+               ["@exception"] = colors.fw_purple,
+               ["@type"] = colors.fw_teal,
+               ["@type.builtin"] = colors.fw_teal,
+               ["@type.qualifier"] = colors.fw_purple,
+               ["@structure"] = colors.fw_purple,
+               ["@include"] = colors.fw_purple,
+
+               ["@variable"] = { fg = colors.fg },
+               ["@variable.builtin"] = { fg = colors.fg },
+
+               ["@text"] = { fg = colors.orange },
+               ["@text.strong"] = { fg = colors.orange, bold = true }, -- bold
+               ["@text.emphasis"] = { fg = colors.yellow, italic = true }, -- italic
+               ["@text.underline"] = { fg = colors.orange },
+               ["@text.title"] = { fg = colors.pink, bold = true }, -- title
+               ["@text.literal"] = { fg = colors.yellow }, -- inline code
+               ["@text.uri"] = { fg = colors.yellow, italic = true }, -- urls
+               ["@text.reference"] = { fg = colors.orange, bold = true },
+
+               ["@tag"] = { fg = colors.cyan },
+               ["@tag.attribute"] = { fg = colors.green },
+               ["@tag.delimiter"] = { fg = colors.cyan },
+
+               -- Semantic
+               ["@class"] = { fg = colors.cyan },
+               ["@struct"] = { fg = colors.cyan },
+               ["@enum"] = { fg = colors.cyan },
+               ["@enumMember"] = { fg = colors.purple },
+               ["@event"] = { fg = colors.cyan },
+               ["@interface"] = { fg = colors.cyan },
+               ["@modifier"] = { fg = colors.cyan },
+               ["@regexp"] = { fg = colors.yellow },
+               ["@typeParameter"] = { fg = colors.cyan },
+               ["@decorator"] = { fg = colors.cyan },
+
+               -- HTML
+               htmlArg = { fg = colors.green },
+               htmlBold = { fg = colors.yellow, bold = true },
+               htmlEndTag = { fg = colors.cyan },
+               htmlH1 = { fg = colors.pink },
+               htmlH2 = { fg = colors.pink },
+               htmlH3 = { fg = colors.pink },
+               htmlH4 = { fg = colors.pink },
+               htmlH5 = { fg = colors.pink },
+               htmlH6 = { fg = colors.pink },
+               htmlItalic = { fg = colors.purple, italic = true },
+               htmlLink = { fg = colors.purple, underline = true },
+               htmlSpecialChar = { fg = colors.yellow },
+               htmlSpecialTagName = { fg = colors.cyan },
+               htmlTag = { fg = colors.cyan },
+               htmlTagN = { fg = colors.cyan },
+               htmlTagName = { fg = colors.cyan },
+               htmlTitle = { fg = colors.white },
+
+               -- Markdown
+               markdownBlockquote = { fg = colors.yellow, italic = true },
+               markdownBold = { fg = colors.orange, bold = true },
+               markdownCode = { fg = colors.green },
+               markdownCodeBlock = { fg = colors.orange },
+               markdownCodeDelimiter = { fg = colors.red },
+               markdownH1 = { fg = colors.pink, bold = true },
+               markdownH2 = { fg = colors.pink, bold = true },
+               markdownH3 = { fg = colors.pink, bold = true },
+               markdownH4 = { fg = colors.pink, bold = true },
+               markdownH5 = { fg = colors.pink, bold = true },
+               markdownH6 = { fg = colors.pink, bold = true },
+               markdownHeadingDelimiter = { fg = colors.red },
+               markdownHeadingRule = { fg = colors.comment },
+               markdownId = { fg = colors.purple },
+               markdownIdDeclaration = { fg = colors.cyan },
+               markdownIdDelimiter = { fg = colors.purple },
+               markdownItalic = { fg = colors.yellow, italic = true },
+               markdownLinkDelimiter = { fg = colors.purple },
+               markdownLinkText = { fg = colors.pink },
+               markdownListMarker = { fg = colors.cyan },
+               markdownOrderedListMarker = { fg = colors.red },
+               markdownRule = { fg = colors.comment },
+
+               --  Diff
+               diffAdded = { fg = colors.green },
+               diffRemoved = { fg = colors.red },
+               diffFileId = { fg = colors.yellow, bold = true, reverse = true },
+               diffFile = { fg = colors.nontext },
+               diffNewFile = { fg = colors.green },
+               diffOldFile = { fg = colors.red },
+
+               debugPc = { bg = colors.cyan },
+               debugBreakpoint = { fg = colors.red, reverse = true },
+
+               -- Git Signs
+               GitSignsAdd = colors.fw_green,
+               GitSignsChange = colors.fw_orange,
+               GitSignsDelete = colors.fw_red,
+               GitSignsAddLn = { fg = colors.black, bg = colors.bright_green },
+               GitSignsChangeLn = { fg = colors.black, bg = colors.cyan },
+               GitSignsDeleteLn = { fg = colors.black, bg = colors.bright_red },
+               GitSignsCurrentLineBlame = { fg = colors.white },
+
+               -- Telescope
+               TelescopePromptBorder = { fg = colors.comment },
+               TelescopeResultsBorder = { fg = colors.comment },
+               TelescopePreviewBorder = { fg = colors.comment },
+               TelescopeSelection = { fg = colors.white, bg = colors.selection },
+               TelescopeMultiSelection = { fg = colors.purple, bg = colors.selection },
+               TelescopeNormal = { fg = colors.fg, bg = colors.bg },
+               TelescopeMatching = { fg = colors.green },
+               TelescopePromptPrefix = { fg = colors.purple },
+
+               -- NvimTree
+               NvimTreeNormal = { fg = colors.fg, bg = colors.menu },
+               NvimTreeVertSplit = { fg = colors.bg, bg = colors.bg },
+               NvimTreeRootFolder = { fg = colors.fg, bold = true },
+               NvimTreeGitDirty = { fg = colors.yellow },
+               NvimTreeGitNew = { fg = colors.bright_green },
+               NvimTreeImageFile = { fg = colors.pink },
+               NvimTreeFolderIcon = { fg = colors.purple },
+               NvimTreeIndentMarker = { fg = colors.nontext },
+               NvimTreeEmptyFolderName = { fg = colors.comment },
+               NvimTreeFolderName = { fg = colors.fg },
+               NvimTreeSpecialFile = { fg = colors.pink, underline = true },
+               NvimTreeOpenedFolderName = { fg = colors.fg },
+               NvimTreeCursorLine = { bg = colors.selection },
+               NvimTreeIn = { bg = colors.selection },
+
+               NvimTreeEndOfBuffer = endOfBuffer,
+
+               -- NeoTree
+               NeoTreeNormal = { fg = colors.fg, bg = colors.menu },
+               NeoTreeNormalNC = { fg = colors.fg, bg = colors.menu },
+               NeoTreeDirectoryName = { fg = colors.fg },
+               NeoTreeGitUnstaged = { fg = colors.bright_magenta },
+               NeoTreeGitModified = { fg = colors.bright_magenta },
+               NeoTreeGitUntracked = { fg = colors.bright_green },
+               NeoTreeDirectoryIcon = { fg = colors.purple },
+               NeoTreeIndentMarker = { fg = colors.nontext },
+               NeoTreeDotfile = { fg = colors.comment },
+
+               -- Bufferline
+               BufferLineIndicatorSelected = { fg = colors.purple },
+               BufferLineFill = { bg = colors.black },
+               BufferLineBufferSelected = { bg = colors.bg },
+
+               -- LSP
+               DiagnosticError = { fg = colors.red },
+               DiagnosticWarn = { fg = colors.yellow },
+               DiagnosticInfo = { fg = colors.cyan },
+               DiagnosticHint = { fg = colors.cyan },
+               DiagnosticUnderlineError = { undercurl = true, sp = colors.red },
+               DiagnosticUnderlineWarn = { undercurl = true, sp = colors.yellow },
+               DiagnosticUnderlineInfo = { undercurl = true, sp = colors.cyan },
+               DiagnosticUnderlineHint = { undercurl = true, sp = colors.cyan },
+               DiagnosticSignError = colors.fw_red,
+               DiagnosticSignWarn = colors.fw_orange,
+               DiagnosticSignInfo = colors.fw_teal,
+               DiagnosticSignHint = colors.fw_teal,
+               DiagnosticFloatingError = { fg = colors.red },
+               DiagnosticFloatingWarn = { fg = colors.yellow },
+               DiagnosticFloatingInfo = { fg = colors.cyan },
+               DiagnosticFloatingHint = { fg = colors.cyan },
+               DiagnosticVirtualTextError = { fg = colors.red },
+               DiagnosticVirtualTextWarn = { fg = colors.yellow },
+               DiagnosticVirtualTextInfo = { fg = colors.cyan },
+               DiagnosticVirtualTextHint = { fg = colors.cyan },
+
+               LspDiagnosticsDefaultError = { fg = colors.red },
+               LspDiagnosticsDefaultWarning = { fg = colors.yellow },
+               LspDiagnosticsDefaultInformation = { fg = colors.cyan },
+               LspDiagnosticsDefaultHint = { fg = colors.cyan },
+               LspDiagnosticsUnderlineError = { fg = colors.red, undercurl = true },
+               LspDiagnosticsUnderlineWarning = { fg = colors.yellow, undercurl = true },
+               LspDiagnosticsUnderlineInformation = { fg = colors.cyan, undercurl = true },
+               LspDiagnosticsUnderlineHint = { fg = colors.cyan, undercurl = true },
+               LspReferenceText = { fg = colors.orange },
+               LspReferenceRead = { fg = colors.orange },
+               LspReferenceWrite = { fg = colors.orange },
+               LspCodeLens = { fg = colors.cyan },
+
+               --LSP Saga
+               -- LspFloatWinNormal = { fg = colors.fg, bg = colors.menu },
+               -- LspFloatWinBorder = { fg = colors.comment },
+               -- LspSagaHoverBorder = { fg = colors.comment },
+               -- LspSagaSignatureHelpBorder = { fg = colors.comment },
+               -- LspSagaCodeActionBorder = { fg = colors.comment },
+               -- LspSagaDefPreviewBorder = { fg = colors.comment },
+               -- LspLinesDiagBorder = { fg = colors.comment },
+               -- LspSagaRenameBorder = { fg = colors.comment },
+               -- LspSagaBorderTitle = { fg = colors.menu },
+               -- LSPSagaDiagnosticTruncateLine = { fg = colors.comment },
+               -- LspSagaDiagnosticBorder = { fg = colors.comment },
+               -- LspSagaShTruncateLine = { fg = colors.comment },
+               -- LspSagaDocTruncateLine = { fg = colors.comment },
+               -- LspSagaLspFinderBorder = { fg = colors.comment },
+
+               -- IndentBlankLine
+               IndentBlanklineContextChar = { fg = colors.bright_red, nocombine = true },
+               -- Whitespace = { fg = colors.base3 },
+               IndentBlanklineChar = { fg = colors.base4 },
+
+               -- Nvim compe
+               CmpItemAbbrDeprecated = { fg = colors.white, bg = colors.menu },
+               CmpItemAbbrMatch = { fg = colors.cyan, bg = colors.menu },
+
+               --barbar
+               BufferCurrentTarget = { fg = colors.red },
+               BufferVisibleTarget = { fg = colors.red },
+               BufferInactiveTarget = { fg = colors.red },
+
+               -- Compe
+               CompeDocumentation = { link = "Pmenu" },
+               CompeDocumentationBorder = { link = "Pmenu" },
+
+               -- Cmp
+               CmpItemKind = { link = "Pmenu" },
+               CmpItemAbbr = { link = "Pmenu" },
+               CmpItemKindMethod = { link = "@method" },
+               CmpItemKindText = { link = "@text" },
+               CmpItemKindFunction = { link = "@function" },
+               CmpItemKindConstructor = { link = "@type" },
+               CmpItemKindVariable = { link = "@variable" },
+               CmpItemKindClass = { link = "@type" },
+               CmpItemKindInterface = { link = "@type" },
+               CmpItemKindModule = { link = "@namespace" },
+               CmpItemKindProperty = { link = "@property" },
+               CmpItemKindOperator = { link = "@operator" },
+               CmpItemKindReference = { link = "@parameter.reference" },
+               CmpItemKindUnit = { link = "@field" },
+               CmpItemKindValue = { link = "@field" },
+               CmpItemKindField = { link = "@field" },
+               CmpItemKindEnum = { link = "@field" },
+               CmpItemKindKeyword = { link = "@keyword" },
+               CmpItemKindSnippet = { link = "@text" },
+               CmpItemKindColor = { link = "DevIconCss" },
+               CmpItemKindFile = { link = "TSURI" },
+               CmpItemKindFolder = { link = "TSURI" },
+               CmpItemKindEvent = { link = "@constant" },
+               CmpItemKindEnumMember = { link = "@field" },
+               CmpItemKindConstant = { link = "@constant" },
+               CmpItemKindStruct = { link = "@structure" },
+               CmpItemKindTypeParameter = { link = "@parameter" },
+
+               -- navic
+               NavicIconsFile = { link = "CmpItemKindFile" },
+               NavicIconsModule = { link = "CmpItemKindModule" },
+               NavicIconsNamespace = { link = "CmpItemKindModule" },
+               NavicIconsPackage = { link = "CmpItemKindModule" },
+               NavicIconsClass = { link = "CmpItemKindClass" },
+               NavicIconsMethod = { link = "CmpItemKindMethod" },
+               NavicIconsProperty = { link = "CmpItemKindProperty" },
+               NavicIconsField = { link = "CmpItemKindField" },
+               NavicIconsConstructor = { link = "CmpItemKindConstructor" },
+               NavicIconsEnum = { link = "CmpItemKindEnum" },
+               NavicIconsInterface = { link = "CmpItemKindInterface" },
+               NavicIconsFunction = { link = "CmpItemKindFunction" },
+               NavicIconsVariable = { link = "CmpItemKindVariable" },
+               NavicIconsConstant = { link = "CmpItemKindConstant" },
+               NavicIconsString = { link = "String" },
+               NavicIconsNumber = { link = "Number" },
+               NavicIconsBoolean = { link = "Boolean" },
+               NavicIconsArray = { link = "CmpItemKindClass" },
+               NavicIconsObject = { link = "CmpItemKindClass" },
+               NavicIconsKey = { link = "CmpItemKindKeyword" },
+               NavicIconsKeyword = { link = "CmpItemKindKeyword" },
+               NavicIconsNull = { fg = "blue" },
+               NavicIconsEnumMember = { link = "CmpItemKindEnumMember" },
+               NavicIconsStruct = { link = "CmpItemKindStruct" },
+               NavicIconsEvent = { link = "CmpItemKindEvent" },
+               NavicIconsOperator = { link = "CmpItemKindOperator" },
+               NavicIconsTypeParameter = { link = "CmpItemKindTypeParameter" },
+               NavicText = { fg = "gray" },
+               NavicSeparator = { fg = "gray" },
+
+               -- TS rainbow colors
+               rainbowcol1 = { fg = colors.red },
+               rainbowcol2 = { fg = colors.green },
+               rainbowcol3 = { fg = colors.yellow },
+               rainbowcol4 = { fg = colors.purple },
+               rainbowcol5 = { fg = colors.pink },
+               rainbowcol6 = { fg = colors.cyan },
+               rainbowcol7 = { fg = colors.white },
+       }
+end
+
+return {
+       setup = setup,
+}
diff --git a/lua/flatwhite/init.lua b/lua/flatwhite/init.lua
new file mode 100644 (file)
index 0000000..876a541
--- /dev/null
@@ -0,0 +1,113 @@
+local o = vim.o
+local g = vim.g
+local cmd = vim.cmd
+local nvim_set_hl = vim.api.nvim_set_hl
+local tbl_deep_extend = vim.tbl_deep_extend
+
+---@class DefaultConfig
+---@field italic_comment boolean
+---@field transparent_bg boolean
+---@field show_end_of_buffer boolean
+---@field lualine_bg_color string?
+---@field colors Palette
+---@field overrides table<string, Highlight>
+local DEFAULT_CONFIG = {
+   italic_comment = false,
+   transparent_bg = false,
+   show_end_of_buffer = false,
+   lualine_bg_color = nil,
+   colors = require("flatwhite.palette"),
+   overrides = {},
+}
+
+local TRANSPARENTS = {
+   "Normal",
+   "SignColumn",
+   "NvimTreeNormal",
+   "NvimTreeVertSplit",
+}
+
+local function apply_term_colors(colors)
+   g.terminal_color_0 = colors.black
+   g.terminal_color_1 = colors.red
+   g.terminal_color_2 = colors.green
+   g.terminal_color_3 = colors.yellow
+   g.terminal_color_4 = colors.purple
+   g.terminal_color_5 = colors.pink
+   g.terminal_color_6 = colors.cyan
+   g.terminal_color_7 = colors.white
+   g.terminal_color_8 = colors.selection
+   g.terminal_color_9 = colors.bright_red
+   g.terminal_color_10 = colors.bright_green
+   g.terminal_color_11 = colors.bright_yellow
+   g.terminal_color_12 = colors.bright_blue
+   g.terminal_color_13 = colors.bright_magenta
+   g.terminal_color_14 = colors.bright_cyan
+   g.terminal_color_15 = colors.bright_white
+   g.terminal_color_background = colors.bg
+   g.terminal_color_foreground = colors.fg
+end
+
+---apply flatwhite colorscheme
+---@param configs DefaultConfig
+local function apply(configs)
+   local colors = configs.colors
+   apply_term_colors(colors)
+   local groups = require("flatwhite.groups").setup(configs)
+
+   -- apply transparents
+   if configs.transparent_bg then
+      for _, group in ipairs(TRANSPARENTS) do
+         groups[group].bg = nil
+      end
+   end
+
+   for group, setting in pairs(configs.overrides) do
+      groups[group] = setting
+   end
+
+   -- set defined highlights
+   for group, setting in pairs(groups) do
+      nvim_set_hl(0, group, setting)
+   end
+end
+
+local local_configs = DEFAULT_CONFIG
+
+---setup flatwhite colorscheme
+---@param configs DefaultConfig?
+local function setup(configs)
+   if type(configs) == "table" then
+      local_configs = tbl_deep_extend("force", DEFAULT_CONFIG, configs) --[[@as DefaultConfig]]
+   end
+end
+
+---load flatwhite colorscheme
+local function load()
+   if vim.version().minor < 7 then
+      vim.notify_once("flatwhite.nvim: you must use neovim 0.7 or higher")
+      return
+   end
+
+   -- reset colors
+   if g.colors_name then
+      cmd("hi clear")
+   end
+
+   if vim.fn.exists("syntax_on") then
+      cmd("syntax reset")
+   end
+
+   o.background = "dark"
+   o.termguicolors = true
+   g.colors_name = "flatwhite"
+
+   apply(local_configs)
+end
+
+return {
+   load = load,
+   setup = setup,
+   configs = function() return local_configs end,
+   colors = function() return local_configs.colors end,
+}
diff --git a/lua/flatwhite/palette.lua b/lua/flatwhite/palette.lua
new file mode 100644 (file)
index 0000000..55a6459
--- /dev/null
@@ -0,0 +1,106 @@
+-- wtf
+local base1 = "#605a52"
+local base2 = "#93836c"
+local base3 = "#b9a992"
+local base4 = "#dcd3c6"
+local base5 = "#e4ddd2"
+local base6 = "#f1ece4"
+local base7 = "#f7f3ee"
+local accent = "#6a4cff"
+
+local orange_text = "#5b5143"
+local orange_text_sec = "#957f5f"
+local orange_bg = "#f7e0c3"
+
+local green_text = "#525643"
+local green_text_sec = "#81895d"
+local green_bg = "#e2e9c1"
+
+local teal_text = "#465953"
+local teal_text_sec = "#5f8c7d"
+local teal_bg = "#d2ebe3"
+
+local blue_text = "#4c5361"
+local blue_text_sec = "#7382a0"
+local blue_bg = "#dde4f2"
+
+local purple_text = "#614c61"
+local purple_text_sec = "#9c739c"
+local purple_bg = "#f1ddf1"
+
+local red_text = "#5b4343"
+local red_text_sec = "#955f5f"
+local red_bg = "#f6cfcb"
+
+local diff_add = "#2db448"
+local diff_change = "#f2a60d"
+local diff_change_dark = "#795306"
+local diff_delete = "#ff1414"
+local diff_renamed = "#52aeff"
+
+local white = "#ffffff"
+---@class Palette
+--
+return {
+       base1 = "#605a52",
+       base2 = "#93836c",
+       base3 = "#b9a992",
+       base4 = "#dcd3c6",
+       base5 = "#e4ddd2",
+       base6 = "#f1ece4",
+       base7 = "#f7f3ee",
+       accent = "#6a4cff",
+       orange_text = "#5b5143",
+       orange_text_sec = "#957f5f",
+       orange_bg = "#f7e0c3",
+       green_text = "#525643",
+       green_text_sec = "#81895d",
+       green_bg = "#e2e9c1",
+       teal_text = "#465953",
+       teal_text_sec = "#5f8c7d",
+       teal_bg = "#d2ebe3",
+       blue_text = "#4c5361",
+       blue_text_sec = "#7382a0",
+       blue_bg = "#dde4f2",
+       purple_text = "#614c61",
+       purple_text_sec = "#9c739c",
+       purple_bg = "#f1ddf1",
+       red_text = "#5b4343",
+       red_text_sec = "#955f5f",
+       red_bg = "#f6cfcb",
+       diff_add = "#2db448",
+       diff_change = "#f2a60d",
+       diff_change_dark = "#795306",
+       diff_delete = "#ff1414",
+       diff_renamed = "#52aeff",
+       bg = base7,
+       fg = base1,
+       selection = base4,
+       comment = base2,
+       red = red_text_sec,
+       orange = orange_text_sec,
+       yellow = base2,
+       green = green_text_sec,
+       purple = purple_text_sec,
+       cyan = teal_text_sec,
+       pink = purple_text_sec,
+       bright_red = red_text_sec,
+       bright_green = green_text_sec,
+       bright_yellow = orange_text_sec,
+       bright_blue = blue_text_sec,
+       bright_magenta = purple_text_sec,
+       bright_cyan = teal_text_sec,
+       bright_white = "#000000",
+       menu = base4,
+       visual = base4,
+       gutter_fg = "#4B5263",
+       nontext = "#3B4048",
+       white = base1,
+       black = base7,
+       fw_green = { fg = green_text, bg = green_bg },
+       fw_teal = { fg = teal_text, bg = teal_bg },
+       fw_blue = { fg = blue_text, bg = blue_bg },
+       fw_orange = { fg = orange_text, bg = orange_bg },
+       fw_purple = { fg = purple_text, bg = purple_bg },
+       fw_red = { fg = red_text, bg = red_bg },
+}
diff --git a/lua/lualine/themes/dracula-nvim.lua b/lua/lualine/themes/dracula-nvim.lua
deleted file mode 100644 (file)
index ed440c2..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-local dracula = require("dracula")
-local configs = dracula.configs()
-local colors = dracula.colors()
-
-local bg = configs.lualine_bg_color or colors.base4
-
-local normal = {
-       a = { fg = colors.base5, bg = colors.base2, gui = "bold" },
-       b = { fg = colors.base2, bg = bg },
-       c = { fg = colors.fg, bg = bg },
-}
-
-local command = {
-       a = { fg = colors.teal_text, bg = colors.teal_bg, gui = "bold" },
-       b = { fg = colors.teal_text_sec, bg = bg },
-}
-
-local visual = {
-       a = { fg = colors.purple_text, bg = colors.purple_bg, gui = "bold" },
-       b = { fg = colors.purple_text_sec, bg = bg },
-}
-
-local inactive = {
-       a = { fg = colors.white, bg = colors.visual, gui = "bold" },
-       b = { fg = colors.black, bg = colors.white },
-}
-
-local replace = {
-       a = { fg = colors.black, bg = colors.yellow, gui = "bold" },
-       b = { fg = colors.yellow, bg = bg },
-       c = { fg = colors.white, bg = bg },
-}
-
-local insert = {
-       a = { fg = colors.green_text, bg = colors.green_bg, gui = "bold" },
-       b = { fg = colors.green_text_sec, bg = bg },
-       c = { fg = colors.fg, bg = bg },
-}
-
-return {
-       normal = normal,
-       command = command,
-       visual = visual,
-       inactive = inactive,
-       replace = replace,
-       insert = insert,
-}
diff --git a/lua/lualine/themes/flatwhite.nvim b/lua/lualine/themes/flatwhite.nvim
new file mode 100644 (file)
index 0000000..ef200d9
--- /dev/null
@@ -0,0 +1,47 @@
+local flatwhite = require("flatwhite")
+local configs = flatwhite.configs()
+local colors = flatwhite.colors()
+
+local bg = configs.lualine_bg_color or colors.base4
+
+local normal = {
+       a = { fg = colors.base5, bg = colors.base2, gui = "bold" },
+       b = { fg = colors.base2, bg = bg },
+       c = { fg = colors.fg, bg = bg },
+}
+
+local command = {
+       a = { fg = colors.teal_text, bg = colors.teal_bg, gui = "bold" },
+       b = { fg = colors.teal_text_sec, bg = bg },
+}
+
+local visual = {
+       a = { fg = colors.purple_text, bg = colors.purple_bg, gui = "bold" },
+       b = { fg = colors.purple_text_sec, bg = bg },
+}
+
+local inactive = {
+       a = { fg = colors.white, bg = colors.visual, gui = "bold" },
+       b = { fg = colors.black, bg = colors.white },
+}
+
+local replace = {
+       a = { fg = colors.black, bg = colors.yellow, gui = "bold" },
+       b = { fg = colors.yellow, bg = bg },
+       c = { fg = colors.white, bg = bg },
+}
+
+local insert = {
+       a = { fg = colors.green_text, bg = colors.green_bg, gui = "bold" },
+       b = { fg = colors.green_text_sec, bg = bg },
+       c = { fg = colors.fg, bg = bg },
+}
+
+return {
+       normal = normal,
+       command = command,
+       visual = visual,
+       inactive = inactive,
+       replace = replace,
+       insert = insert,
+}