From 67569421da42e912de92201bbadb14afc1e6faec Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Mon, 26 Sep 2022 16:58:04 +0200 Subject: [PATCH] vim: more solarized refactoring --- config/nvim/lua/fs/solarized.lua | 480 +++++++++++++++---------------- 1 file changed, 234 insertions(+), 246 deletions(-) diff --git a/config/nvim/lua/fs/solarized.lua b/config/nvim/lua/fs/solarized.lua index e59826a..f70849d 100644 --- a/config/nvim/lua/fs/solarized.lua +++ b/config/nvim/lua/fs/solarized.lua @@ -1,293 +1,281 @@ -local cmd = vim.cmd -local fn = vim.fn - -local M = { - Color = require('colorbuddy.init').Color, - colors = require('colorbuddy.init').colors, - Group = require('colorbuddy.init').Group, - groups = require('colorbuddy.init').groups, - styles = require('colorbuddy.init').styles, -} +local M = {} M.setup = function() - cmd [[ packadd! colorbuddy.nvim ]] - if vim.g.colors_name then - vim.cmd("hi clear") + vim.cmd 'hi clear' end - if fn.exists('syntax_on') then - cmd('syntax reset') + if vim.fn.exists('syntax_on') then + vim.cmd 'syntax reset' end vim.g.colors_name = 'solarized' - local Color = M.Color - local colors = M.colors - local Group = M.Group - local groups = M.groups - local styles = M.styles + local colorbuddy = require('colorbuddy') + local Color = colorbuddy.Color + local C = colorbuddy.colors + local Group = colorbuddy.Group + local G = colorbuddy.groups + local S = colorbuddy.styles - Color.new('base03', '#002b36') - Color.new('base02', '#073642') - Color.new('base01', '#586e75') - Color.new('base00', '#657b83') - Color.new('base0', '#839496') - Color.new('base1', '#93a1a1') - Color.new('base2', '#eee8d5') - Color.new('base3', '#fdf6e3') - Color.new('yellow', '#b58900') - Color.new('orange', '#cb4b16') - Color.new('red', '#dc322f') + -- Color.new('base03' , '#002b36') + Color.new('base03' , '#002028') + Color.new('base02' , '#073642') + Color.new('base01' , '#586e75') + Color.new('base00' , '#657b83') + Color.new('base0' , '#839496') + Color.new('base1' , '#93a1a1') + Color.new('base2' , '#eee8d5') + Color.new('base3' , '#fdf6e3') + Color.new('yellow' , '#b58900') + Color.new('orange' , '#cb4b16') + Color.new('red' , '#dc322f') Color.new('magenta', '#d33682') - Color.new('violet', '#6c71c4') - Color.new('blue', '#268bd2') - Color.new('cyan', '#2aa198') - Color.new('green', '#719e07') + Color.new('violet' , '#6c71c4') + Color.new('blue' , '#268bd2') + Color.new('cyan' , '#2aa198') + -- Color.new('green' , '#859900') + Color.new('green' , '#719e07') - Color.new('bg', colors.base03) - Group.new('Error', colors.red) - Group.new('Warning', colors.yellow) - Group.new('Information', colors.blue) - Group.new('Hint', colors.cyan) + Color.new('bg' , C.base03) - -- normal non-current text - Group.new('Normal', colors.base0, colors.NONE, styles.NONE) - Group.new('NormalNC', colors.base0:dark(), colors.NONE, styles.NONE) + Group.new('Error' , C.red) + Group.new('Warning' , C.yellow) + Group.new('Information' , C.blue) + Group.new('Hint' , C.cyan) - Group.new('Comment', colors.base01, colors.none, styles.NONE) - Group.new('Constant', colors.cyan, colors.none, styles.NONE) - -- Any variable name, function or class name - Group.new('Identifier', colors.blue, colors.none, styles.NONE) + Group.new('Normal' , C.base0 , C.NONE , S.NONE) + Group.new('NormalNC' , G.Normal) + Group.new('Comment' , C.base01 , C.NONE , S.NONE) + Group.new('Constant' , C.cyan , C.NONE , S.NONE) + Group.new('Identifier' , C.blue , C.NONE , S.NONE) - -- any statement, conditional, repeat (for, do while), label, operator - Group.new('Statement', colors.green, colors.none, styles.NONE) - Group.new('PreProc', colors.orange, colors.none, styles.NONE) - Group.new('Type', colors.yellow, colors.none, styles.NONE) - Group.new('Special', colors.red, colors.none, styles.NONE) - Group.new('Underlined', colors.violet, colors.none, styles.NONE) - Group.new('Ignore', colors.none, colors.none, styles.NONE) - Group.new('Error', colors.red, colors.none, styles.NONE) - Group.new('TODO', colors.magenta, colors.none, styles.bold) + Group.new('Statement' , C.green , C.NONE , S.NONE) + Group.new('PreProc' , C.orange , C.NONE , S.NONE) + Group.new('Type' , C.yellow , C.NONE , S.NONE) + Group.new('Special' , C.red , C.NONE , S.NONE) + Group.new('Underlined' , C.violet , C.NONE , S.NONE) + Group.new('Ignore' , C.NONE , C.NONE , S.NONE) + Group.new('Error' , C.red , C.NONE , S.NONE) + Group.new('TODO' , C.magenta, C.NONE , S.bold) - Group.new('SpecialKey', colors.base00, colors.base02, styles.bold) - Group.new('NonText', colors.base00, colors.NONE, styles.bold) - Group.new('StatusLine', colors.base1, colors.base02, styles.reverse) - Group.new('StatusLineNC', colors.base00, colors.base02, styles.reverse) - Group.new('Visual', colors.base01, colors.base03, styles.reverse) - Group.new('Directory', colors.blue, colors.none, styles.NONE) - Group.new('ErrorMsg', colors.red, colors.none, styles.reverse) + Group.new('SpecialKey' , C.base00 , C.base02, S.bold) + Group.new('NonText' , C.base02 , C.NONE , S.NONE) + Group.new('StatusLine' , C.base1 , C.base02, S.reverse) + Group.new('StatusLineNC', C.base00 , C.base02, S.reverse) + Group.new('Visual' , C.base01 , C.base03, S.reverse) + Group.new('Directory' , C.blue , C.NONE , S.NONE) + Group.new('ErrorMsg' , C.red , C.NONE , S.reverse) - Group.new('IncSearch', colors.orange, colors.none, styles.standout) - Group.new('Search', colors.yellow, colors.none, styles.reverse) + Group.new('IncSearch' , C.orange , C.NONE , S.standout) + Group.new('Search' , C.yellow , C.NONE , S.reverse) - Group.new('MoreMsg', colors.blue, colors.none, styles.NONE) - Group.new('ModeMsg', colors.blue, colors.none, styles.NONE) - Group.new('Question', colors.cyan, colors.none, styles.bold) - Group.new('VertSplit', colors.base00, colors.none, styles.NONE) - Group.new('Title', colors.orange, colors.none, styles.bold) - Group.new('VisualNOS', colors.none, colors.base02, styles.reverse) - Group.new('WarningMsg', colors.red, colors.none, styles.NONE) - Group.new('WildMenu', colors.base2, colors.base02, styles.reverse) - Group.new('Folded', colors.base0, colors.base02, styles.bold, colors.base03) - Group.new('FoldColumn', colors.base0, colors.base02, styles.NONE) + Group.new('MoreMsg' , C.blue , C.NONE , S.NONE) + Group.new('ModeMsg' , C.blue , C.NONE , S.NONE) + Group.new('Question' , C.cyan , C.NONE , S.bold) + Group.new('VertSplit' , C.base00 , C.NONE , S.NONE) + Group.new('Title' , C.orange , C.NONE , S.bold) + Group.new('VisualNOS' , C.NONE , C.base02, S.reverse) + Group.new('WarningMsg' , C.red , C.NONE , S.NONE) + Group.new('WildMenu' , C.base2 , C.base02, S.reverse) + Group.new('Folded' , C.base0 , C.base02, S.bold , C.base03) + Group.new('FoldColumn' , C.base0 , C.base02, S.NONE) - Group.new('DiffAdd', colors.green, colors.base02, styles.bold, colors.green) - Group.new('DiffChange', colors.yellow, colors.base02, styles.bold, colors.yellow) - Group.new('DiffDelete', colors.red, colors.base02, styles.bold) - Group.new('DiffText', colors.blue, colors.base02, styles.bold, colors.blue) + Group.new('DiffAdd' , C.green , C.base02, S.bold , C.green) + Group.new('DiffChange' , C.yellow , C.base02, S.bold , C.yellow) + Group.new('DiffDelete' , C.red , C.base02, S.bold) + Group.new('DiffText' , C.blue , C.base02, S.bold , C.blue) - Group.new('SignColumn', colors.base0, colors.none, styles.NONE) - Group.new('Conceal', colors.blue, colors.none, styles.NONE) + Group.new('SignColumn' , C.base0 , C.NONE , S.NONE) + Group.new('Conceal' , C.blue , C.NONE , S.NONE) - Group.new('SpellBad', colors.none, colors.none, styles.undercurl, colors.red) - Group.new('SpellCap', colors.none, colors.none, styles.undercurl, colors.violet) - Group.new('SpellRare', colors.none, colors.none, styles.undercurl, colors.cyan) - Group.new('SpellLocal', colors.none, colors.none, styles.undercurl, colors.yellow) + Group.new('SpellBad' , C.NONE , C.NONE , S.undercurl, C.red) + Group.new('SpellCap' , C.NONE , C.NONE , S.undercurl, C.violet) + Group.new('SpellRare' , C.NONE , C.NONE , S.undercurl, C.cyan) + Group.new('SpellLocal' , C.NONE , C.NONE , S.undercurl, C.yellow) -- pum (popup menu) - Group.new('Pmenu', groups.Normal, colors.base02, styles.none) -- popup menu normal item - Group.new('PmenuSel', colors.base01, colors.base2, styles.reverse) -- selected item - Group.new('PmenuSbar', colors.base02, colors.none, styles.reverse) - Group.new('PmenuThumb', colors.base0, colors.none, styles.reverse) + Group.new('Pmenu', G.Normal, C.base02, S.NONE) -- popup menu normal item + Group.new('PmenuSel', C.base01, C.base2, S.reverse) -- selected item + Group.new('PmenuSbar', C.base02, C.NONE, S.reverse) + Group.new('PmenuThumb', C.base0, C.NONE, S.reverse) -- be nice for this float border to be cyan if active - Group.new('FloatBorder', colors.base02) + Group.new('FloatBorder', C.base02) - Group.new('TabLine', colors.base0, colors.base02, styles.NONE, colors.base0) - Group.new('TabLineFill', colors.base0, colors.base02) - Group.new('TabLineSel', colors.yellow, colors.bg) + Group.new('TabLine', C.base0, C.base02, S.NONE, C.base0) + Group.new('TabLineFill', C.base0, C.base02) + Group.new('TabLineSel', C.yellow, C.bg) - Group.new('LineNr', colors.base01, colors.none, styles.NONE) - Group.new('CursorLine', colors.none, colors.base02, styles.NONE, colors.base1) - Group.new('CursorLineNr', colors.none, colors.none, styles.NONE, colors.base1) - Group.new('ColorColumn', colors.none, colors.base02, styles.NONE) - Group.new('Cursor', colors.base03, colors.base0, styles.NONE) - Group.link('lCursor', groups.Cursor) - Group.link('TermCursor', groups.Cursor) - Group.new('TermCursorNC', colors.base03, colors.base01) + Group.new('LineNr', C.base01, C.NONE, S.NONE) + Group.new('CursorLine', C.NONE, C.base02, S.NONE, C.base1) + Group.new('CursorLineNr', C.NONE, C.NONE, S.NONE, C.base1) + Group.new('ColorColumn', C.NONE, C.base02, S.NONE) + Group.new('Cursor', C.base03, C.base0, S.NONE) + Group.link('lCursor', G.Cursor) + Group.link('TermCursor', G.Cursor) + Group.new('TermCursorNC', C.base03, C.base01) - Group.new('MatchParen', colors.red, colors.base01, styles.bold) + Group.new('MatchParen', C.red, C.base01, S.bold) - Group.new('GitGutterAdd', colors.green) - Group.new('GitGutterChange', colors.yellow) - Group.new('GitGutterDelete', colors.red) - Group.new('GitGutterChangeDelete', colors.red) + Group.new('GitGutterAdd', C.green) + Group.new('GitGutterChange', C.yellow) + Group.new('GitGutterDelete', C.red) + Group.new('GitGutterChangeDelete', C.red) - Group.new('GitSignsAddLn', colors.green) - Group.new('GitSignsAddNr', colors.green) - Group.new('GitSignsChangeLn', colors.yellow) - Group.new('GitSignsChangeNr', colors.yellow) - Group.new('GitSignsDeleteLn', colors.red) - Group.new('GitSignsDeleteNr', colors.red) - Group.link('GitSignsCurrentLineBlame', groups.Comment) + Group.new('GitSignsAddLn', C.green) + Group.new('GitSignsAddNr', C.green) + Group.new('GitSignsChangeLn', C.yellow) + Group.new('GitSignsChangeNr', C.yellow) + Group.new('GitSignsDeleteLn', C.red) + Group.new('GitSignsDeleteNr', C.red) + Group.link('GitSignsCurrentLineBlame', G.Comment) -- vim highlighting - Group.link('vimVar', groups.Identifier) - Group.link('vimFunc', groups.Identifier) - Group.link('vimUserFunc', groups.Identifier) - Group.link('helpSpecial', groups.Special) - Group.link('vimSet', groups.Normal) - Group.link('vimSetEqual', groups.Normal) - Group.new('vimCommentString', colors.violet) - Group.new('vimCommand', colors.yellow) - Group.new('vimCmdSep', colors.blue, colors.NONE, styles.bold) - Group.new('helpExample', colors.base1) - Group.new('helpOption', colors.cyan) - Group.new('helpNote', colors.magenta) - Group.new('helpVim', colors.magenta) - Group.new('helpHyperTextJump', colors.blue, colors.NONE, styles.underline) - Group.new('helpHyperTextEntry', colors.green) - Group.new('vimIsCommand', colors.base00) - Group.new('vimSynMtchOpt', colors.yellow) - Group.new('vimSynType', colors.cyan) - Group.new('vimHiLink', colors.blue) - Group.new('vimGroup', colors.blue, colors.NONE, styles.underline + styles.bold) + Group.link('vimVar', G.Identifier) + Group.link('vimFunc', G.Identifier) + Group.link('vimUserFunc', G.Identifier) + Group.link('helpSpecial', G.Special) + Group.link('vimSet', G.Normal) + Group.link('vimSetEqual', G.Normal) + Group.new('vimCommentString', C.violet) + Group.new('vimCommand', C.yellow) + Group.new('vimCmdSep', C.blue, C.NONE, S.bold) + Group.new('helpExample', C.base1) + Group.new('helpOption', C.cyan) + Group.new('helpNote', C.magenta) + Group.new('helpVim', C.magenta) + Group.new('helpHyperTextJump', C.blue, C.NONE, S.underline) + Group.new('helpHyperTextEntry', C.green) + Group.new('vimIsCommand', C.base00) + Group.new('vimSynMtchOpt', C.yellow) + Group.new('vimSynType', C.cyan) + Group.new('vimHiLink', C.blue) + Group.new('vimGroup', C.blue, C.NONE, S.underline + S.bold) - Group.new('gitcommitSummary', colors.green) - Group.new('gitcommitComment', colors.base01, colors.NONE, styles.italic) - Group.link('gitcommitUntracked', groups.gitcommitComment) - Group.link('gitcommitDiscarded', groups.gitcommitComment) - Group.new('gitcommitSelected', groups.gitcommitComment) - Group.new('gitcommitUnmerged', colors.green, colors.NONE, styles.bold) - Group.new('gitcommitOnBranch', colors.base01, colors.NONE, styles.bold) - Group.new('gitcommitBranch', colors.magenta, colors.NONE, styles.bold) - Group.link('gitcommitNoBranch', groups.gitcommitBranch) - Group.new('gitcommitDiscardedType', colors.red) - Group.new('gitcommitSelectedType', colors.green) - Group.new('gitcommitHeader', colors.base01) - Group.new('gitcommitUntrackedFile', colors.cyan) - Group.new('gitcommitDiscardedFile', colors.red) - Group.new('gitcommitSelectedFile', colors.green) - Group.new('gitcommitUnmergedFile', colors.yellow) - Group.new('gitcommitFile', colors.base0) - Group.link('gitcommitDiscardedArrow', groups.gitCommitDiscardedFile) - Group.link('gitcommitSelectedArrow', groups.gitCommitSelectedFile) - Group.link('gitcommitUnmergedArrow', groups.gitCommitUnmergedFile) + Group.new('gitcommitSummary', C.green) + Group.new('gitcommitComment', C.base01, C.NONE, S.italic) + Group.link('gitcommitUntracked', G.gitcommitComment) + Group.link('gitcommitDiscarded', G.gitcommitComment) + Group.new('gitcommitSelected', G.gitcommitComment) + Group.new('gitcommitUnmerged', C.green, C.NONE, S.bold) + Group.new('gitcommitOnBranch', C.base01, C.NONE, S.bold) + Group.new('gitcommitBranch', C.magenta, C.NONE, S.bold) + Group.link('gitcommitNoBranch', G.gitcommitBranch) + Group.new('gitcommitDiscardedType', C.red) + Group.new('gitcommitSelectedType', C.green) + Group.new('gitcommitHeader', C.base01) + Group.new('gitcommitUntrackedFile', C.cyan) + Group.new('gitcommitDiscardedFile', C.red) + Group.new('gitcommitSelectedFile', C.green) + Group.new('gitcommitUnmergedFile', C.yellow) + Group.new('gitcommitFile', C.base0) + Group.link('gitcommitDiscardedArrow', G.gitCommitDiscardedFile) + Group.link('gitcommitSelectedArrow', G.gitCommitSelectedFile) + Group.link('gitcommitUnmergedArrow', G.gitCommitUnmergedFile) - Group.link('diffAdded', groups.Statement) - Group.link('diffLine', groups.Identifier) + Group.link('diffAdded', G.Statement) + Group.link('diffLine', G.Identifier) - Group.new('NeomakeErrorSign', colors.orange) - Group.new('NeomakeWarningSign', colors.yellow) - Group.new('NeomakeMessageSign', colors.cyan) - Group.new('NeomakeNeomakeInfoSign', colors.green) + Group.new('NeomakeErrorSign', C.orange) + Group.new('NeomakeWarningSign', C.yellow) + Group.new('NeomakeMessageSign', C.cyan) + Group.new('NeomakeNeomakeInfoSign', C.green) - Group.new('CmpItemKind', colors.green, colors.none, styles.none) - Group.new('CmpItemMenu', groups.NormalNC, colors.bg, styles.none) - -- Group.new('CmpItemAbbr', colors.base0, colors.bg, styles.none) - -- Group.new('CmpItemAbbrMatch', colors.base0, colors.bg, styles.none) - Group.new("CmpItemKindText", colors.base3, colors.none, styles.none) - Group.new("CmpItemKindMethod", colors.green, colors.none, styles.none) - Group.new("CmpItemKindFunction", colors.blue, colors.none, styles.none) - Group.new("CmpItemKindConstructor", colors.orange, colors.none, styles.none) - Group.new("CmpItemKindField", colors.yellow, colors.none, styles.none) - Group.new("CmpItemKindVariable", colors.orange, colors.none, styles.none) - Group.new("CmpitemKindClass", colors.yellow, colors.none, styles.none) - Group.new("CmpItemKindInterface", colors.yellow, colors.none, styles.none) - Group.new("CmpItemKindModule", colors.green, colors.none, styles.none) - Group.new("CmpItemKindProperty", colors.green, colors.none, styles.none) - Group.new("CmpItemKindUnit", colors.orange, colors.none, styles.none) - Group.new("CmpItemKindValue", colors.cyan, colors.none, styles.none) - Group.new("CmpItemKindEnum", colors.yellow, colors.none, styles.none) - Group.new("CmpItemKindKeyword", colors.green, colors.none, styles.none) - Group.new("CmpItemKindSnippet", colors.magenta, colors.none, styles.none) - Group.new("CmpItemKindColor", colors.magenta, colors.none, styles.none) - Group.new("CmpItemKindFile", colors.violet, colors.none, styles.none) - Group.new("CmpItemKindReference", colors.violet, colors.none, styles.none) - Group.new("CmpItemKindFolder", colors.violet, colors.none, styles.none) - Group.new("CmpItemKindEnumMember", colors.cyan, colors.none, styles.none) - Group.new("CmpItemKindConstant", colors.cyan, colors.none, styles.none) - Group.new("CmpItemKindStruct", colors.yellow, colors.none, styles.none) - Group.new("CmpItemKindEvent", colors.orange, colors.none, styles.none) - Group.new("CmpItemKindOperator", colors.cyan, colors.none, styles.none) - Group.new("CmpItemKindTypeParameter", colors.orange, colors.none, styles.none) + Group.new('CmpItemKind', C.green, C.NONE, S.NONE) + Group.new('CmpItemMenu', G.NormalNC, C.bg, S.NONE) + -- Group.new('CmpItemAbbr', C.base0, C.bg, S.NONE) + -- Group.new('CmpItemAbbrMatch', C.base0, C.bg, S.NONE) + Group.new("CmpItemKindText", C.base3, C.NONE, S.NONE) + Group.new("CmpItemKindMethod", C.green, C.NONE, S.NONE) + Group.new("CmpItemKindFunction", C.blue, C.NONE, S.NONE) + Group.new("CmpItemKindConstructor", C.orange, C.NONE, S.NONE) + Group.new("CmpItemKindField", C.yellow, C.NONE, S.NONE) + Group.new("CmpItemKindVariable", C.orange, C.NONE, S.NONE) + Group.new("CmpitemKindClass", C.yellow, C.NONE, S.NONE) + Group.new("CmpItemKindInterface", C.yellow, C.NONE, S.NONE) + Group.new("CmpItemKindModule", C.green, C.NONE, S.NONE) + Group.new("CmpItemKindProperty", C.green, C.NONE, S.NONE) + Group.new("CmpItemKindUnit", C.orange, C.NONE, S.NONE) + Group.new("CmpItemKindValue", C.cyan, C.NONE, S.NONE) + Group.new("CmpItemKindEnum", C.yellow, C.NONE, S.NONE) + Group.new("CmpItemKindKeyword", C.green, C.NONE, S.NONE) + Group.new("CmpItemKindSnippet", C.magenta, C.NONE, S.NONE) + Group.new("CmpItemKindColor", C.magenta, C.NONE, S.NONE) + Group.new("CmpItemKindFile", C.violet, C.NONE, S.NONE) + Group.new("CmpItemKindReference", C.violet, C.NONE, S.NONE) + Group.new("CmpItemKindFolder", C.violet, C.NONE, S.NONE) + Group.new("CmpItemKindEnumMember", C.cyan, C.NONE, S.NONE) + Group.new("CmpItemKindConstant", C.cyan, C.NONE, S.NONE) + Group.new("CmpItemKindStruct", C.yellow, C.NONE, S.NONE) + Group.new("CmpItemKindEvent", C.orange, C.NONE, S.NONE) + Group.new("CmpItemKindOperator", C.cyan, C.NONE, S.NONE) + Group.new("CmpItemKindTypeParameter", C.orange, C.NONE, S.NONE) - Group.new('LspSagaCodeActionTitle', colors.green) - Group.new('LspSagaBorderTitle', colors.yellow, colors.none, styles.bold) - Group.new('LspSagaDiagnosticHeader', colors.yellow) - Group.new('ProviderTruncateLine', colors.base02) - Group.new('LspSagaShTruncateLine', groups.ProviderTruncateLine) - Group.new('LspSagaDocTruncateLine', groups.ProviderTruncateLine) - Group.new('LspSagaCodeActionTruncateLine', groups.ProviderTruncateLine) - Group.new('LspSagaHoverBorder', colors.cyan) - Group.new('LspSagaRenameBorder', groups.LspSagaHoverBorder) - Group.new('LSPSagaDiagnosticBorder', groups.LspSagaHoverBorder) - Group.new('LspSagaSignatureHelpBorder', groups.LspSagaHoverBorder) - Group.new('LspSagaCodeActionBorder', groups.LspSagaHoverBorder) - Group.new('LspSagaLspFinderBorder', groups.LspSagaHoverBorder) - Group.new('LspSagaFloatWinBorder', groups.LspSagaHoverBorder) - Group.new('LspSagaSignatureHelpBorder', groups.LspSagaHoverBorder) - Group.new('LspSagaDefPreviewBorder', groups.LspSagaHoverBorder) - Group.new('LspSagaAutoPreviewBorder', groups.LspSagaHoverBorder) - Group.new('LspFloatWinBorder', groups.LspSagaHoverBorder) - Group.new('LspLinesDiagBorder', groups.LspSagaHoverBorder) - Group.new('LspSagaFinderSelection', colors.green, colors.none, styles.bold) - --Group.new('SagaShadow', colors.base02) + Group.new('LspSagaCodeActionTitle', C.green) + Group.new('LspSagaBorderTitle', C.yellow, C.NONE, S.bold) + Group.new('LspSagaDiagnosticHeader', C.yellow) + Group.new('ProviderTruncateLine', C.base02) + Group.new('LspSagaShTruncateLine', G.ProviderTruncateLine) + Group.new('LspSagaDocTruncateLine', G.ProviderTruncateLine) + Group.new('LspSagaCodeActionTruncateLine', G.ProviderTruncateLine) + Group.new('LspSagaHoverBorder', C.cyan) + Group.new('LspSagaRenameBorder', G.LspSagaHoverBorder) + Group.new('LSPSagaDiagnosticBorder', G.LspSagaHoverBorder) + Group.new('LspSagaSignatureHelpBorder', G.LspSagaHoverBorder) + Group.new('LspSagaCodeActionBorder', G.LspSagaHoverBorder) + Group.new('LspSagaLspFinderBorder', G.LspSagaHoverBorder) + Group.new('LspSagaFloatWinBorder', G.LspSagaHoverBorder) + Group.new('LspSagaSignatureHelpBorder', G.LspSagaHoverBorder) + Group.new('LspSagaDefPreviewBorder', G.LspSagaHoverBorder) + Group.new('LspSagaAutoPreviewBorder', G.LspSagaHoverBorder) + Group.new('LspFloatWinBorder', G.LspSagaHoverBorder) + Group.new('LspLinesDiagBorder', G.LspSagaHoverBorder) + Group.new('LspSagaFinderSelection', C.green, C.NONE, S.bold) + --Group.new('SagaShadow', C.base02) - Group.new('TelescopeMatching', colors.orange, groups.Special, groups.Special, groups.Special) - Group.new('TelescopeBorder', colors.base01) -- float border not quite dark enough, maybe that needs to change? - Group.new('TelescopePromptBorder', colors.cyan) -- active border lighter for clarity - Group.new('TelescopeTitle', groups.Normal) -- separate them from the border a little, but not make them pop - Group.new('TelescopePromptPrefix', groups.Normal) -- default is groups.Identifier - Group.link('TelescopeSelection', groups.CursorLine) - Group.new('TelescopeSelectionCaret', colors.cyan) + Group.new('TelescopeMatching', C.orange, G.Special, G.Special, G.Special) + Group.new('TelescopeBorder', C.base01) -- float border not quite dark enough, maybe that needs to change? + Group.new('TelescopePromptBorder', C.cyan) -- active border lighter for clarity + Group.new('TelescopeTitle', G.Normal) -- separate them from the border a little, but not make them pop + Group.new('TelescopePromptPrefix', G.Normal) -- default is G.Identifier + Group.link('TelescopeSelection', G.CursorLine) + Group.new('TelescopeSelectionCaret', C.cyan) - - Group.new('NeogitDiffAddHighlight', colors.blue, colors.red) - Group.new('NeogitDiffDeleteHighlight', colors.blue, colors.red) - Group.new('NeogitHunkHeader', groups.Normal, colors.base02) - Group.new('NeogitHunkHeaderHighlight', groups.Normal, colors.red) - Group.new('NeogitDiffContextHighlight', colors.base2, colors.base02) - Group.new('NeogitCommandText', groups.Normal) - Group.new('NeogitCommandTimeText', groups.Normal) - Group.new('NeogitCommandCodeNormal', groups.Normal) - Group.new('NeogitCommandCodeError', groups.Error) - Group.new('NeogitNotificationError', groups.Error, colors.none) - Group.new('NeogitNotificationInfo', groups.Information, colors.none) - Group.new('NeogitNotificationWarning', groups.Warning, colors.none) + Group.new('NeogitDiffAddHighlight', C.blue, C.red) + Group.new('NeogitDiffDeleteHighlight', C.blue, C.red) + Group.new('NeogitHunkHeader', G.Normal, C.base02) + Group.new('NeogitHunkHeaderHighlight', G.Normal, C.red) + Group.new('NeogitDiffContextHighlight', C.base2, C.base02) + Group.new('NeogitCommandText', G.Normal) + Group.new('NeogitCommandTimeText', G.Normal) + Group.new('NeogitCommandCodeNormal', G.Normal) + Group.new('NeogitCommandCodeError', G.Error) + Group.new('NeogitNotificationError', G.Error, C.NONE) + Group.new('NeogitNotificationInfo', G.Information, C.NONE) + Group.new('NeogitNotificationWarning', G.Warning, C.NONE) -- seblj/nvim-tabline - Group.new('TabLineSeparatorActive', colors.cyan) - Group.link('TabLineModifiedSeparatorActive', groups.TablineSeparatorActive) + Group.new('TabLineSeparatorActive', C.cyan) + Group.link('TabLineModifiedSeparatorActive', G.TablineSeparatorActive) -- kevinhwang91/nvim-bqf - Group.new('BqfPreviewBorder', colors.base01) - Group.new('BqfSign', colors.cyan) + Group.new('BqfPreviewBorder', C.base01) + Group.new('BqfSign', C.cyan) -- Primeagen/harpoon - Group.new("HarpoonBorder", colors.cyan) - Group.new("HarpoonWindow", groups.Normal) + Group.new("HarpoonBorder", C.cyan) + Group.new("HarpoonWindow", G.Normal) - Group.new("NvimTreeFolderIcon", colors.blue) + Group.new("NvimTreeFolderIcon", C.blue) -- phaazon/hop.nvim - Group.link('HopNextKey', groups.IncSearch) - Group.link('HopNextKey1', groups.IncSearch) - Group.link('HopNextKey2', groups.IncSearch) + Group.link('HopNextKey', G.IncSearch) + Group.link('HopNextKey1', G.IncSearch) + Group.link('HopNextKey2', G.IncSearch) function M.translate(group) - if fn.has("nvim-0.6.0") == 0 then return group end + if vim.fn.has("nvim-0.6.0") == 0 then return group end if not string.match(group, "^LspDiagnostics") then return group end @@ -300,19 +288,19 @@ M.setup = function() end local lspColors = { - Error = groups.Error, - Warning = groups.Warning, - Information = groups.Information, - Hint = groups.Hint, + Error = G.Error, + Warning = G.Warning, + Information = G.Information, + Hint = G.Hint, } for _, lsp in pairs({ "Error", "Warning", "Information", "Hint" }) do local lspGroup = Group.new(M.translate("LspDiagnosticsDefault" .. lsp), lspColors[lsp]) Group.link(M.translate("LspDiagnosticsVirtualText" .. lsp), lspGroup) - Group.new(M.translate("LspDiagnosticsUnderline" .. lsp), colors.none, colors.none, styles.undercurl, lspColors[lsp]) + Group.new(M.translate("LspDiagnosticsUnderline" .. lsp), C.NONE, C.NONE, S.undercurl, lspColors[lsp]) end for _, name in pairs({ "LspReferenceText", "LspReferenceRead", "LspReferenceWrite" }) do - Group.link(M.translate(name), groups.CursorLine) + Group.link(M.translate(name), G.CursorLine) end return M