diff --git a/CHANGELOG.md b/CHANGELOG.md index a27a3fa1..53af00e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - #160 closed due to inactivity. - #191 closed due to inactivity. +- #201 fixed +- #193 closed with conversation. - #213 fixed - #228 fixed - #231 fixed diff --git a/doc/gt_deprecated.txt b/doc/gt_deprecated.txt index dc41f805..f0542d8b 100644 --- a/doc/gt_deprecated.txt +++ b/doc/gt_deprecated.txt @@ -54,6 +54,7 @@ GLOBAL OPTIONS MODULES +- *'theme'* Moved to |'github-theme.group'| - *'types'* Removed. - *'plugins'* Removed. - *'plugins.lualine'* Moved to |'github-theme.util.lualine'| diff --git a/lua/github-theme/autocmds.lua b/lua/github-theme/autocmds.lua index 7470c4e6..6a3ce34f 100644 --- a/lua/github-theme/autocmds.lua +++ b/lua/github-theme/autocmds.lua @@ -1,6 +1,6 @@ local config = require('github-theme.config') +local util = require('github-theme.util') ----@class gt.Autocmds local M = {} ---Delete the autocmds when the theme changes to something else @@ -74,7 +74,7 @@ M.native_cmds = function() end M.set = function() - if vim.fn.has('nvim-0.7') == 1 then + if util.use_nvim_api then if not pcall(M.native_cmds) then M.viml_cmds() end diff --git a/lua/github-theme/config.lua b/lua/github-theme/config.lua index b0ac2140..7e23dc3e 100644 --- a/lua/github-theme/config.lua +++ b/lua/github-theme/config.lua @@ -4,6 +4,7 @@ local util = require('github-theme.util') local M = { theme = 'github_dark', has_options = true } local defaults = { + dev = false, transparent = false, hide_end_of_buffer = true, hide_nc_statusline = true, @@ -45,12 +46,6 @@ local defaults = { treesitter = util.is_nvim, lsp_semantic_tokens = util.is_nvim, }, - - colors = {}, - overrides = function() - return {} - end, - dev = false, } M.options = collect.deep_copy(defaults) diff --git a/lua/github-theme/theme.lua b/lua/github-theme/theme.lua deleted file mode 100644 index b020ae89..00000000 --- a/lua/github-theme/theme.lua +++ /dev/null @@ -1,677 +0,0 @@ -local config = require('github-theme.config') -local palette = require('github-theme.palette') -local util = require('github-theme.util') - -local M = {} - ----@return gt.Highlights -M.setup = function() - local c = palette.setup() - - ---@class gt.Highlights - local hi = { - colors = c, - } - - ---@class gt.Highlights.Base - hi.base = { - ColorColumn = { bg = c.bg_visual }, -- used for the columns set with 'colorcolumn' - Conceal = { fg = c.fg_gutter }, -- placeholder characters substituted for concealed text (see 'conceallevel') - Cursor = { fg = c.bg, bg = c.fg }, -- character under the cursor - lCursor = { link = 'Cursor' }, -- the character under the cursor when |language-mapping| is used (see 'guicursor') - CursorIM = { link = 'Cursor' }, -- like Cursor, but used when in IME mode |CursorIM| - CursorLine = { bg = c.bg_highlight }, -- Screen-line at the cursor, when 'cursorline' is set. Low-priority if foreground (ctermfg OR guifg) is not set. - CursorColumn = { link = 'CursorColumn' }, -- Screen-column at the cursor, when 'cursorcolumn' is set. - Directory = { fg = c.blue }, -- directory names (and other special names in listings) - DiffAdd = { fg = c.diff.add_fg, bg = c.diff.add }, -- diff mode: Added line |diff.txt| - DiffChange = { fg = c.diff.change_fg, bg = c.diff.change }, -- diff mode: Changed line |diff.txt| - DiffDelete = { fg = c.diff.delete_fg, bg = c.diff.delete }, -- diff mode: Deleted line |diff.txt| - DiffText = { fg = c.fg_gutter }, -- diff mode: Changed text within a changed line |diff.txt| - EndOfBuffer = { fg = c.eob }, -- filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|. - -- TermCursor = { }, -- cursor in a focused terminal - -- TermCursorNC= { }, -- cursor in an unfocused terminal - ErrorMsg = { fg = c.error }, -- error messages on the command line - VertSplit = { fg = c.bg_visual, bg = config.options.transparent and c.none or c.bg }, -- the column separating vertically split windows - Folded = { fg = c.fg, bg = c.bg_visual_selection }, -- line used for closed folds - FoldColumn = { link = 'Folded' }, -- 'foldcolumn' - SignColumn = { fg = c.fg_gutter, bg = config.options.transparent and c.none or c.bg }, -- column where |signs| are displayed - SignColumnSB = { fg = c.fg_gutter, bg = c.bg_sidebar }, -- column where |signs| are displayed - Substitute = { fg = c.black, bg = c.red }, -- |:substitute| replacement text highlighting - LineNr = { fg = config.options.transparent and c.cursor_line_nr or c.line_nr }, -- Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set. - CursorLineNr = { fg = c.cursor_line_nr }, -- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line. - MatchParen = { fg = c.fg, bg = c.syntax.match_paren_bg }, -- The character under the cursor or just before it, if it is a paired bracket, and its match. |pi_paren.txt| - ModeMsg = { fg = c.fg, style = 'Bold' }, -- 'showmode' message (e.g., "-- INSERT -- ") - MsgArea = { fg = c.fg }, -- Area for messages and cmdline - -- MsgSeparator= { }, -- Separator for scrolled messages, `msgsep` flag of 'display' - MoreMsg = { fg = c.blue }, -- |more-prompt| - NonText = { fg = c.eob }, -- '@' 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|. - Normal = { fg = c.fg, bg = config.options.transparent and c.none or c.bg }, -- normal text - NormalNC = { fg = c.fg, bg = config.options.transparent and c.none or c.bg }, -- normal text in non-current windows - NormalSB = { fg = c.fg, bg = c.bg_sidebar }, -- normal text in non-current windows - NormalFloat = { fg = c.fg, bg = c.bg_float }, -- Normal text in floating windows. - FloatBorder = { fg = c.border }, - Pmenu = { fg = c.fg, bg = c.pmenu.bg }, -- Popup menu: normal item. - PmenuSel = { fg = c.pmenu.bg, bg = util.darken(c.bright_blue, 0.75) }, -- Popup menu: selected item. - PmenuSbar = { bg = c.pmenu.bg }, -- Popup menu: scrollbar. - PmenuThumb = { bg = c.pmenu.sbar }, -- Popup menu: Thumb of the scrollbar. - Question = { fg = c.blue }, -- |hit-enter| prompt and yes/no questions - QuickFixLine = { bg = util.darken(c.blue, 0.2), style = 'Bold' }, -- Current |quickfix| item in the quickfix window. Combined with |hl-CursorLine| when the cursor is there. - Search = { fg = c.none, bg = c.bg_search }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out. - IncSearch = { fg = '#000000', bg = c.orange }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c" - SpecialKey = { fg = c.fg_gutter }, -- Unprintable characters: text displayed differently from what it really is. But not 'listchars' whitespace. |hl-Whitespace| - SpellBad = { sp = c.error, style = 'Undercurl' }, -- Word that is not recognized by the spellchecker. |spell| Combined with the highlighting used otherwise. - SpellCap = { sp = c.warning, style = 'Undercurl' }, -- Word that should start with a capital. |spell| Combined with the highlighting used otherwise. - SpellLocal = { sp = c.info, style = 'Undercurl' }, -- Word that is recognized by the spellchecker as one that is used in another region. |spell| Combined with the highlighting used otherwise. - SpellRare = { sp = c.hint, style = 'Undercurl' }, -- Word that is recognized by the spellchecker as one that is hardly ever used. |spell| Combined with the highlighting used otherwise. - StatusLine = { fg = c.bg, bg = c.blue }, -- status line of current window - StatusLineNC = { fg = util.darken(c.fg, 0.5), bg = c.bg }, -- 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 = { fg = c.fg, bg = c.bg }, -- tab pages line, not active tab page label - TabLineFill = { bg = c.bg2 }, -- tab pages line, where there are no labels - TabLineSel = { link = 'PmenuSel' }, -- tab pages line, active tab page label - Title = { fg = c.syntax.variable, style = 'Bold' }, -- titles for output from ":set all", ":autocmd" etc. - Visual = { bg = c.bg_visual_selection }, -- Visual mode selection - VisualNOS = { link = 'Visual' }, -- Visual mode selection when vim is "Not Owning the Selection". - WarningMsg = { fg = c.warning }, -- warning messages - Whitespace = { fg = util.darken(c.syntax.comment, 0.4) }, -- "nbsp", "space", "tab" and "trail" in 'listchars' - WildMenu = { bg = c.bg_visual }, -- current match in 'wildmenu' completion - -- 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. - - Comment = { fg = c.syntax.comment, style = config.options.styles.comments }, -- any comment - Constant = { fg = c.syntax.constant }, -- (preferred) any constant - String = { fg = c.syntax.string }, -- a string constant: "this is a string" - Character = { fg = c.syntax.variable }, -- a character constant: 'c', '\n' - -- Number = { }, -- a number constant: 234, 0xff - -- Boolean = { }, -- a boolean constant: TRUE, false - -- Float = { }, -- a floating point constant: 2.3e10 - - Identifier = { fg = c.syntax.variable, style = config.options.styles.variables }, -- (preferred) any variable name - Function = { fg = c.syntax.func, style = config.options.styles.functions }, -- function name (also: methods for classes) - Statement = { fg = c.syntax.keyword }, -- (preferred) any statement - -- Conditional = { }, -- if, then, else, endif, switch, etc. - -- Repeat = { }, -- for, do, while, etc. - -- Label = { }, -- case, default, etc. - Operator = { fg = c.syntax.keyword }, -- "sizeof", "+", "*", etc. - Keyword = { fg = c.syntax.keyword, style = config.options.styles.keywords }, -- any other keyword - -- Exception = { }, -- try, catch, throw - - PreProc = { fg = c.syntax.keyword }, -- (preferred) generic Preprocessor - -- Include = { }, -- preprocessor #include - -- Define = { }, -- preprocessor #define - -- Macro = { }, -- same as Define - -- PreCondit = { }, -- preprocessor #if, #else, #endif, etc. - - Type = { fg = c.syntax.keyword }, -- (preferred) int, long, char, etc. - -- StorageClass = { }, -- static, register, volatile, etc. - -- Structure = { }, -- struct, union, enum, etc. - -- Typedef = { }, -- A typedef - - Special = { fg = c.syntax.variable }, -- (preferred) any special symbol - -- SpecialChar = { }, -- special character in a constant - -- Tag = { }, -- you can use CTRL-] on this - -- Delimiter = { }, -- character that needs attention - -- SpecialComment= { }, -- special things inside a comment - -- Debug = { }, -- debugging statements - - Underlined = { style = 'Underline' }, -- (preferred) text that stands out, HTML links - Bold = { style = 'Bold' }, - Italic = { style = 'Italic' }, - -- ("Ignore", below, may be invisible...) - -- Ignore = { }, -- (preferred) left blank, hidden |hl-Ignore| - - Error = { fg = c.error }, -- (preferred) any erroneous construct - Todo = { fg = c.bg, bg = c.yellow }, -- (preferred) anything that needs extra attention; mostly the keywords TODO FIXME and XXX - qfLineNr = { fg = c.syntax.keyword }, - qfFileName = { fg = c.blue }, - - mkdCodeDelimiter = { fg = c.fg }, - mkdCodeStart = { fg = c.syntax.variable, style = 'Bold' }, - mkdCodeEnd = { fg = c.syntax.variable, style = 'Bold' }, - markdownHeadingDelimiter = { fg = c.syntax.variable, style = 'Bold' }, - ['@text.reference.markdown'] = { link = 'Title' }, - markdownH1 = { fg = c.syntax.variable, style = 'Bold' }, - markdownH2 = { fg = c.syntax.variable, style = 'Bold' }, - markdownH3 = { fg = c.syntax.variable, style = 'Bold' }, - markdownLinkText = { fg = c.fg, style = 'Underline' }, - markdownUrl = { fg = c.fg, style = 'Underline' }, - - debugPC = { bg = c.bg_sidebar }, -- used for highlighting the current line in terminal-debug - debugBreakpoint = { fg = c.info, bg = util.darken(c.info, 0.1) }, -- used for breakpoint colors in terminal-debug - - -- 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. - LspReferenceText = { bg = c.lsp.ref_txt }, -- used for highlighting "text" references - LspReferenceRead = { link = 'LspReferenceText' }, -- used for highlighting "read" references - LspReferenceWrite = { link = 'LspReferenceText' }, -- used for highlighting "write" references - LspDiagnosticsDefaultError = { fg = c.error }, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline) - LspDiagnosticsDefaultWarning = { fg = c.warning }, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline) - LspDiagnosticsDefaultInformation = { fg = c.info }, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline) - LspDiagnosticsDefaultHint = { fg = c.hint }, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline) - LspDiagnosticsVirtualTextError = { fg = c.error, bg = util.darken(c.error, 0.1) }, -- Used for "Error" diagnostic virtual text - LspDiagnosticsVirtualTextWarning = { - fg = c.warning, - bg = util.darken(c.warning, 0.1), - }, -- Used for "Warning" diagnostic virtual text - LspDiagnosticsVirtualTextInformation = { fg = c.info, bg = util.darken(c.info, 0.1) }, -- Used for "Information" diagnostic virtual text - LspDiagnosticsVirtualTextHint = { fg = c.hint, bg = util.darken(c.hint, 0.1) }, -- Used for "Hint" diagnostic virtual text - LspDiagnosticsUnderlineError = { style = 'Undercurl', sp = c.error }, -- Used to underline "Error" diagnostics - LspDiagnosticsUnderlineWarning = { style = 'Undercurl', sp = c.warning }, -- Used to underline "Warning" diagnostics - LspDiagnosticsUnderlineInformation = { style = 'Undercurl', sp = c.info }, -- Used to underline "Information" diagnostics - LspDiagnosticsUnderlineHint = { style = 'Undercurl', sp = c.hint }, -- Used to underline "Hint" diagnostics - - LspDiagnosticsError = { fg = c.error }, - LspDiagnosticsWarning = { fg = c.warning }, - LspDiagnosticsInformation = { fg = c.info }, - LspDiagnosticsHint = { fg = c.hint }, - - DiagnosticError = { link = 'LspDiagnosticsDefaultError' }, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline) - DiagnosticWarn = { link = 'LspDiagnosticsDefaultWarning' }, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline) - DiagnosticInfo = { link = 'LspDiagnosticsDefaultInformation' }, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline) - DiagnosticHint = { link = 'LspDiagnosticsDefaultHint' }, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline) - DiagnosticUnderlineError = { link = 'LspDiagnosticsUnderlineError' }, -- Used to underline "Error" diagnostics - DiagnosticUnderlineWarn = { link = 'LspDiagnosticsUnderlineWarning' }, -- Used to underline "Warning" diagnostics - DiagnosticUnderlineInfo = { link = 'LspDiagnosticsUnderlineInformation' }, -- Used to underline "Information" diagnostics - DiagnosticUnderlineHint = { link = 'LspDiagnosticsVirtualTextHint' }, -- Used to underline "Hint" diagnostics - - -- 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 - - -- 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 - } - - ---@class gt.Highlights.Plugins - hi.plugins = { - -- 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. - - -- 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. - ['@note'] = { fg = c.bg, bg = c.info }, - ['@warning'] = { fg = c.bg, bg = c.warning }, - ['@danger'] = { fg = c.bg, bg = c.error }, - ['@constructor'] = { fg = c.syntax.variable }, -- For constructor calls and definitions: `= { }` in Lua, and Java constructors. - -- TSConditional = { }; -- For keywords related to conditionnals. - ['@constant'] = { fg = c.syntax.constant }, -- For constants - ['@constant.comment'] = { fg = c.syntax.keyword }, - -- 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. - ['@field'] = { fg = c.fg }, -- For fields. - -- TSFloat = { }; -- For floats. - ['@function'] = { fg = c.syntax.func }, -- 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. - ['@include'] = { fg = c.syntax.keyword }, -- For includes: `#include` in C, `use` or `extern crate` in Rust, or `require` in Lua. - ['@keyword'] = { fg = c.syntax.keyword, style = config.options.styles.keywords }, -- For keywords that don't fall in previous categories. - ['@keyword.function'] = { - fg = c.syntax.keyword, - style = config.options.styles.functions, - }, -- For keywords used to define a fuction. - ['@label'] = { fg = c.blue }, -- For labels: `label:` in C and `:label:` in Lua. - -- TSMethod = { }; -- For method calls and definitions. - ['@namespace'] = { fg = c.fg }, -- For identifiers referring to modules and namespaces. - -- TSNone = { }; -- TODO: docs - -- TSNumber = { }; -- For all numbers - ['@operator'] = { fg = c.syntax.keyword }, -- For any operator: `+`, but also `->` and `*` in C. - ['@parameter'] = { fg = c.syntax.func_param }, -- For parameters of a function. - -- TSParameterReference= { }; -- For references to parameters of a function. - ['@property'] = { fg = c.syntax.func }, -- Same as `TSField`. - ['@punctDelimiter'] = { fg = c.fg }, -- For delimiters ie: `.` - ['@punctBracket'] = { fg = c.fg }, -- For brackets and parens. - ['@punctSpecial'] = { fg = c.fg }, -- For special punctutation that does not fall in the catagories before. - -- TSRepeat = { }; -- For keywords related to loops. - ['@string'] = { fg = c.syntax.string }, -- For strings. - ['@string.regex'] = { fg = c.syntax.variable }, -- For regexes. - ['@string.escape'] = { fg = c.red }, -- For escape characters within a string. - -- TSSymbol = { }; -- For identifiers referring to symbols or atoms. - ['@type'] = { fg = c.syntax.keyword }, -- For types. - -- TSTypeBuiltin = { }; -- For builtin types. - ['@variable'] = { fg = c.syntax.variable, style = config.options.styles.variables }, -- Any variable name that does not have another highlight. - ['@variable.builtin'] = { fg = c.syntax.variable }, -- Variable names that are defined by the languages, like `this` or `self`. - ['@tag'] = { fg = c.syntax.tag }, -- Tags like html tag names. - ['@tag.delimiter'] = { fg = c.fg }, -- Tag delimiter like `<` `>` `/` - ['@text'] = { fg = c.fg }, -- For strings considered text in a markup language. - ['@text.reference'] = { fg = c.red }, -- FIXME - -- 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. - - -- Lua - ['@constructor.lua'] = { fg = c.fg }, - - -- C - ['@label.c'] = { fg = c.fg }, - - -- CSS - ['@property.css'] = { fg = c.syntax.func }, - ['@type.css'] = { fg = c.syntax.tag }, - - -- html - ['@constant.html'] = { fg = c.syntax.tag }, - htmlTag = { fg = c.fg }, - htmlEndTag = { fg = c.fg }, - htmlTagName = { fg = c.syntax.tag }, - htmlArg = { fg = c.syntax.html_arg }, - - -- javascript - ['@type.javascript'] = { fg = c.fg }, - ['@parameter.javascript'] = { fg = c.syntax.param }, - ['@variable.javascript'] = { fg = c.syntax.variable }, - ['@punct.delimiter.javascript'] = { fg = c.fg }, - ['@string.regex.javascript'] = { fg = c.syntax.string }, - ['@constructor.javascript'] = { fg = c.syntax.func }, - ['@property.javascript'] = { fg = c.syntax.func }, - ['@string.escape.regex'] = { fg = c.syntax.keyword }, - - -- json - ['@label.json'] = { fg = c.syntax.json_label }, - - -- less - lessVariable = { fg = c.fg }, - lessProperty = { fg = c.syntax.variable }, - cssTagName = { fg = c.syntax.tag }, - cssPseudoClassId = { fg = c.syntax.func }, - lessClassCall = { fg = c.syntax.func }, - lessClass = { fg = c.syntax.func }, - - -- make - makeSpecial = { fg = c.syntax.keyword }, - - -- obj-c - cBlock = { fg = c.syntax.func }, - - -- python - ['@type.python'] = { fg = c.syntax.func }, - ['@parameter.python'] = { fg = c.syntax.param }, - - -- ruby - ['@type.ruby'] = { fg = c.syntax.func }, - - -- scss - ['@variable.scss'] = { fg = c.syntax.param }, - ['@type.scss'] = { fg = c.syntax.tag }, - ['@property.scss'] = { fg = c.syntax.func }, - ['@parameter.scss'] = { fg = c.syntax.param }, - - -- sql - sqlFold = { fg = c.syntax.variable }, - sqlKeyword = { fg = c.syntax.keyword }, - - -- typescript - ['@type.typescript'] = { fg = c.syntax.func }, - ['@constructor.typescript'] = { fg = c.syntax.func }, - ['@typebuiltin.typescript'] = { fg = c.syntax.variable }, - - -- xml - xmlProcessing = { fg = c.syntax.tag }, - xmlTagName = { fg = c.syntax.tag }, - xmlTag = { fg = c.fg }, - xmlAttrib = { fg = c.syntax.tag }, - - -- yaml - ['@field.yaml'] = { fg = c.syntax.tag }, - - -- java - ['@variable.java'] = { fg = c.fg }, - ['@type.java'] = { fg = c.syntax.func }, - ['@parameter.java'] = { fg = c.syntax.param }, - - -- Markdown - markdownHeadingRule = { fg = c.syntax.variable }, - markdownListMarker = { fg = c.syntax.param }, - markdownRule = { fg = c.syntax.variable }, - markdownBold = { fg = c.fg, style = 'Bold' }, - markdownItalic = { fg = c.fg, style = 'Italic' }, - markdownCode = { fg = c.fg }, - markdownCodeBlock = { fg = c.fg }, - markdownBlockquote = { fg = c.syntax.tag }, - markdownCodeDelimiter = { fg = c.syntax.func }, - markdownUrlTitle = { fg = c.syntax.string, style = 'Underline' }, - - -- go - ['@variable.go'] = { fg = c.fg }, - - -- LspTrouble - LspTroubleText = { fg = c.fg }, - LspTroubleCount = { fg = c.magenta, bg = c.fg_gutter }, - LspTroubleNormal = { fg = c.bright_yellow, bg = c.bg_sidebar }, - - -- Illuminate - illuminatedWord = { bg = c.lsp.ref_txt }, - illuminatedCurWord = { bg = c.lsp.ref_txt }, - - -- diff - diffAdded = { link = 'DiffAdd' }, - diffChanged = { link = 'DiffChange' }, - diffRemoved = { link = 'DiffDelete' }, - diffOldFile = { fg = c.yellow }, - diffNewFile = { fg = c.orange }, - diffFile = { fg = c.blue }, - diffLine = { fg = c.fg_gutter }, - diffIndexLine = { fg = c.magenta }, - - -- Neogit - NeogitBranch = { fg = c.syntax.keyword }, - NeogitRemote = { fg = c.syntax.keyword }, - NeogitHunkHeader = { fg = c.fg, bg = c.bg_highlight }, - NeogitHunkHeaderHighlight = { - fg = c.blue, - bg = c.bg_highlight, - style = 'Italic', - }, - NeogitDiffContextHighlight = { fg = c.fg, bg = c.bg }, - NeogitDiffAddHighlight = { link = 'DiffAdd' }, - NeogitDiffDeleteHighlight = { link = 'DiffDelete' }, - - -- GitGutter - GitGutterAdd = { fg = c.git_signs.add }, -- diff mode: Added line |diff.txt| - GitGutterChange = { fg = c.git_signs.change }, -- diff mode: Changed line |diff.txt| - GitGutterDelete = { fg = c.git_signs.delete }, -- diff mode: Deleted line |diff.txt| - - -- GitSigns - GitSignsAdd = { fg = c.git_signs.add }, -- diff mode: Added line |diff.txt| - GitSignsChange = { fg = c.git_signs.change }, -- diff mode: Changed line |diff.txt| - GitSignsDelete = { fg = c.git_signs.delete }, -- diff mode: Deleted line |diff.txt| - GitSignsCurrentLineBlame = { fg = util.darken(c.syntax.comment, 0.6) }, -- diff mode: Deleted line |diff.txt| - - -- Telescope - TelescopeBorder = { fg = c.border }, - TelescopePromptPrefix = { fg = c.fg }, - TelescopeMatching = { fg = c.syntax.constant, style = 'Bold' }, - TelescopeMultiSelection = { fg = c.syntax.comment }, - TelescopeSelection = { bg = c.bg_visual_selection }, - - -- NvimTree - NvimTreeNormal = { fg = c.fg_light, bg = c.bg_sidebar }, - NvimTreeEndOfBuffer = { fg = c.sidebar_eob }, - NvimTreeRootFolder = { fg = c.fg_light, style = 'Bold' }, - NvimTreeGitDirty = { fg = c.git.change }, - NvimTreeGitNew = { fg = c.git.add }, - NvimTreeGitRenamed = { fg = c.git.renamed }, - NvimTreeGitDeleted = { fg = c.git.delete }, - NvimTreeGitIgnored = { fg = c.syntax.comment }, - NvimTreeSpecialFile = { fg = c.yellow, style = 'Underline' }, - NvimTreeIndentMarker = { fg = c.syntax.comment }, - NvimTreeImageFile = { fg = c.bright_yellow }, - NvimTreeSymlink = { fg = c.magenta }, - NvimTreeFolderName = { fg = c.fg_light }, - NvimTreeOpenedFolderName = { fg = c.fg_light, style = 'Bold' }, - NvimTreeOpenedFile = { fg = c.bright_blue }, - - -- Git Default - gitcommitSummary = { fg = c.syntax.tag }, - - -- Dashboard - DashboardHeader = { fg = c.blue }, - DashboardCenter = { fg = c.green, style = 'Bold' }, - DashboardShortCut = { fg = c.yellow }, - DashboardFooter = { fg = c.bright_white, style = 'Italic' }, - - -- WhichKey - WhichKey = { fg = c.blue }, -- the key - WhichKeyGroup = { fg = c.syntax.keyword }, -- a group - WhichKeySeperator = { fg = c.syntax.comment }, -- the separator between the key and its label - WhichKeyDesc = { fg = c.fg }, -- the label of the key - WhichKeyFloat = { bg = c.bg2 }, -- Normal in the popup window - WhichKeyValue = { fg = c.syntax.comment }, -- used by plugins that provide values - - -- LspSaga - DiagnosticError = { fg = c.error }, - DiagnosticWarning = { fg = c.warning }, - DiagnosticInformation = { fg = c.info }, - DiagnosticHint = { fg = c.hint }, - - -- NeoVim - healthError = { fg = c.error }, - healthSuccess = { fg = c.green }, - healthWarning = { fg = c.warning }, - - -- BufferLine - BufferLineIndicatorSelected = { fg = c.syntax.param }, - BufferLineBackground = { fg = c.syntax.comment }, - - -- Hop - -- Deep red color for light themes - -- Fixed https://github.com/projekt0n/github-nvim-theme/issues/189 - HopNextKey = { - fg = vim.o.background == 'light' and c.bright_red or c.magenta, - style = 'Bold', - }, - HopNextKey1 = { fg = c.blue, style = 'Bold' }, - HopNextKey2 = { fg = util.darken(c.bright_blue, 0.8) }, - HopUnmatched = { fg = c.fg_dark }, - - -- ALE - ALEWarningSign = { fg = c.warning }, - ALEErrorSign = { fg = c.error }, - - -- Barbar - BufferCurrent = { fg = c.fg }, - BufferCurrentIndex = { bg = c.bg, fg = c.fg }, - BufferCurrentMod = { bg = c.bg, fg = c.warning }, - BufferCurrentSign = { bg = c.bg, fg = c.info }, - BufferCurrentTarget = { bg = c.bg, fg = c.fg_light }, - BufferVisible = { bg = c.bg2, fg = c.fg_dark }, - BufferVisibleIndex = { bg = c.bg2, fg = c.red }, - BufferVisibleMod = { bg = c.bg2, fg = c.warning }, - BufferVisibleSign = { bg = c.bg2, fg = c.info }, - BufferVisibleTarget = { bg = c.bg2, fg = c.red }, - BufferInactive = { bg = c.bg2, fg = c.fg_dark }, - BufferInactiveIndex = { bg = c.bg2, fg = c.fg_light }, - BufferInactiveMod = { bg = c.bg2, fg = util.darken(c.warning, 0.7) }, - BufferInactiveSign = { bg = c.bg2, fg = util.darken(c.fg_dark, 0.4, c.bg2) }, - BufferInactiveTarget = { bg = c.bg2, fg = c.red }, - BufferTabpages = { bg = c.bg2, fg = c.none }, - BufferTabpageFill = { bg = c.bg2, fg = c.bg_highlight }, - - -- Compe - CompeDocumentation = { links = 'NormalFloat' }, - CompeDocumentationBorder = { links = 'FloatBorder' }, - - -- Cmp - CmpDocumentation = { links = 'NormalFloat' }, - CmpDocumentationBorder = { links = 'FloatBorder' }, - CmpItemAbbrDeprecated = { fg = c.syntax.comment, style = 'strikethrough' }, - CmpItemAbbrMatch = { fg = c.blue }, - CmpItemAbbrDefault = { fg = c.fg_light }, - CmpItemAbbrMatchFuzzy = { link = 'CmpItemAbbrMatch' }, - CmpItemMenuDefault = { link = 'CmpItemAbbrDefault' }, - - -- Cmp Item Kind - CmpItemKindColor = { fg = c.bright_red }, - CmpItemKindProperty = { fg = c.syntax.func }, - CmpItemKindSnippet = { fg = c.bright_yellow }, - - CmpItemKindVariable = { fg = c.syntax.variable }, - CmpItemKindClass = { link = 'CmpItemKindVariable' }, - CmpItemKindEnum = { link = 'CmpItemKindVariable' }, - CmpItemKindInterface = { link = 'CmpItemKindVariable' }, - CmpItemKindText = { link = 'CmpItemKindVariable' }, - - CmpItemKindKeyword = { fg = c.syntax.keyword }, - CmpItemKindField = { link = 'CmpItemKindKeyword' }, - CmpItemKindUnit = { link = 'CmpItemKindKeyword' }, - CmpItemKindValue = { link = 'CmpItemKindKeyword' }, - - CmpItemKindFile = { fg = c.orange }, - CmpItemKindFolder = { fg = c.cyan }, - - CmpItemKindFunction = { fg = c.syntax.func }, - CmpItemKindConstructor = { link = 'CmpItemKindFunction' }, - CmpItemKindEvent = { link = 'CmpItemKindFunction' }, - CmpItemKindMethod = { link = 'CmpItemKindFunction' }, - - CmpItemKindOperator = { link = 'Operator' }, - CmpItemKindEnumMember = { link = 'CmpItemKindOperator' }, - CmpItemKindReference = { link = 'CmpItemKindOperator' }, - CmpItemKindTypeParameter = { link = 'CmpItemKindOperator' }, - - CmpItemKindConstant = { fg = c.syntax.constant }, - CmpItemKindModule = { link = 'CmpItemKindConstant' }, - CmpItemKindStruct = { link = 'CmpItemKindConstant' }, - - -- nvim-notify - NotifyERRORTitle = { fg = util.darken(c.error, 0.9) }, - NotifyWARNTitle = { fg = util.darken(c.warning, 0.9) }, - NotifyINFOTitle = { fg = util.darken(c.green, 0.9) }, - NotifyDEBUGTitle = { fg = util.darken(c.fg, 0.7) }, - NotifyTRACETitle = { fg = util.darken(c.bright_magenta, 0.9) }, - - NotifyERRORIcon = { link = 'NotifyERRORTitle' }, - NotifyWARNIcon = { link = 'NotifyWARNTitle' }, - NotifyINFOIcon = { link = 'NotifyINFOTitle' }, - NotifyDEBUGIcon = { link = 'NotifyDEBUGTitle' }, - NotifyTRACEIcon = { link = 'NotifyTRACETitle' }, - - NotifyERRORBorder = { link = 'NotifyERRORTitle' }, - NotifyWARNBorder = { link = 'NotifyWARNTitle' }, - NotifyINFOBorder = { link = 'NotifyINFOTitle' }, - NotifyDEBUGBorder = { link = 'NotifyDEBUGTitle' }, - NotifyTRACEBorder = { link = 'NotifyTRACETitle' }, - - NotifyERRORBody = { fg = util.lighten(c.error, 0.1) }, - NotifyWARNBody = { fg = util.lighten(c.warning, 0.1) }, - NotifyINFOBody = { fg = util.lighten(c.green, 0.1) }, - NotifyDEBUGBody = { link = 'NotifyDEBUGTitle' }, - NotifyTRACEBody = { fg = util.lighten(c.bright_magenta, 0.1) }, - - -- Coc - CocErrorSign = { link = 'ErrorMsg' }, - CocWarningSign = { link = 'WarningMsg' }, - CocInfoSign = { link = 'DiagnosticInfo' }, - CocHintSign = { link = 'DiagnosticHint' }, - CocErrorFloat = { link = 'ErrorMsg' }, - CocWarningFloat = { link = 'WarningMsg' }, - CocInfoFloat = { link = 'DiagnosticInfo' }, - CocHintFloat = { link = 'DiagnosticHint' }, - CocDiagnosticsError = { link = 'ErrorMsg' }, - CocDiagnosticsWarning = { link = 'WarningMsg' }, - CocDiagnosticsInfo = { link = 'DiagnosticInfo' }, - CocDiagnosticsHint = { link = 'DiagnosticHint' }, - CocSelectedText = { fg = c.red }, - CocCodeLens = { fg = c.fg_dark }, - - CocErrorHighlight = { link = 'LspDiagnosticsUnderlineError' }, - CocWarningHighlight = { link = 'LspDiagnosticsUnderlineWarning' }, - CocInfoHighlight = { link = 'LspDiagnosticsUnderlineInformation' }, - CocHintHighlight = { link = 'LspDiagnosticsUnderlineHint' }, - - CocHighlightText = { bg = c.bg_visual_selection }, - CocUnderline = { style = 'Undercurl' }, - - CocPumMenu = { link = 'Pmenu' }, - CocPumVirtualText = { link = 'Comment' }, - CocMenuSel = { link = 'PmenuSel' }, - - -- DiffView - DiffAdd = { fg = c.diff.add_fg, bg = c.diff.add }, - DiffChange = { fg = c.diff.change_fg, bg = c.diff.change }, - DiffDelete = { fg = c.diff.delete_fg, bg = c.diff.delete }, - DiffText = { link = 'DiffChange' }, - DiffviewFilePanelFileName = { fg = c.fg_light }, - - -- nvim-treesitter-context - TreesitterContext = { - bg = vim.o.background == 'light' and util.lighten(c.blue, 0.9) - or util.darken(c.blue, 0.2), - }, - - -- mini.nvim - MiniCompletionActiveParameter = { style = 'Underline' }, - - MiniCursorword = { bg = c.lsp.ref_txt }, - MiniCursorwordCurrent = { bg = c.lsp.ref_txt }, - - MiniIndentscopeSymbol = { link = 'Delimiter' }, - MiniIndentscopePrefix = { style = 'NoCombine' }, -- Make it invisible - - MiniJump = { link = 'SpellRare' }, - - MiniJump2dSpot = { - fg = vim.o.background == 'light' and c.bright_red or c.magenta, - style = 'Bold', - }, - - MiniStarterCurrent = { style = 'NoCombine' }, - MiniStarterFooter = { fg = c.bright_white, style = 'Italic' }, - MiniStarterHeader = { fg = c.blue }, - MiniStarterInactive = { link = 'Comment' }, - MiniStarterItem = { link = 'Normal' }, - MiniStarterItemBullet = { fg = c.border }, - MiniStarterItemPrefix = { fg = c.warning }, - MiniStarterSection = { link = 'Special' }, - MiniStarterQuery = { fg = c.info }, - - MiniStatuslineDevinfo = { fg = c.fg, bg = c.bg_highlight }, - MiniStatuslineFileinfo = { fg = c.fg, bg = c.bg_highlight }, - MiniStatuslineFilename = { fg = util.darken(c.fg, 0.5), bg = c.bg }, - MiniStatuslineInactive = { bg = c.bg2, fg = util.darken(c.fg, 0.3) }, - MiniStatuslineModeCommand = { fg = c.bg, bg = c.bright_magenta, style = 'Bold' }, - MiniStatuslineModeInsert = { fg = c.bg, bg = c.green, style = 'Bold' }, - MiniStatuslineModeNormal = { fg = c.bg, bg = c.blue, style = 'Bold' }, - MiniStatuslineModeOther = { fg = c.bg, bg = c.orange, style = 'Bold' }, - MiniStatuslineModeReplace = { fg = c.bg, bg = c.red, style = 'Bold' }, - MiniStatuslineModeVisual = { fg = c.bg, bg = c.yellow, style = 'Bold' }, - - MiniSurround = { link = 'IncSearch' }, - - MiniTablineCurrent = { - fg = c.pmenu.bg, - bg = util.darken(c.bright_blue, 0.75), - style = 'Bold', - }, - MiniTablineFill = { link = 'TabLineFill' }, - MiniTablineHidden = { fg = c.fg, bg = c.bg }, - MiniTablineModifiedCurrent = { - fg = util.darken(c.bright_blue, 0.75), - bg = c.pmenu.bg, - style = 'Bold', - }, - MiniTablineModifiedHidden = { fg = c.bg, bg = c.fg }, - MiniTablineModifiedVisible = { fg = util.darken(c.bright_blue, 0.5), bg = c.pmenu.bg }, - MiniTablineTabpagesection = { fg = c.none, bg = c.bg_search, style = 'Bold' }, - MiniTablineVisible = { fg = c.pmenu.bg, bg = util.darken(c.bright_blue, 0.5) }, - - MiniTestEmphasis = { style = 'Bold' }, - MiniTestFail = { fg = c.red, style = 'Bold' }, - MiniTestPass = { fg = c.green, style = 'Bold' }, - - MiniTrailspace = { bg = c.red }, - - -- indent-blankline.nvim - IndentBlanklineChar = { fg = util.darken(c.syntax.comment, 0.2) }, - IndentBlanklineSpaceChar = { fg = util.darken(c.syntax.comment, 0.2) }, - IndentBlanklineSpaceCharBlankline = { fg = util.darken(c.syntax.comment, 0.2) }, - IndentBlanklineContextChar = { fg = c.fg }, - IndentBlanklineContextStart = { sp = c.fg, underline = true }, - } - - if config.options.hide_nc_statusline then - local inactive = { fg = c.bg, bg = c.bg, sp = c.bg_visual, style = 'Underline' } - hi.base.StatusLineNC = inactive - hi.plugins.MiniStatuslineInactive = inactive - end - - return hi -end - -return M