Files
zenbones-theme/lua/zenbones/init.lua

259 lines
17 KiB
Lua
Raw Normal View History

2021-08-20 16:05:43 +08:00
local lush = require "lush"
2021-08-26 12:15:02 +08:00
local c = require "zenbones.colors"
2021-02-07 20:43:35 +11:00
2021-08-22 17:01:14 +08:00
-- stylua: ignore start
2021-08-20 16:05:43 +08:00
local theme = lush(function()
return {
-- The following are all the Neovim default highlight groups from the docs
-- as of 0.5.0-nightly-446, to aid your theme creation. Your themes should
-- probably style all of these at a bare minimum.
--
-- Referenced/linked groups must come before being referenced/lined,
-- so the order shown ((mostly) alphabetical) is likely
-- not the order you will end up with.
--
-- You can uncomment these and leave them empty to disable any
-- styling for that group (meaning they mostly get styled as Normal)
-- or leave them commented to apply vims default colouring or linking.
2021-02-07 20:43:35 +11:00
2021-08-26 12:15:02 +08:00
Normal { bg = c.sand, fg = c.stone }, -- normal text
2021-08-20 18:08:20 +08:00
2021-08-22 16:24:52 +08:00
Underlined { gui = "underline" }, -- (preferred) text that stands out, HTML links
Bold { gui = "bold" },
Italic { gui = "italic" },
2021-08-22 13:16:14 +08:00
2021-08-26 12:15:02 +08:00
Error { fg = c.rose }, -- (preferred) any erroneous construct
2021-08-22 16:24:52 +08:00
ErrorMsg { Error }, -- error messages on the command line
2021-08-26 12:15:02 +08:00
WarningMsg { fg = c.wood }, -- warning messages
2021-08-22 13:16:14 +08:00
2021-08-26 12:15:02 +08:00
Comment { fg = c.sand.da(38).de(28), gui = "italic" }, -- any comment
Conceal { fg = c.stone.li(20), gui = "bold,italic" }, -- placeholder characters substituted for concealed text (see 'conceallevel')
2021-08-24 16:40:29 +08:00
2021-08-26 12:15:02 +08:00
Cursor { bg = c.stone, fg = c.sand.li(20) }, -- character under the cursor
2021-08-24 17:30:39 +08:00
lCursor { Cursor, bg = Cursor.bg.lighten(20) }, -- the character under the cursor when |language-mapping| is used (see 'guicursor')
2021-08-22 13:16:14 +08:00
-- CursorIM { }, -- like Cursor, but used when in IME mode |CursorIM|
2021-08-24 17:30:39 +08:00
TermCursor { Cursor }, -- cursor in a focused terminal
TermCursorNC { lCursor }, -- cursor in an unfocused terminal
2021-08-24 16:40:29 +08:00
2021-08-26 12:15:02 +08:00
CursorLine { bg = c.sand.da(4) }, -- Screen-line at the cursor, when 'cursorline' is set. Low-priority if foreground (ctermfg OR guifg) is not set.
2021-08-22 16:24:52 +08:00
CursorColumn { CursorLine }, -- Screen-column at the cursor, when 'cursorcolumn' is set.
2021-08-26 12:15:02 +08:00
ColorColumn { bg = c.wood.de(40).li(80) }, -- used for the columns set with 'colorcolumn'
2021-08-24 16:40:18 +08:00
2021-08-26 12:15:02 +08:00
DiffAdd { bg = c.leaf.de(48).li(64) }, -- diff mode: Added line |diff.txt|
DiffChange { bg = c.water.de(18).li(68) }, -- diff mode: Changed line |diff.txt|
DiffDelete { bg = c.rose.de(22).li(60) }, -- diff mode: Deleted line |diff.txt|
DiffText { bg = c.water.de(18).li(56), fg = c.stone }, -- diff mode: Changed text within a changed line |diff.txt|
2021-08-24 16:40:18 +08:00
2021-08-26 12:15:02 +08:00
LineNr { fg = c.sand.da(36) }, -- Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set.
2021-08-22 16:24:52 +08:00
SignColumn { LineNr }, -- column where |signs| are displayed
FoldColumn { LineNr, gui = "bold" }, -- 'foldcolumn'
2021-08-26 12:15:02 +08:00
Folded { bg = c.sand.da(16), fg = c.sand.da(64) }, -- line used for closed folds
CursorLineNr { LineNr, fg = c.stone, gui = "bold" }, -- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line.
2021-08-24 16:40:29 +08:00
2021-08-20 16:05:43 +08:00
-- ModeMsg { }, -- 'showmode' message (e.g., "-- INSERT -- ")
-- MsgArea { }, -- Area for messages and cmdline
-- MsgSeparator { }, -- Separator for scrolled messages, `msgsep` flag of 'display'
2021-08-26 12:15:02 +08:00
MoreMsg { fg = c.leaf, gui = "bold" }, -- |more-prompt|
NormalFloat { bg = c.sand.da(7) }, -- Normal text in floating windows.
FloatBorder { fg = c.sand.da(50) }, -- Normal text in floating windows.
2021-08-20 16:05:43 +08:00
-- NormalNC { }, -- normal text in non-current windows
2021-08-24 16:40:29 +08:00
2021-08-26 13:29:27 +08:00
Pmenu { bg = c.sand.da(12) }, -- Popup menu: normal item.
PmenuSel { bg = c.sand.da(22) }, -- Popup menu: selected item.
2021-08-26 12:15:02 +08:00
PmenuSbar { bg = c.sand.da(30) }, -- Popup menu: scrollbar.
PmenuThumb { bg = c.white }, -- Popup menu: Thumb of the scrollbar.
2021-08-24 16:40:29 +08:00
2021-08-26 12:15:02 +08:00
Search { bg = c.blossom.de(10).lighten(54), fg = c.stone }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out.
IncSearch { bg = c.blossom, fg = c.sand, gui = "bold" }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c"
2021-08-22 19:11:31 +08:00
-- Substitute { }, -- |:substitute| replacement text highlighting
MatchParen { Search }, -- The character under the cursor or just before it, if it is a paired bracket, and its match. |pi_paren.txt|
2021-08-20 16:05:43 +08:00
-- QuickFixLine { }, -- Current |quickfix| item in the quickfix window. Combined with |hl-CursorLine| when the cursor is there.
2021-08-24 16:40:29 +08:00
2021-08-22 16:24:52 +08:00
SpellBad { fg = Error.fg.de(40), gui = "undercurl", guisp = Error.fg }, -- Word that is not recognized by the spellchecker. |spell| Combined with the highlighting used otherwise.
SpellCap { SpellBad, guisp = Error.fg.li(10) }, -- Word that should start with a capital. |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.
2021-08-26 12:15:02 +08:00
SpellRare { SpellBad, guisp = c.wood }, -- Word that is recognized by the spellchecker as one that is hardly ever used. |spell| Combined with the highlighting used otherwise.
2021-08-24 16:40:29 +08:00
2021-08-26 13:29:27 +08:00
StatusLine { bg = c.sand.da(14), fg = c.stone }, -- status line of current window
2021-08-26 12:15:02 +08:00
StatusLineNC { bg = c.sand.da(10), fg = c.stone.li(28) }, -- status lines of not-current windows Note: if this is equal to "StatusLine" Vim will use "^^^" in the status line of the current window.
2021-08-22 17:01:14 +08:00
TabLine { StatusLine, gui = "italic" }, -- tab pages line, not active tab page label
TabLineFill { StatusLineNC }, -- tab pages line, where there are no labels
TabLineSel { Bold }, -- tab pages line, active tab page label
2021-08-26 12:15:02 +08:00
VertSplit { fg = c.white }, -- the column separating vertically split windows
2021-08-24 16:40:29 +08:00
2021-08-26 12:15:02 +08:00
Visual { bg = c.stone.li(84) }, -- Visual mode selection
2021-08-20 16:05:43 +08:00
-- VisualNOS { }, -- Visual mode selection when vim is "Not Owning the Selection".
2021-08-24 16:40:29 +08:00
2021-08-26 12:15:02 +08:00
NonText { fg = c.sand.da(22) }, -- '@' 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|.
2021-08-22 16:24:52 +08:00
SpecialKey { NonText, gui = "italic" }, -- Unprintable characters: text displayed differently from what it really is. But not 'listchars' whitespace. |hl-Whitespace|
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|.
2021-08-24 17:44:29 +08:00
2021-08-26 12:15:02 +08:00
WildMenu { bg = c.blossom, fg = c.sand }, -- current match in 'wildmenu' completion
2021-08-24 17:44:29 +08:00
Directory { Bold }, -- directory names (and other special names in listings)
Question { MoreMsg }, -- |hit-enter| prompt and yes/no questions
Title { Bold }, -- titles for output from ":set all", ":autocmd" etc.
2021-02-07 20:43:35 +11:00
2021-08-20 16:05:43 +08:00
-- These groups are not listed as default vim groups,
-- but they are defacto standard group names for syntax highlighting.
-- commented out groups should chain up to their "preferred" group by
-- default,
-- Uncomment and edit if you want more specific syntax highlighting.
2021-02-07 20:43:35 +11:00
2021-08-26 12:15:02 +08:00
Constant { fg = c.stone.li(24), gui = "italic" }, -- (preferred) any constant
2021-08-22 17:55:23 +08:00
-- String { }, -- a string constant: "this is a string"
2021-08-22 16:24:52 +08:00
-- Character { }, -- a character constant: 'c', '\n'
-- Number { }, -- a number constant: 234, 0xff
-- Boolean { }, -- a boolean constant: TRUE, false
-- Float { }, -- a floating point constant: 2.3e10
2021-08-26 12:15:02 +08:00
Identifier { fg = c.stone.li(16) }, -- (preferred) any variable name
Function { fg = c.stone }, -- function name (also: methods for classes)
2021-08-22 16:24:52 +08:00
2021-08-26 12:15:02 +08:00
Statement { fg = c.stone, gui = "bold" }, -- (preferred) any statement
2021-08-22 16:24:52 +08:00
-- Conditional { }, -- if, then, else, endif, switch, etc.
-- Repeat { }, -- for, do, while, etc.
-- Label { }, -- case, default, etc.
-- Operator { }, -- "sizeof", "+", "*", etc.
-- Keyword { }, -- any other keyword
-- Exception { }, -- try, catch, throw
PreProc { Statement }, -- (preferred) generic Preprocessor
-- Include { }, -- preprocessor #include
-- Define { }, -- preprocessor #define
-- Macro { }, -- same as Define
-- PreCondit { }, -- preprocessor #if, #else, #endif, etc.
2021-08-26 12:15:02 +08:00
Type { fg = c.sand.da(62) }, -- (preferred) int, long, char, etc.
2021-08-22 16:24:52 +08:00
-- StorageClass { }, -- static, register, volatile, etc.
-- Structure { }, -- struct, union, enum, etc.
-- Typedef { }, -- A typedef
2021-08-26 12:15:02 +08:00
Special { fg = c.stone.li(24), gui = "bold" }, -- (preferred) any special symbol
2021-08-22 19:11:31 +08:00
-- SpecialChar { }, -- special character in a constant
-- Tag { }, -- you can use CTRL-] on this
2021-08-26 12:15:02 +08:00
Delimiter { fg = c.sand.da(42) }, -- character that needs attention
2021-08-22 16:24:52 +08:00
SpecialComment { Comment, gui = "bold" }, -- special things inside a comment
2021-08-22 19:11:31 +08:00
-- Debug { }, -- debugging statements
2021-02-07 20:43:35 +11:00
2021-08-20 16:05:43 +08:00
-- ("Ignore", below, may be invisible...)
2021-08-22 16:24:52 +08:00
-- Ignore { }, -- (preferred) left blank, hidden |hl-Ignore|
2021-02-07 20:43:35 +11:00
2021-08-23 11:44:47 +08:00
Todo { gui = "bold,underline" }, -- (preferred) anything that needs extra attention; mostly the keywords TODO FIXME and XXX
2021-02-07 20:43:35 +11:00
2021-08-20 16:05:43 +08:00
-- 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
-- documentation.
2021-02-07 20:43:35 +11:00
2021-08-26 11:49:57 +08:00
LspReferenceText { ColorColumn }, -- used for highlighting "text" references
LspReferenceRead { ColorColumn }, -- used for highlighting "read" references
LspReferenceWrite { ColorColumn }, -- used for highlighting "write" references
2021-02-07 20:43:35 +11:00
2021-08-22 16:24:52 +08:00
LspDiagnosticsDefaultError { Error }, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline)
LspDiagnosticsDefaultWarning { WarningMsg }, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline)
2021-08-26 12:15:02 +08:00
LspDiagnosticsDefaultInformation { fg = c.water }, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline)
LspDiagnosticsDefaultHint { fg = c.blossom }, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline)
2021-02-07 20:43:35 +11:00
2021-08-26 12:15:02 +08:00
LspDiagnosticsVirtualTextError { LspDiagnosticsDefaultError, bg = c.rose.abs_de(42).li(82) }, -- Used for "Error" diagnostic virtual text
LspDiagnosticsVirtualTextWarning { LspDiagnosticsDefaultWarning, bg = c.wood.de(48).li(84) }, -- Used for "Warning" diagnostic virtual text
2021-08-20 16:05:43 +08:00
-- LspDiagnosticsVirtualTextInformation { }, -- Used for "Information" diagnostic virtual text
-- LspDiagnosticsVirtualTextHint { }, -- Used for "Hint" diagnostic virtual text
2021-02-07 20:43:35 +11:00
2021-08-22 16:24:52 +08:00
LspDiagnosticsUnderlineError { LspDiagnosticsDefaultError, gui = "undercurl" }, -- Used to underline "Error" diagnostics
LspDiagnosticsUnderlineWarning { LspDiagnosticsDefaultWarning, gui = "undercurl" }, -- Used to underline "Warning" diagnostics
LspDiagnosticsUnderlineInformation { LspDiagnosticsDefaultInformation, gui = "undercurl" }, -- Used to underline "Information" diagnostics
LspDiagnosticsUnderlineHint { LspDiagnosticsDefaultHint, gui = "undercurl" }, -- Used to underline "Hint" diagnostics
2021-02-07 20:43:35 +11:00
2021-08-20 16:05:43 +08:00
-- LspDiagnosticsFloatingError { }, -- Used to color "Error" diagnostic messages in diagnostics float
-- LspDiagnosticsFloatingWarning { }, -- Used to color "Warning" diagnostic messages in diagnostics float
-- LspDiagnosticsFloatingInformation { }, -- Used to color "Information" diagnostic messages in diagnostics float
-- LspDiagnosticsFloatingHint { }, -- Used to color "Hint" diagnostic messages in diagnostics float
2021-02-07 20:43:35 +11:00
2021-08-20 16:05:43 +08:00
-- LspDiagnosticsSignError { }, -- Used for "Error" signs in sign column
-- LspDiagnosticsSignWarning { }, -- Used for "Warning" signs in sign column
-- LspDiagnosticsSignInformation { }, -- Used for "Information" signs in sign column
-- LspDiagnosticsSignHint { }, -- Used for "Hint" signs in sign column
2021-02-07 20:43:35 +11:00
2021-08-20 16:05:43 +08:00
-- These groups are for the neovim tree-sitter highlights.
-- As of writing, tree-sitter support is a WIP, group names may change.
-- By default, most of these groups link to an appropriate Vim group,
-- TSError -> Error for example, so you do not have to define these unless
-- you explicitly want to support Treesitter's improved syntax awareness.
2021-02-07 20:43:35 +11:00
2021-08-20 16:05:43 +08:00
-- TSAnnotation { }; -- For C++/Dart attributes, annotations that can be attached to the code to denote some kind of meta information.
-- TSAttribute { }; -- (unstable) TODO: docs
-- TSBoolean { }; -- For booleans.
-- TSCharacter { }; -- For characters.
-- TSComment { }; -- For comment blocks.
-- TSConstructor { }; -- For constructor calls and definitions: ` { }` in Lua, and Java constructors.
-- TSConditional { }; -- For keywords related to conditionnals.
-- TSConstant { }; -- For constants
-- TSConstBuiltin { }; -- For constant that are built in the language: `nil` in Lua.
-- TSConstMacro { }; -- For constants that are defined by macros: `NULL` in C.
-- TSError { }; -- For syntax/parser errors.
-- TSException { }; -- For exception related keywords.
-- TSField { }; -- For fields.
-- TSFloat { }; -- For floats.
-- TSFunction { }; -- For function (calls and definitions).
-- TSFuncBuiltin { }; -- For builtin functions: `table.insert` in Lua.
-- TSFuncMacro { }; -- For macro defined fuctions (calls and definitions): each `macro_rules` in Rust.
-- TSInclude { }; -- For includes: `#include` in C, `use` or `extern crate` in Rust, or `require` in Lua.
-- TSKeyword { }; -- For keywords that don't fall in previous categories.
-- TSKeywordFunction { }; -- For keywords used to define a fuction.
-- TSLabel { }; -- For labels: `label:` in C and `:label:` in Lua.
-- TSMethod { }; -- For method calls and definitions.
-- TSNamespace { }; -- For identifiers referring to modules and namespaces.
-- TSNone { }; -- TODO: docs
-- TSNumber { }; -- For all numbers
-- TSOperator { }; -- For any operator: `+`, but also `->` and `*` in C.
-- TSParameter { }; -- For parameters of a function.
-- TSParameterReference { }; -- For references to parameters of a function.
-- TSProperty { }; -- Same as `TSField`.
-- TSPunctDelimiter { }; -- For delimiters ie: `.`
-- TSPunctBracket { }; -- For brackets and parens.
-- TSPunctSpecial { }; -- For special punctutation that does not fall in the catagories before.
-- TSRepeat { }; -- For keywords related to loops.
-- TSString { }; -- For strings.
-- TSStringRegex { }; -- For regexes.
-- TSStringEscape { }; -- For escape characters within a string.
-- TSSymbol { }; -- For identifiers referring to symbols or atoms.
-- TSType { }; -- For types.
-- TSTypeBuiltin { }; -- For builtin types.
2021-08-23 13:19:05 +08:00
TSVariable { Identifier }, -- Any variable name that does not have another highlight.
2021-08-20 16:05:43 +08:00
-- TSVariableBuiltin { }; -- Variable names that are defined by the languages, like `this` or `self`.
2021-02-07 20:43:35 +11:00
2021-08-26 12:15:02 +08:00
TSTag { fg = c.stone.li(20), gui = "bold" }, -- Tags like html tag names.
2021-08-20 16:05:43 +08:00
-- TSTagDelimiter { }; -- Tag delimiter like `<` `>` `/`
-- TSText { }; -- For strings considered text in a markup language.
-- TSEmphasis { }; -- For text to be represented with emphasis.
-- TSUnderline { }; -- For text to be represented with an underline.
-- TSStrike { }; -- For strikethrough text.
-- TSTitle { }; -- Text that is part of a title.
-- TSLiteral { }; -- Literal text.
-- TSURI { }; -- Any URI like a link or email.
2021-08-22 13:16:14 +08:00
-- Other plugins
2021-08-26 12:15:02 +08:00
GitSignsAdd { fg = c.leaf },
GitSignsChange { fg = c.water },
GitSignsDelete { fg = c.rose },
2021-08-22 19:11:31 +08:00
2021-08-26 12:15:02 +08:00
IndentBlanklineChar { fg = c.sand.da(12).de(20) },
2021-08-24 08:03:13 +08:00
2021-08-24 18:15:34 +08:00
TelescopeSelection { CursorLine },
2021-08-26 12:15:02 +08:00
TelescopeSelectionCaret { TelescopeSelection, fg = c.rose },
TelescopeMatching { fg = c.blossom, gui = "bold" },
2021-08-24 18:15:34 +08:00
TelescopeBorder { FloatBorder },
2021-08-24 10:46:48 +08:00
2021-08-24 18:15:34 +08:00
Sneak { Search },
SneakLabel { WildMenu },
2021-08-26 12:15:02 +08:00
SneakLabelMask { bg = c.blossom, fg = c.blossom }
2021-08-20 16:05:43 +08:00
}
2021-02-07 20:43:35 +11:00
end)
2021-08-22 17:01:14 +08:00
-- stylua: ignore end
2021-02-07 20:43:35 +11:00
-- return our parsed theme for extension or use else where.
return theme
-- vi:nowrap