summary refs log tree commit diff
path: root/.vim/lua/colors.lua.in
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2021-04-22 13:19:32 +0200
committerRobert Günzler <r@gnzler.io>2021-04-26 02:09:48 +0200
commit23050d0a3a958cd011cd2bc87aa8a6f546399af2 (patch)
tree841940ce746a0375b706cae810f4088839f3b0cb /.vim/lua/colors.lua.in
parentd3497269ec01f89178b784169bdc53cbd16aafa2 (diff)
vim: update
* adds colors
* neuron.nvim config
* etc.
Diffstat (limited to '.vim/lua/colors.lua.in')
-rw-r--r--.vim/lua/colors.lua.in298
1 files changed, 298 insertions, 0 deletions
diff --git a/.vim/lua/colors.lua.in b/.vim/lua/colors.lua.in
new file mode 100644
index 0000000..caafa52
--- /dev/null
+++ b/.vim/lua/colors.lua.in
@@ -0,0 +1,298 @@
+
+local lush = require('lush')
+local hsl = lush.hsl
+
+local palette = {
+	normal = {
+		black   = '{{ .normal_black }}',
+		red     = '{{ .normal_red }}',
+		green   = '{{ .normal_green }}',
+		yellow  = '{{ .normal_yellow }}',
+		blue    = '{{ .normal_blue }}',
+		magenta = '{{ .normal_magenta }}',
+		cyan    = '{{ .normal_cyan }}',
+		white   = '{{ .normal_white }}',
+	},
+	bright = {
+		black   = '{{ .bright_black }}',
+		red     = '{{ .bright_red }}',
+		green   = '{{ .bright_green }}',
+		yellow  = '{{ .bright_yellow }}',
+		blue    = '{{ .bright_blue }}',
+		magenta = '{{ .bright_magenta }}',
+		cyan    = '{{ .bright_cyan }}',
+		white   = '{{ .bright_white }}',
+	},
+	dim = {
+		black   = '{{ .dim_black }}',
+		red     = '{{ .dim_red }}',
+		green   = '{{ .dim_green }}',
+		yellow  = '{{ .dim_yellow }}',
+		blue    = '{{ .dim_blue }}',
+		magenta = '{{ .dim_magenta }}',
+		cyan    = '{{ .dim_cyan }}',
+		white   = '{{ .dim_white }}',
+	},
+}
+
+-- terminal buffer colors {{{
+-- TODO just let it use the default, for now...
+-- let g:terminal_color_0  = color00[0]
+-- let g:terminal_color_1  = color01[0]
+-- let g:terminal_color_2  = color02[0]
+-- let g:terminal_color_3  = color03[0]
+-- let g:terminal_color_4  = color04[0]
+-- let g:terminal_color_5  = color05[0]
+-- let g:terminal_color_6  = color06[0]
+-- let g:terminal_color_7  = color07[0]
+-- let g:terminal_color_8  = color08[0]
+-- let g:terminal_color_9  = color09[0]
+-- let g:terminal_color_10 = color10[0]
+-- let g:terminal_color_11 = color11[0]
+-- let g:terminal_color_12 = color12[0]
+-- let g:terminal_color_13 = color13[0]
+-- let g:terminal_color_14 = color14[0]
+-- let g:terminal_color_15 = color15[0]
+-- }}}
+
+return lush(function()
+	return {
+    Underlined { gui = 'underline' }, -- (preferred) text that stands out, HTML links
+    Bold       { gui = 'bold' },
+    Italic     { gui = 'italic' },
+    Reverse    { gui = 'reverse' },
+
+    ColorColumn  { bg = hsl(p.dim.white).darken(40) }, -- used for the columns set with 'colorcolumn'
+    -- Conceal      { }, -- placeholder characters substituted for concealed text (see 'conceallevel')
+    Cursor       { Reverse }, -- character under the cursor
+    lCursor      { Cursor }, -- the character under the cursor when |language-mapping| is used (see 'guicursor')
+    CursorIM     { Cursor }, -- like Cursor, but used when in IME mode |CursorIM|
+    CursorColumn { ColorColumn }, -- Screen-column at the cursor, when 'cursorcolumn' is set.
+    CursorLine   { ColorColumn }, -- Screen-line at the cursor, when 'cursorline' is set.  Low-priority if foreground (ctermfg OR guifg) is not set.
+    -- Directory    { }, -- directory names (and other special names in listings)
+    DiffAdd      { fg = hsl(p.bright.green) }, -- diff mode: Added line |diff.txt|
+    DiffChange   { fg = hsl(p.bright.cyan) }, -- diff mode: Changed line |diff.txt|
+    DiffDelete   { fg = hsl(p.bright.red) }, -- diff mode: Deleted line |diff.txt|
+    DiffText     { fg = hsl(p.normal.white) }, -- diff mode: Changed text within a changed line |diff.txt|
+    EndOfBuffer  { fg = hsl(p.bright.blue) }, -- filler lines (~) after the end of the buffer.  By default, this is highlighted like |hl-NonText|.
+    TermCursor   { Cursor }, -- cursor in a focused terminal
+    TermCursorNC { Cursor }, -- cursor in an unfocused terminal
+    ErrorMsg     { Bold, fg = hsl(p.bright.white), bg = hsl(p.dim.red) }, -- error messages on the command line
+    VertSplit    { fg = hsl(p.dim.magenta), bg = 'none' }, -- the column separating vertically split windows
+    Folded       { fg = hsl(p.bright.magenta), bg = 'none' }, -- line used for closed folds
+    FoldColumn   { Folded }, -- 'foldcolumn'
+    SignColumn   { gui = 'none' }, -- column where |signs| are displayed
+    Search       { Bold, fg = hsl(p.normal.black), bg = hsl(p.bright.white) }, -- Last search pattern highlighting (see 'hlsearch').  Also used for similar items that need to stand out.
+    IncSearch    { Search }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c"
+    Substitute   { fg = hsl(p.normal.blue) }, -- |:substitute| replacement text highlighting
+    LineNr       { fg = hsl(p.dim.white) }, -- Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set.
+    CursorLineNr { Cursor }, -- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line.
+    MatchParen   { fg = hsl(p.bright.white), bg = hsl(p.dim.black) }, -- The character under the cursor or just before it, if it is a paired bracket, and its match. |pi_paren.txt|
+    ModeMsg      { fg = hsl(p.normal.yellow) }, -- 'showmode' message (e.g., "-- INSERT -- ")
+    -- MsgArea      { }, -- Area for messages and cmdline
+    -- MsgSeparator { }, -- Separator for scrolled messages, `msgsep` flag of 'display'
+    -- MoreMsg      { }, -- |more-prompt|
+    NonText      { EndOfBuffer }, -- '@' 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 = hsl(p.bright.white) }, -- normal text
+    NormalFloat  { Normal }, -- Normal text in floating windows.
+    NormalNC     { Normal }, -- normal text in non-current windows
+    Pmenu        { fg = hsl(p.bright.yellow), bg = hsl(p.normal.black) }, -- Popup menu: normal item.
+    PmenuSel     { Pmenu, gui = 'reverse' }, -- Popup menu: selected item.
+    PmenuSbar    { bg = 'none' }, -- Popup menu: scrollbar.
+    PmenuThumb   { bg = hsl(p.bright.white) }, -- Popup menu: Thumb of the scrollbar.
+    -- 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.
+    -- 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.  SpellCap  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.
+    -- SpellRare    { }, -- Word that is recognized by the spellchecker as one that is hardly ever used.  |spell| Combined with the highlighting used otherwise.
+    StatusLine   { fg = hsl(p.normal.white), bg = hsl(p.normal.black) }, -- status line of current window
+    StatusLineNC { fg = hsl(p.dim.white) }, -- 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      { StatusLine }, -- tab pages line, not active tab page label
+    TabLineFill  { gui = 'none' }, -- tab pages line, where there are no labels
+    -- TabLineSel   { }, -- tab pages line, active tab page label
+    -- Title        { }, -- titles for output from ":set all", ":autocmd" etc.
+    Visual       { fg = hsl(p.bright.white), bg = hsl(p.normal.magenta) }, -- Visual mode selection
+    VisualNOS    { Visual }, -- Visual mode selection when vim is "Not Owning the Selection".
+    WarningMsg   { fg = hsl(p.normal.yellow) }, -- warning messages
+    Whitespace   { fg = hsl(p.dim.white) }, -- "nbsp", "space", "tab" and "trail" in 'listchars'
+    WildMenu     { bg = hsl(p.bright.black) }, -- current match in 'wildmenu' completion
+
+    Constant       { fg = hsl(p.bright.yellow).darken(50) }, -- (preferred) any constant
+    String         { fg = hsl(p.normal.yellow) }, --   a string constant: "this is a string"
+    Character      { String }, --  a character constant: 'c', '\n'
+    Number         { fg = hsl(p.normal.cyan) }, --   a number constant: 234, 0xff
+    Float          { Number }, --    a floating point constant: 2.3e10
+    Boolean        { Number }, --  a boolean constant: TRUE, false
+
+    Identifier     { fg = hsl(p.bright.magenta) }, -- (preferred) any variable name
+    Function       { Identifier }, -- function name (also: methods for classes)
+    Comment        { Italic, fg = hsl(p.dim.white).lighten(30) },
+
+    Statement      { fg = hsl(p.normal.green) }, -- (preferred) any statement
+    Keyword        { fg = hsl(p.bright.blue) }, --  any other keyword
+    Conditional    { Keyword }, --  if, then, else, endif, switch, etc.
+    Repeat         { Keyword }, --   for, do, while, etc.
+    Label          { Keyword }, --    case, default, etc.
+    Operator       { Keyword }, -- "sizeof", "+", "*", etc.
+    Exception      { Keyword }, --  try, catch, throw
+
+    PreProc        { fg = hsl(p.normal.cyan) }, -- (preferred) generic Preprocessor
+    Include        { PreProc }, --  preprocessor #include
+    Define         { PreProc }, --   preprocessor #define
+    Macro          { PreProc }, --    same as Define
+    PreCondit      { PreProc }, --  preprocessor #if, #else, #endif, etc.
+
+    Type           { fg = hsl(p.bright.green) }, -- (preferred) int, long, char, etc.
+    StorageClass   { Type }, -- static, register, volatile, etc.
+    Structure      { Type }, --  struct, union, enum, etc.
+    Typedef        { Type }, --  A typedef
+
+    Special        { fg = hsl(p.normal.yellow) }, -- (preferred) any special symbol
+    SpecialChar    { Special }, --  special character in a constant
+    Tag            { Special }, --    you can use CTRL-] on this
+    Delimiter      { Special }, --  character that needs attention
+    SpecialComment { Special }, -- special things inside a comment
+    Debug          { Special }, --    debugging statements
+
+    -- Ignore         { }, -- (preferred) left blank, hidden  |hl-Ignore|
+    Error          { Bold, fg = hsl(p.normal.red) }, -- (preferred) any erroneous construct
+    Todo           { Italic, fg = hsl(p.normal.black), bg = hsl(p.bright.yellow) }, -- (preferred) anything that needs extra attention; mostly the keywords TODO FIXME and XXX
+
+    -- Lang specific {{{
+    -- C
+    cType { Type, gui = 'bold' },
+    -- cFormat {},
+    -- cStorageClass { Bold },
+
+    cBoolean { Boolean, gui = 'bold' },
+    -- cCharacter {},
+    cConstant { Constant, gui = 'bold' },
+    -- cConditional { Bold },
+    cSpecial { Bold },
+    -- cDefine {},
+    -- cNumber {},
+    -- cPreCondit {},
+    -- cRepeat {},
+    -- cLabel { fg = hsl(p.dim.black), bg = hsl(p.dim.red) },
+    -- cAnsiFunction { Bold },
+    -- cAnsiName {},
+    -- cDelimiter {},
+    -- cBraces {},
+    -- cIdentifier {},
+    -- cSemiColon {},
+    -- cOperator {},
+    -- cStatement {},
+    -- cTodo { Bold },
+    cStructure { Bold },
+    -- cCustomParen {},
+    -- cCustomFunc {},
+    -- cUserFunction { Function, gui = 'bold' },
+    -- cOctalZero { Bold },
+    -- cFunction {},
+    -- }}}
+
+    -- LSP {{{
+    LspDiagnosticsError                  { Error }, -- used for "Error" diagnostics
+    LspDiagnosticsFloatingError          { LspDiagnosticsError },
+    LspDiagnosticsVirtualTextError       { fg = LspDiagnosticsError.fg.darken(40) },
+    LspDiagnosticsSignError              { LspDiagnosticsError },
+
+    LspDiagnosticsWarning                { WarningMsg }, -- used for "Warning" diagnostics
+    LspDiagnosticsFloatingWarning        { LspDiagnosticsWarning },
+    LspDiagnosticsVirtualTextWarning     { fg = LspDiagnosticsWarning.fg.darken(60) },
+    LspDiagnosticsSignWarning            { LspDiagnosticsWarning },
+
+    LspDiagnosticsInformation            { fg = hsl(p.normal.blue).lighten(20) }, -- used for "Information" diagnostics
+    LspDiagnosticsFloatingInformation    { LspDiagnosticsInformation },
+    LspDiagnosticsVirtualTextInformation { fg = LspDiagnosticsInformation.fg.darken(30) },
+    LspDiagnosticsSignInformation        { LspDiagnosticsInformation },
+
+    LspDiagnosticsHint                   { fg = hsl(p.normal.green) }, -- used for "Hint" diagnostics
+    LspDiagnosticsFloatingHint           { LspDiagnosticsHint },
+    LspDiagnosticsVirtualTextHint        { fg = LspDiagnosticsHint.fg.darken(40) },
+    LspDiagnosticsSignHint               { LspDiagnosticsHint },
+
+    -- LspReferenceText                  { }, -- used for highlighting "text" references
+    -- LspReferenceRead                  { }, -- used for highlighting "read" references
+    -- LspReferenceWrite                 { }, -- used for highlighting "write" references
+    -- }}}
+
+    -- TreeSitter {{{
+    -- TSError              { }, -- For syntax/parser errors.
+    -- TSPunctDelimiter     { }, -- For delimiters ie: `.`
+    -- TSPunctBracket       { }, -- For brackets and parens.
+    -- TSPunctSpecial       { }, -- For special punctutation that does not fall in the catagories before.
+    -- 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.
+    -- TSString             { }, -- For strings.
+    -- TSStringRegex        { }, -- For regexes.
+    -- TSStringEscape       { }, -- For escape characters within a string.
+    -- TSCharacter          { }, -- For characters.
+    -- TSNumber             { }, -- For integers.
+    -- TSBoolean            { }, -- For booleans.
+    -- 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.
+    -- TSParameter          { }, -- For parameters of a function.
+    -- TSParameterReference { }, -- For references to parameters of a function.
+    -- TSMethod             { }, -- For method calls and definitions.
+    -- TSField              { }, -- For fields.
+    -- TSProperty           { }, -- Same as `TSField`.
+    -- TSConstructor        { }, -- For constructor calls and definitions: `{ }` in Lua, and Java constructors.
+    -- TSConditional        { }, -- For keywords related to conditionnals.
+    -- TSRepeat             { }, -- For keywords related to loops.
+    -- TSLabel              { }, -- For labels: `label:` in C and `:label:` in Lua.
+    -- TSOperator           { }, -- For any operator: `+`, but also `->` and `*` in C.
+    -- TSKeyword            { }, -- For keywords that don't fall in previous categories.
+    -- TSKeywordFunction    { }, -- For keywords used to define a fuction.
+    -- TSException          { }, -- For exception related keywords.
+    -- TSType               { }, -- For types.
+    -- TSTypeBuiltin        { }, -- For builtin types (you guessed it, right ?).
+    -- TSNamespace          { }, -- For identifiers referring to modules and namespaces.
+    -- TSInclude            { }, -- For includes: `#include` in C, `use` or `extern crate` in Rust, or `require` in Lua.
+    -- TSAnnotation         { }, -- For C++/Dart attributes, annotations that can be attached to the code to denote some kind of meta information.
+    -- TSText               { }, -- For strings considered text in a markup language.
+    -- TSStrong             { }, -- For text to be represented with strong.
+    -- TSEmphasis           { }, -- For text to be represented with emphasis.
+    -- TSUnderline          { }, -- For text to be represented with an underline.
+    -- TSTitle              { }, -- Text that is part of a title.
+    -- TSLiteral            { }, -- Literal text.
+    -- TSURI                { }, -- Any URI like a link or email.
+    -- TSVariable           { }, -- Any variable name that does not have another highlight.
+    -- TSVariableBuiltin    { }, -- Variable names that are defined by the languages, like `this` or `self`.
+    -- }}}
+
+    -- Plugin configs {{{
+    IndentGuidesOdd { bg = hsl(p.bright.black) },
+    IndentGuidesEven { bg = hsl(p.dim.white).darken(40) },
+
+    SignifyLineChange { DiffChange },
+    SignifySignChange { SignifyLineChange },
+    SignifyLineAdd { DiffAdd },
+    SignifySignAdd { SignifyLineAdd },
+    SignifyLineDelete { DiffDelete },
+    SignifySignDelete { SignifyLineDelete },
+
+    -- git
+    gitcommitSummary { Bold },
+    -- gitcommitHeader { Bold },
+    -- gitcommitSelectedType {},
+    -- gitcommitSelectedFile {},
+    -- gitcommitUntrackedFile {},
+    -- gitcommitBranch {},
+    -- gitcommitDiscardedType {},
+    gitcommitDiff { fg = hsl(p.dim.white) },
+    diffFile { fg = hsl(p.bright.yellow) },
+    diffSubname { diffFile },
+    diffIndexLine { diffFile },
+    diffAdded { DiffAdd },
+    diffRemoved { DiffDelete },
+    -- diffLine {},
+    -- diffBDiffer {},
+    -- diffNewFile {},
+    -- }}}
+	}
+end)
+
+-- vi:nowrap