more basic colors

This commit is contained in:
Michael Chris Lopez
2021-08-22 13:16:14 +08:00
parent ba983994b9
commit c7a6cf6fdb

View File

@@ -43,12 +43,14 @@
-- `:lua require('lush').ify()` -- `:lua require('lush').ify()`
local lush = require "lush" local lush = require "lush"
local hsl = lush.hsluv local hsluv = lush.hsluv
local sand = hsl(39, 25, 91) local sand = hsluv(39, 12, 90)
local stone = hsl(170, 8, 12) local stone = hsluv(215, 22, 8)
local blossom = hsl(208, 90, 10) local leaf = hsluv(103, 70, 46)
local leaf = hsl(116, 41, 18) local water = hsluv(236, 84, 49)
local rose = hsluv(5, 76, 46)
local wood = hsluv(28, 100, 40)
local theme = lush(function() local theme = lush(function()
return { return {
@@ -64,63 +66,70 @@ local theme = lush(function()
-- styling for that group (meaning they mostly get styled as Normal) -- styling for that group (meaning they mostly get styled as Normal)
-- or leave them commented to apply vims default colouring or linking. -- or leave them commented to apply vims default colouring or linking.
Normal { bg = sand, fg = stone }, -- normal text Normal { bg = sand, fg = stone.lighten(2).saturate(80) }, -- normal text
Comment { fg = Normal.fg.lighten(40), gui = "italic" }, -- any comment Underlined { gui = "underline" }, -- (preferred) text that stands out, HTML links
-- ColorColumn { }, -- used for the columns set with 'colorcolumn' Bold { gui = "bold" },
Italic { gui = "italic" },
Error { fg = rose }, -- (preferred) any erroneous construct
ErrorMsg { Error }, -- error messages on the command line
WarningMsg { fg = wood }, -- warning messages
Comment { fg = sand.darken(40).desaturate(30), gui = "italic" }, -- any comment
ColorColumn { bg = sand.darken(20) }, -- used for the columns set with 'colorcolumn'
-- Conceal { }, -- placeholder characters substituted for concealed text (see 'conceallevel') -- Conceal { }, -- placeholder characters substituted for concealed text (see 'conceallevel')
-- Cursor { fg = 'blue' }, -- character under the cursor -- Cursor { bg = 'blue' }, -- character under the cursor
-- lCursor { fg = 'blue' }, -- the character under the cursor when |language-mapping| is used (see 'guicursor') -- lCursor { }, -- the character under the cursor when |language-mapping| is used (see 'guicursor')
-- CursorIM { fg = 'blue' }, -- like Cursor, but used when in IME mode |CursorIM| -- CursorIM { }, -- like Cursor, but used when in IME mode |CursorIM|
-- CursorColumn { }, -- Screen-column at the cursor, when 'cursorcolumn' is set. CursorLine { bg = sand.darken(4) }, -- Screen-line at the cursor, when 'cursorline' is set. Low-priority if foreground (ctermfg OR guifg) is not set.
CursorLine { bg = Normal.bg.darken(4) }, -- Screen-line at the cursor, when 'cursorline' is set. Low-priority if foreground (ctermfg OR guifg) is not set. CursorColumn { CursorLine }, -- Screen-column at the cursor, when 'cursorcolumn' is set.
-- Directory { }, -- directory names (and other special names in listings) Directory { gui = "bold" }, -- directory names (and other special names in listings)
-- DiffAdd { }, -- diff mode: Added line |diff.txt| DiffAdd { bg = leaf, fg = sand }, -- diff mode: Added line |diff.txt|
-- DiffChange { }, -- diff mode: Changed line |diff.txt| DiffChange { bg = water, fg = sand.lighten(20) }, -- diff mode: Changed line |diff.txt|
-- DiffDelete { }, -- diff mode: Deleted line |diff.txt| DiffDelete { bg = rose, fg = sand.lighten(20) }, -- diff mode: Deleted line |diff.txt|
-- DiffText { }, -- diff mode: Changed text within a changed line |diff.txt| DiffText { bg = water.lighten(16), fg = sand.lighten(20) }, -- diff mode: Changed text within a changed line |diff.txt|
-- EndOfBuffer { }, -- filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|.
-- TermCursor { }, -- cursor in a focused terminal -- TermCursor { }, -- cursor in a focused terminal
-- TermCursorNC { }, -- cursor in an unfocused terminal -- TermCursorNC { }, -- cursor in an unfocused terminal
-- ErrorMsg { }, -- error messages on the command line VertSplit { bg = sand.darken(18) }, -- the column separating vertically split windows
-- VertSplit { }, -- the column separating vertically split windows
-- Folded { }, -- line used for closed folds -- Folded { }, -- line used for closed folds
-- FoldColumn { }, -- 'foldcolumn' -- FoldColumn { }, -- 'foldcolumn'
SignColumn { bg = Normal.bg.darken(6), fg = Normal.fg.lighten(42) }, -- column where |signs| are displayed SignColumn { bg = sand.darken(6), fg = stone.lighten(42) }, -- column where |signs| are displayed
-- IncSearch { }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c" -- IncSearch { }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c"
-- Substitute { }, -- |:substitute| replacement text highlighting -- Substitute { }, -- |:substitute| replacement text highlighting
LineNr { SignColumn }, -- Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set. LineNr { SignColumn }, -- Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set.
CursorLineNr { LineNr, fg = Normal.fg.darken(50), gui = "bold" }, -- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line. CursorLineNr { LineNr, fg = stone.darken(50), gui = "bold" }, -- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line.
-- MatchParen { }, -- The character under the cursor or just before it, if it is a paired bracket, and its match. |pi_paren.txt| MatchParen {}, -- The character under the cursor or just before it, if it is a paired bracket, and its match. |pi_paren.txt|
-- ModeMsg { }, -- 'showmode' message (e.g., "-- INSERT -- ") -- ModeMsg { }, -- 'showmode' message (e.g., "-- INSERT -- ")
-- MsgArea { }, -- Area for messages and cmdline -- MsgArea { }, -- Area for messages and cmdline
-- MsgSeparator { }, -- Separator for scrolled messages, `msgsep` flag of 'display' -- MsgSeparator { }, -- Separator for scrolled messages, `msgsep` flag of 'display'
-- MoreMsg { }, -- |more-prompt| -- MoreMsg { }, -- |more-prompt|
-- NonText { }, -- '@' at the end of the window, characters from 'showbreak' and other characters that do not really exist in the text (e.g., ">" displayed when a double-wide character doesn't fit at the end of the line). See also |hl-EndOfBuffer|. NormalFloat { bg = sand.darken(8) }, -- Normal text in floating windows.
-- NormalFloat { }, -- Normal text in floating windows. FloatBorder { fg = sand.darken(20) }, -- Normal text in floating windows.
-- NormalNC { }, -- normal text in non-current windows -- NormalNC { }, -- normal text in non-current windows
-- Pmenu { }, -- Popup menu: normal item. Pmenu { bg = sand.darken(10) }, -- Popup menu: normal item.
-- PmenuSel { }, -- Popup menu: selected item. PmenuSel { bg = sand.darken(20) }, -- Popup menu: selected item.
-- PmenuSbar { }, -- Popup menu: scrollbar. PmenuSbar { bg = sand.darken(30) }, -- Popup menu: scrollbar.
-- PmenuThumb { }, -- Popup menu: Thumb of the scrollbar. PmenuThumb { bg = sand.abs_lighten(30) }, -- Popup menu: Thumb of the scrollbar.
-- Question { }, -- |hit-enter| prompt and yes/no questions -- Question { }, -- |hit-enter| prompt and yes/no questions
-- QuickFixLine { }, -- Current |quickfix| item in the quickfix window. Combined with |hl-CursorLine| when the cursor is there. -- QuickFixLine { }, -- Current |quickfix| item in the quickfix window. Combined with |hl-CursorLine| when the cursor is there.
-- Search { }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out. -- Search { }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out.
-- SpecialKey { }, -- Unprintable characters: text displayed differently from what it really is. But not 'listchars' whitespace. |hl-Whitespace| -- SpecialKey { }, -- Unprintable characters: text displayed differently from what it really is. But not 'listchars' whitespace. |hl-Whitespace|
-- SpellBad { }, -- Word that is not recognized by the spellchecker. |spell| Combined with the highlighting used otherwise. SpellBad { fg = Error.fg.desaturate(40), gui = "undercurl", guisp = Error.fg }, -- Word that is not recognized by the spellchecker. |spell| Combined with the highlighting used otherwise.
-- SpellCap { }, -- Word that should start with a capital. |spell| Combined with the highlighting used otherwise. SpellCap { SpellBad, guisp = Error.fg.lighten(10) }, -- Word that should start with a capital. |spell| Combined with the highlighting used otherwise.
-- SpellLocal { }, -- Word that is recognized by the spellchecker as one that is used in another region. |spell| Combined with the highlighting used otherwise. SpellLocal { SpellCap }, -- Word that is recognized by the spellchecker as one that is used in another region. |spell| Combined with the highlighting used otherwise.
-- SpellRare { }, -- Word that is recognized by the spellchecker as one that is hardly ever used. |spell| Combined with the highlighting used otherwise. SpellRare { SpellBad, guisp = wood }, -- Word that is recognized by the spellchecker as one that is hardly ever used. |spell| Combined with the highlighting used otherwise.
-- StatusLine { }, -- status line of current window StatusLine { bg = sand.darken(20) }, -- status line of current window
-- StatusLineNC { }, -- status lines of not-current windows Note: if this is equal to "StatusLine" Vim will use "^^^" in the status line of the current window. StatusLineNC { bg = sand.darken(10), fg = stone.lighten(30) }, -- status lines of not-current windows Note: if this is equal to "StatusLine" Vim will use "^^^" in the status line of the current window.
-- TabLine { }, -- tab pages line, not active tab page label -- TabLine { }, -- tab pages line, not active tab page label
-- TabLineFill { }, -- tab pages line, where there are no labels -- TabLineFill { }, -- tab pages line, where there are no labels
-- TabLineSel { }, -- tab pages line, active tab page label -- TabLineSel { }, -- tab pages line, active tab page label
-- Title { }, -- titles for output from ":set all", ":autocmd" etc. Title { Bold }, -- titles for output from ":set all", ":autocmd" etc.
-- Visual { }, -- Visual mode selection Visual { bg = stone.lighten(40), fg = sand }, -- Visual mode selection
-- VisualNOS { }, -- Visual mode selection when vim is "Not Owning the Selection". -- VisualNOS { }, -- Visual mode selection when vim is "Not Owning the Selection".
-- WarningMsg { }, -- warning messages NonText { fg = sand.darken(20) }, -- '@' at the end of the window, characters from 'showbreak' and other characters that do not really exist in the text (e.g., ">" displayed when a double-wide character doesn't fit at the end of the line). See also |hl-EndOfBuffer|.
-- Whitespace { }, -- "nbsp", "space", "tab" and "trail" in 'listchars' Whitespace { NonText }, -- "nbsp", "space", "tab" and "trail" in 'listchars'
EndOfBuffer { NonText }, -- filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|.
-- WildMenu { }, -- current match in 'wildmenu' completion -- WildMenu { }, -- current match in 'wildmenu' completion
-- These groups are not listed as default vim groups, -- These groups are not listed as default vim groups,
@@ -129,17 +138,17 @@ local theme = lush(function()
-- default, -- default,
-- Uncomment and edit if you want more specific syntax highlighting. -- Uncomment and edit if you want more specific syntax highlighting.
Constant {}, -- (preferred) any constant Constant { fg = stone.lighten(30) }, -- (preferred) any constant
-- String { }, -- a string constant: "this is a string" String { fg = Constant.fg, gui = "italic" }, -- a string constant: "this is a string"
-- Character { }, -- a character constant: 'c', '\n' -- Character { }, -- a character constant: 'c', '\n'
-- Number { }, -- a number constant: 234, 0xff -- Number { }, -- a number constant: 234, 0xff
-- Boolean { }, -- a boolean constant: TRUE, false -- Boolean { }, -- a boolean constant: TRUE, false
-- Float { }, -- a floating point constant: 2.3e10 -- Float { }, -- a floating point constant: 2.3e10
Identifier {}, -- (preferred) any variable name Identifier { fg = stone.lighten(20) }, -- (preferred) any variable name
Function {}, -- function name (also: methods for classes) Function { fg = stone.lighten(20) }, -- function name (also: methods for classes)
Statement {}, -- (preferred) any statement Statement { gui = "bold" }, -- (preferred) any statement
-- Conditional { }, -- if, then, else, endif, switch, etc. -- Conditional { }, -- if, then, else, endif, switch, etc.
-- Repeat { }, -- for, do, while, etc. -- Repeat { }, -- for, do, while, etc.
-- Label { }, -- case, default, etc. -- Label { }, -- case, default, etc.
@@ -147,13 +156,13 @@ local theme = lush(function()
-- Keyword { }, -- any other keyword -- Keyword { }, -- any other keyword
-- Exception { }, -- try, catch, throw -- Exception { }, -- try, catch, throw
PreProc {}, -- (preferred) generic Preprocessor PreProc { Statement }, -- (preferred) generic Preprocessor
-- Include { }, -- preprocessor #include -- Include { }, -- preprocessor #include
-- Define { }, -- preprocessor #define -- Define { }, -- preprocessor #define
-- Macro { }, -- same as Define -- Macro { }, -- same as Define
-- PreCondit { }, -- preprocessor #if, #else, #endif, etc. -- PreCondit { }, -- preprocessor #if, #else, #endif, etc.
-- Type { }, -- (preferred) int, long, char, etc. Type { fg = sand.darken(60) }, -- (preferred) int, long, char, etc.
-- StorageClass { }, -- static, register, volatile, etc. -- StorageClass { }, -- static, register, volatile, etc.
-- Structure { }, -- struct, union, enum, etc. -- Structure { }, -- struct, union, enum, etc.
-- Typedef { }, -- A typedef -- Typedef { }, -- A typedef
@@ -161,20 +170,14 @@ local theme = lush(function()
Special { fg = stone.lighten(20) }, -- (preferred) any special symbol Special { fg = stone.lighten(20) }, -- (preferred) any special symbol
-- SpecialChar { }, -- special character in a constant -- SpecialChar { }, -- special character in a constant
-- Tag { }, -- you can use CTRL-] on this -- Tag { }, -- you can use CTRL-] on this
-- Delimiter { }, -- character that needs attention Delimiter { fg = sand.darken(40) }, -- character that needs attention
-- SpecialComment { }, -- special things inside a comment SpecialComment { Comment, gui = "bold" }, -- special things inside a comment
-- Debug { }, -- debugging statements -- Debug { }, -- debugging statements
-- Underlined { gui = "underline" }, -- (preferred) text that stands out, HTML links
-- Bold { gui = "bold" },
-- Italic { gui = "italic" },
-- ("Ignore", below, may be invisible...) -- ("Ignore", below, may be invisible...)
-- Ignore { }, -- (preferred) left blank, hidden |hl-Ignore| -- Ignore { }, -- (preferred) left blank, hidden |hl-Ignore|
-- Error { }, -- (preferred) any erroneous construct Todo { gui = "bold,italic" }, -- (preferred) anything that needs extra attention; mostly the keywords TODO FIXME and XXX
-- Todo { }, -- (preferred) anything that needs extra attention; mostly the keywords TODO FIXME and XXX
-- These groups are for the native LSP client. Some other LSP clients may -- These groups are for the native LSP client. Some other LSP clients may
-- use these groups, or use their own. Consult your LSP client's -- use these groups, or use their own. Consult your LSP client's
@@ -254,7 +257,7 @@ local theme = lush(function()
-- TSSymbol { }; -- For identifiers referring to symbols or atoms. -- TSSymbol { }; -- For identifiers referring to symbols or atoms.
-- TSType { }; -- For types. -- TSType { }; -- For types.
-- TSTypeBuiltin { }; -- For builtin types. -- TSTypeBuiltin { }; -- For builtin types.
-- TSVariable { }; -- Any variable name that does not have another highlight. TSVariable { Identifier }, -- Any variable name that does not have another highlight.
-- TSVariableBuiltin { }; -- Variable names that are defined by the languages, like `this` or `self`. -- TSVariableBuiltin { }; -- Variable names that are defined by the languages, like `this` or `self`.
-- TSTag { }; -- Tags like html tag names. -- TSTag { }; -- Tags like html tag names.
@@ -266,6 +269,10 @@ local theme = lush(function()
-- TSTitle { }; -- Text that is part of a title. -- TSTitle { }; -- Text that is part of a title.
-- TSLiteral { }; -- Literal text. -- TSLiteral { }; -- Literal text.
-- TSURI { }; -- Any URI like a link or email. -- TSURI { }; -- Any URI like a link or email.
GitSignsAdd { bg = SignColumn.bg, fg = leaf }, -- Text that is part of a title.
GitSignsChange { bg = SignColumn.bg, fg = DiffChange.bg }, -- Literal text.
GitSignsDelete { bg = SignColumn.bg, fg = DiffDelete.bg }, -- Any URI like a link or email.
} }
end) end)