diff --git a/.stylua.toml b/.stylua.toml new file mode 100644 index 0000000..aacbe38 --- /dev/null +++ b/.stylua.toml @@ -0,0 +1,12 @@ +call_parentheses = "Always" +collapse_simple_statement = "Never" +column_width = 100 +indent_type = "Spaces" +indent_width = 2 +line_endings = "Unix" +quote_style = "AutoPreferDouble" +space_after_function_names = "Never" +syntax = 'LuaJIT' + +[sort_requires] +enabled = false diff --git a/colors/embark.lua b/colors/embark.lua new file mode 100644 index 0000000..d3f7b6b --- /dev/null +++ b/colors/embark.lua @@ -0,0 +1,2 @@ +require("embark.colors").setup() +-- vim:ts=2:sts=2:sw=2:et diff --git a/colors/embark.vim b/colors/embark.vim deleted file mode 100644 index 0a88360..0000000 --- a/colors/embark.vim +++ /dev/null @@ -1,622 +0,0 @@ -" Vim Color File -" Name: embark.vim -" Based On: Challenger Deep, Ayu Mirage, and Manta - -" == PRELUDE == -" -" Setup and configuration -hi clear - -if exists('syntax on') - syntax reset -endif - -let g:colors_name='embark' -set background=dark - -if !exists("g:embark_terminal_italics") - let g:embark_terminal_italics = 0 -endif - -if !exists("g:embark_terminalcolors") - let g:embark_termcolors = 256 -endif - -" == COLOR PALETTE == -" -" TODO: Cterm values here are OG from Challenger Deep - -" Space -let s:space0 = { "gui": "#100E23", "cterm": "232", "cterm16": "0"} -let s:space1 = { "gui": "#1e1c31", "cterm": "233", "cterm16": "NONE"} -let s:space2 = { "gui": "#2F2A47", "cterm": "233", "cterm16": "NONE" } -let s:space3 = { "gui": "#3E3859", "cterm": "236", "cterm16": "8"} -let s:space4 = { "gui": "#585273", "cterm": "236", "cterm16": "8"} - -" Astral -let s:astral0 = {"gui": "#8A889D", "cterm": "252", "cterm16": "15"} -let s:astral1 = { "gui": "#cbe3e7", "cterm": "253", "cterm16": "7"} - -" Nebula -let s:red = { "gui": "#F48FB1", "cterm": "204", "cterm16": "1"} -let s:dark_red = { "gui": "#F02E6E", "cterm": "203", "cterm16": "9"} - -let s:green = { "gui": "#A1EFD3", "cterm": "120", "cterm16": "2"} -let s:dark_green = { "gui": "#7fe9c3", "cterm": "119", "cterm16": "10"} - -let s:yellow = { "gui": "#ffe6b3", "cterm": "228", "cterm16": "3"} -let s:dark_yellow = { "gui": "#F2B482", "cterm": "215", "cterm16": "11"} - -let s:blue = { "gui": "#91ddff", "cterm": "159", "cterm16": "4"} -let s:dark_blue = { "gui": "#78a8ff", "cterm": "135", "cterm16": "13"} - -let s:purple = { "gui": "#d4bfff", "cterm": "141", "cterm16": "5"} -let s:dark_purple = { "gui": "#7676ff", "cterm": "75", "cterm16": "12"} - -let s:cyan = { "gui": "#ABF8F7", "cterm": "122", "cterm16": "6"} -let s:dark_cyan = { "gui": "#63f2f1", "cterm": "121", "cterm16": "14"} - -let s:bg = s:space1 -let s:bg_dark = s:space0 -let s:bg_bright = s:space4 -let s:norm = s:astral1 -let s:norm_subtle = s:astral0 -let s:visual = s:space3 - -let s:head_a = s:dark_blue -let s:head_b = s:blue -let s:head_c = s:dark_cyan - -let s:diff_del = { "gui": "#5E3859", "cterm": "203", "cterm16": "9"} -let s:diff_add = { "gui": "#2D5059", "cterm": "119", "cterm16": "10"} -let s:diff_changed = { "gui": "#38325A", "cterm": "215", "cterm16": "11"} - -" == UTILS AND HELPERS == -" -" shamelessly stolen from hemisu: https://github.com/noahfrederick/vim-hemisu/ -function! s:h(group, style) - " Not all terminals support italics properly. If yours does, opt-in. - if g:embark_termcolors == 16 - let l:ctermfg = (has_key(a:style, "fg") ? a:style.fg.cterm16 : "NONE") - let l:ctermbg = (has_key(a:style, "bg") ? a:style.bg.cterm16 : "NONE") - else - let l:ctermfg = (has_key(a:style, "fg") ? a:style.fg.cterm : "NONE") - let l:ctermbg = (has_key(a:style, "bg") ? a:style.bg.cterm : "NONE") - end - execute "highlight" a:group - \ "guifg=" (has_key(a:style, "fg") ? a:style.fg.gui : "NONE") - \ "guibg=" (has_key(a:style, "bg") ? a:style.bg.gui : "NONE") - \ "guisp=" (has_key(a:style, "sp") ? a:style.sp.gui : "NONE") - \ "gui=" (has_key(a:style, "gui") ? a:style.gui : "NONE") - \ "ctermfg=" . l:ctermfg - \ "ctermbg=" . l:ctermbg - \ "cterm=" (has_key(a:style, "cterm") ? a:style.cterm : "NONE") -endfunction - -function! s:maybe_italic(style) - " Are italics turned on - if g:embark_terminal_italics == 1 - " if there are other styles than italics concat - if empty(a:style) - return "italic" - else - return a:style . ",italic" - endif - else - " If the only style would have been italics set to none - if empty(a:style) - return "NONE" - else - " Otherwise return other styles - return a:style - endif - endif - -endfunction - -" == COMMON GROUPS == -" Generated with `:help E669` -" -" Nested descriptions fallback to parent rule -call s:h("Comment", {"fg": s:norm_subtle, "gui": s:maybe_italic(""), "cterm": s:maybe_italic("")}) - -" * Constant any constant -call s:h("Constant", {"fg": s:purple}) -" String a string constant: "this is a string" -call s:h("String", {"fg": s:yellow}) -" Character a character constant: 'c', '\n' -" Number a number constant: 234, 0xff -call s:h("Number", {"fg": s:dark_yellow}) -" Boolean a boolean constant: TRUE, false -call s:h("Boolean", {"fg": s:dark_yellow}) -" Float a floating point constant: 2.3e10 -call s:h("Float", {"fg": s:dark_yellow}) - -" * Identifier any variable name -call s:h("Identifier", {"fg": s:norm}) -" Function function name (also: methods for classes) -call s:h("Function", {"fg": s:red}) - -" * Statement - any statement -call s:h("Statement", {"fg": s:green}) -" Conditional if, then, else, endif, switch, etc. -" Repeat for, do, while, etc. -" Label case, default, etc. -call s:h("Label", {"fg": s:dark_blue}) -" Operator "sizeof", "+", "*", etc. -call s:h("Operator", {"fg": s:dark_cyan}) -" Keyword any other keyword -call s:h("Keyword", {"fg": s:green}) -" Exception try, catch, throw - -" * PreProc generic Preprocessor -call s:h("PreProc", {"fg": s:green}) -" Include preprocessor #include -" Define preprocessor #define -" Macro same as Define -" PreCondit preprocessor #if, #else, #endif, etc. - -" * Type int, long, char, etc. -call s:h("Type", {"fg": s:purple}) -" StorageClass static, register, volatile, etc. -" Structure struct, union, enum, etc. -" Typedef A typedef - -" * Special any special symbol -call s:h("Special", {"fg": s:cyan}) -" 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 text that stands out, HTML links -call s:h("Underlined", {"fg": s:norm, "gui": "underline", "cterm": "underline"}) - -" * Ignore left blank, hidden |hl-Ignore| -call s:h("Ignore", {"fg": s:bg}) - -" * Error any erroneous construct -call s:h("Error", {"fg": s:dark_red, "bg": s:bg_dark , "gui": "bold", "cterm": "bold"}) - -" * Todo anything that needs extra attention; mostly the -" keywords TODO FIXME and XXX -call s:h("Todo", {"fg": s:dark_yellow, "bg": s:bg, "gui": "bold", "cterm": "bold"}) - - -" == UI CHROME == -" Generated with `:help highlight-default` -" -" ColorColumn - Used for the columns set with 'colorcolumn'. -call s:h("ColorColumn", {"bg": s:space2}) -" Conceal - Placeholder characters substituted for concealed -call s:h("Conceal", {"fg": s:norm}) -" Cursor - Character under the cursor. -call s:h("Cursor", {"bg": s:blue, "fg": s:bg_bright}) -" CursorColumn - Screen-column at the cursor, when 'cursorcolumn' is set. -call s:h("CursorColumn", {"bg": s:bg_dark}) -" CursorLine - Screen-line at the cursor, when 'cursorline' is set. -call s:h("CursorLine", {"bg": s:bg_dark}) -" Directory -Directory names (and other special names in listings). -call s:h("Directory", {"fg": s:purple}) -" DiffAdd - Diff mode: Added line. |diff.txt| -call s:h("DiffAdd", {"bg": s:diff_add}) -" DiffChange - Diff mode: Changed line. |diff.txt| -call s:h("DiffChange", {"bg": s:diff_changed}) -" DiffDelete - Diff mode: Deleted line. |diff.txt| -call s:h("DiffDelete", {"fg": s:visual, "bg": s:diff_del}) -" DiffText - Diff mode: Changed text within a changed line. |diff.txt| -call s:h("DiffText", {"bg": s:diff_changed, "gui": "underline", "sp": s:dark_blue }) -" EndOfBuffer Filler lines (~) after the end of the buffer. -" ErrorMsg - Error messages on the command line. -call s:h("ErrorMsg", {"fg": s:dark_red}) -" WinSeparator - Separators between window splits. -call s:h("WinSeparator", {"fg": s:space3}) -" Folded - Line used for closed folds. -call s:h("Folded", {"fg": s:purple, "bg": s:space2}) -" FoldColumn - 'foldcolumn' -call s:h("FoldColumn", {"fg": s:dark_purple}) -" SignColumn - Column where |signs| are displayed. -call s:h("SignColumn", {"fg": s:green}) -" IncSearch - 'incsearch' highlighting; also used for the text replaced with -call s:h("IncSearch", {"bg": s:yellow, "fg": s:bg}) -" Substitute - |:substitute| replacement text highlighting. -" LineNr -Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set. -call s:h("LineNr", {"fg": s:space4}) -" CursorLineNr - Like LineNr when 'cursorline' is set and 'cursorlineopt' -call s:h("CursorLineNr", {"bg": s:bg_dark, "fg": s:blue, "gui": "bold"}) -" CursorLineFold - Like FoldColumn when 'cursorline' is set for the cursor line. -" MatchParen - Character under the cursor or just before it, if it -call s:h("MatchParen", {"bg": s:bg_dark, "fg": s:purple, "gui": "bold", "cterm": "bold"}) -" ModeMsg - 'showmode' message (e.g., "-- INSERT --"). -call s:h("ModeMsg", {"fg": s:norm_subtle, "gui": "bold", "cterm": "bold"}) -" MsgArea - Area for messages and cmdline. -" MoreMsg - |more-prompt| -hi! link MoreMsg ModeMsg -" NonText - '@' at the end of the window, characters from 'showbreak' -call s:h("NonText", {"fg": s:bg_bright}) -" Normal - Normal text. -call s:h("Normal", {"bg": s:bg, "fg": s:norm}) -" Pmenu - Popup menu: Normal item. -call s:h("Pmenu", {"fg": s:norm, "bg": s:space2}) -" NormalFloat - Normal text in floating windows. -hi! link NormalFloat Pmenu -" PmenuSel - Popup menu: Selected item. -call s:h("PmenuSel", {"fg": s:purple, "bg": s:bg}) -" PmenuSbar - Popup menu: Scrollbar. -call s:h("PmenuSbar", {"fg": s:norm, "bg": s:bg_dark}) -" PmenuThumb - Popup menu: Thumb of the scrollbar. -call s:h("PmenuThumb", {"fg": s:norm, "bg": s:bg_dark}) -" Question - |hit-enter| prompt and yes/no questions. -call s:h("Question", {"fg": s:green}) -" QuickFixLine - Current |quickfix| item in the quickfix window. Combined with -" Search - Last search pattern highlighting (see 'hlsearch'). -call s:h("Search", {"bg": s:dark_yellow, "fg": s:bg}) -" SpecialKey - Unprintable chars: Text displayed differently from what it is -call s:h("SpecialKey", {"fg": s:blue}) -" SpellBad Word that is not recognized by the spellchecker. |spell| -if has("gui_running") -" SpellBad Word that is not recognized by the spellchecker. |spell| - call s:h("SpellBad", {"gui": "underline", "sp": s:dark_red}) -" SpellCap - Word that should start with a capital. |spell| - call s:h("SpellCap", {"gui": "underline", "sp": s:green}) -" SpellLocal - Word that is recognized by the spellchecker as one that is - call s:h("SpellLocal", {"gui": "underline", "sp": s:dark_green}) -" SpellRare - Word that is recognized by the spellchecker as one that is - call s:h("SpellRare", {"gui": "underline", "sp": s:red}) -else -" SpellBad Word that is not recognized by the spellchecker. |spell| - call s:h("SpellBad", {"cterm": "underline", "fg": s:dark_red}) -" SpellCap - Word that should start with a capital. |spell| - call s:h("SpellCap", {"cterm": "underline", "fg": s:green}) -" SpellLocal - Word that is recognized by the spellchecker as one that is - call s:h("SpellLocal", {"cterm": "underline", "fg": s:dark_green}) -" SpellRare - Word that is recognized by the spellchecker as one that is - call s:h("SpellRare", {"cterm": "underline", "fg": s:red}) -" SpellLocal - Word that is recognized by the spellchecker as one that is - call s:h("SpellLocal", {"gui": "underline", "sp": s:dark_green}) -endif -" StatusLine - Status line of current window. -call s:h("StatusLine", {"bg": s:bg, "fg": s:norm}) -" StatusLineNC - Status lines of not-current windows. -call s:h("StatusLineNC", {"bg": s:bg}) -" TabLine - Tab pages line, not active tab page label. -call s:h("TabLine", {"fg": s:norm_subtle, "bg": s:bg}) -" TabLineFill - Tab pages line, where there are no labels. -call s:h("TabLineFill", {"fg": s:norm_subtle, "bg": s:bg}) -" TabLineSel Tab pages line, active tab page label. -call s:h("TabLineSel", {"fg": s:norm, "bg": s:visual, "gui": "bold", "cterm": "bold"}) -" Title - Titles for output from ":set all", ":autocmd" etc. -call s:h("Title", {"fg": s:dark_blue}) -" Visual - Visual mode selection. -call s:h("Visual", {"bg": s:visual}) -" VisualNOS - Visual mode selection when vim is "Not Owning the Selection". -" WarningMsg - Warning messages. -call s:h("WarningMsg", {"fg": s:yellow}) -" Whitespace - "nbsp", "space", "tab", "multispace", "lead" and "trail" -" WildMenu - Current match in 'wildmenu' completion. -call s:h("WildMenu", {"fg": s:bg_dark, "bg": s:cyan}) -" WinBar - Window bar of current window. -" WinBarNC - Window bar of not-current windows. - -if has('nvim') - " Neovim Diagnostics - " SEVERITY - Info, Warn, Error, Hint - " TYPE - Sign, Underline, Float, Virtual Text - " - " Highlights - " Diagnostic[SEVERITY] - " Diagnostic[TYPE][SEVERITY] - " - " Default Diagnostic highlights - " Dark background for virtual text - call s:h("DiagnosticHint", { "fg": s:purple, "bg": s:bg_dark }) - call s:h("DiagnosticInfo", { "fg": s:blue, "bg": s:bg_dark }) - call s:h("DiagnosticWarn", { "fg": s:yellow, "bg": s:bg_dark }) - call s:h("DiagnosticError", { "fg": s:red, "bg": s:bg_dark }) - " For signs and floating menus drop the dark background - call s:h("DiagnosticSignHint", { "fg": s:purple }) - call s:h("DiagnosticSignWarn", { "fg": s:yellow }) - call s:h("DiagnosticSignInfo", { "fg": s:blue }) - call s:h("DiagnosticSignError", { "fg": s:red }) - hi link DiagnosticFloatingHint DiagnosticSignHint - hi link DiagnosticFloatingInfo DiagnosticSignInfo - hi link DiagnosticFloatingWarn DiagnosticSignWarn - hi link DiagnosticFloatingError DiagnosticSignError - call s:h("DiagnosticUnderlineHint", {"cterm": "underline", "gui": "underline", "sp": s:purple}) - call s:h("DiagnosticUnderlineInfo", {"cterm": "underline", "gui": "underline", "sp": s:blue}) - call s:h("DiagnosticUnderlineWarn", {"cterm": "underline", "gui": "underline", "sp": s:yellow}) - call s:h("DiagnosticUnderlineError", {"cterm": "underline", "gui": "underline", "sp": s:red}) - - " Telescope support - call s:h("TelescopeNormal", {"fg": s:astral0}) - hi link TelescopeBorder LineNr - call s:h("TelescopeSelectionCaret", {"bg": s:visual, "fg": s:green}) - call s:h("TelescopeSelection", {"bg": s:visual, "fg": s:astral1}) - hi link TelescopeMatching String - call s:h("TelescopePreviewTitle", {"fg": s:space0, "bg": s:purple}) - call s:h("TelescopePromptTitle", {"fg": s:space0, "bg": s:green}) - hi link TelescopePromptNormal Normal - call s:h("TelescopeResultsTitle", {"fg": s:space0, "bg": s:blue}) - hi link TelescopePromptPrefix Type - hi link TelescopeResultsDiffAdd GitGutterAdd - hi link TelescopeResultsDiffChange GitGutterChange - hi link TelescopeResultsDiffDelete GitGutterDelete - hi link TelescopeResultsDiffUntracked Title - - " Nvim-tree support - call s:h("NvimTreeFolderIcon", {"fg": s:purple}) - call s:h("NvimTreeFolderName", {"fg": s:blue}) - call s:h("NvimTreeRootFolder", {"fg": s:green}) - - " nvim-cmp support - hi link CmpItemMenu Comment - call s:h("CmpItemKindDefault", {"fg": s:purple}) - hi link CmpItemAbbrMatch Pmenu - hi link CmpItemKindDefault Pmenu - hi link CmpItemKindFunction Function - hi link CmpItemKindMethod CmpItemKindFunction - hi link CmpItemKindModule PreProc - hi link CmpItemKindStruct CmpItemKindModule - hi link CmpItemKindText Comment - hi link CmpItemKindSnippet Constant - hi! link CmpItemKindReference CmpItemKindDefault - hi! link CmpItemKindInterface CmpItemKindDefault - - " Leap/Flash support - call s:h("LeapLabelPrimary", {"fg": s:bg_dark, "bg": s:dark_cyan, "gui": "bold"}) - call s:h("LeapLabelSecondary", {"fg": s:bg_dark, "bg": s:purple}) - hi! link FlashLabel LeapLabelPrimary - - " nvim notify support - call s:h("NotifyERRORBorder", {"fg": s:red}) - hi! link NotifyERRORTitle NotifyERRORBorder - hi! link NotifyERRORIcon NotifyERRORBorder - - call s:h("NotifyWARNBorder", {"fg": s:yellow}) - hi! link NotifyWARNTitle NotifyWARNBorder - hi! link NotifyWARNIcon NotifyWARNTitle - - call s:h("NotifyINFOBorder", {"fg": s:green}) - hi! link NotifyINFOTitle NotifyInfoBorder - hi! link NotifyINFOIcon NotifyInfoBorder - hi! link NotifyINFOBODY NotifyInfoBorder - - call s:h("NotifyDEBUGBorder", {"fg": s:blue}) - hi! link NotifyDEBUGTitle NotifyDEBUGBorder - hi! link NotifyDEBUGIcon NotifyDEBUGIcon - - call s:h("NotifyTRACEBorder", {"fg": s:purple}) - hi! link NotifyTRACETitle NotifyTRACEBorder - hi! link NotifyTRACEIcon NotifyTRACEBorder - - " Which Key - call s:h("WhichKey", {"fg": s:blue}) - call s:h("WhichKeyDesc", {"fg": s:astral1}) - call s:h("WhichKeyGroup", {"fg": s:purple}) - - " Neotree - call s:h("NeoTreeGitUntracked", {"fg": s:astral0, "gui": s:maybe_italic("bold")}) - call s:h("NeoTreeGitUnStaged", {"fg": s:dark_cyan}) - - " Render Markdown - call s:h("RenderMarkdownH1Bg", {"fg": s:dark_purple, "gui": "underline,bold"}) - call s:h("RenderMarkdownH2Bg", {"fg": s:dark_blue, "gui": "underline,bold"}) - call s:h("RenderMarkdownH3Bg", {"fg": s:dark_cyan, "gui": "underline,bold"}) - call s:h("RenderMarkdownH4Bg", {"fg": s:green, "gui": "underline,bold"}) - call s:h("RenderMarkdownH5Bg", {"fg": s:yellow, "gui": "underline,bold"}) - call s:h("RenderMarkdownH6Bg", {"fg": s:yellow, "gui": "underline,bold"}) - - if has('nvim-0.8') - " Treesitter support - call s:h("@keyword.operator", {"fg": s:cyan}) - hi! link @constant.builtin Special - call s:h("@punctuation.bracket", {"fg": s:cyan}) - call s:h("@variable.builtin", {"fg": s:cyan}) - - call s:h("@string.special", {"fg": s:dark_blue}) - call s:h("@string.escape", {"fg": s:cyan}) - call s:h("@string.special.symbol", {"fg": s:yellow}) - - call s:h("@module", {"fg": s:purple }) - call s:h("@function", {"fg": s:red}) - call s:h("@function.call", {"fg": s:blue}) - call s:h("@constructor", {"fg": s:purple}) - - hi! link @markup.heading Title - call s:h("@markup.raw", {"fg": s:cyan}) - call s:h("@markup.link.uri", {"fg": s:blue}) - call s:h("@markup.link", {"fg": s:purple}) - call s:h("@markup.strong", {"gui": "bold"}) - call s:h("@markup.emphasis", {"gui": s:maybe_italic("")}) - call s:h("@markup.list.unchecked", {"fg": s:dark_cyan, "gui": "bold"}) - call s:h("@markup.list.checked", {"fg": s:norm_subtle}) - - hi! link @tag Keyword - hi! link @tag.delimiter Special - hi! link @tag.attribute Constant - - " Deprecated nvim-treesitter highlights - " Will remove in a few months - call s:h("@symbol", {"fg": s:yellow}) - call s:h("@text.literal", {"fg": s:cyan}) - call s:h("@text.uri", {"fg": s:blue}) - call s:h("@text.reference", {"fg": s:purple}) - call s:h("@text.strong", {"gui": "bold"}) - call s:h("@text.emphasis", {"gui": s:maybe_italic("")}) - call s:h("@text.todo.unchecked", {"fg": s:dark_cyan, "gui": "bold"}) - call s:h("@text.todo.checked", {"fg": s:norm_subtle}) - endif -endif - -" == PLUGIN SUPPORT GROUPS == -" -" vim-sneak -hi link Sneak Search - -" HTML syntax -hi! link htmlTag Special -hi! link htmlEndTag htmlTag - -hi! link htmlTagName KeyWord -" html5 tags show up as htmlTagN -hi! link htmlTagN Keyword - -" HTML content -call s:h("htmlH1", {"fg": s:head_a, "gui": s:maybe_italic("bold"), "cterm": "bold" }) -call s:h("htmlH2", {"fg": s:head_a, "gui": "bold" , "cterm": "bold" }) -call s:h("htmlH3", {"fg": s:head_b, "gui": s:maybe_italic("") , "cterm": s:maybe_italic("") }) -call s:h("htmlH4", {"fg": s:head_b, "gui": s:maybe_italic("") , "cterm": s:maybe_italic("") }) -call s:h("htmlH5", {"fg": s:head_c }) -call s:h("htmlH6", {"fg": s:head_c }) -call s:h("htmlLink", {"fg": s:blue , "gui": "underline" , "cterm": "underline"}) -call s:h("htmlItalic", { "gui": s:maybe_italic("") , "cterm": s:maybe_italic("") }) -call s:h("htmlBold", { "gui": "bold" , "cterm": "bold" }) -call s:h("htmlBoldItalic",{ "gui": s:maybe_italic("bold"), "cterm": "bold" }) -" hi htmlString guifg=#87875f guibg=NONE gui=NONE ctermfg=101 ctermbg=NONE cterm=NONE - -" Javascript -hi! link jsAsyncKeyword PreProc -hi! link jsForAwait PreProc -call s:h("jsClassKeyword", {"fg": s:purple}) -hi! link jsClassDefinition Type -hi! link jsConditional PreProc -hi! link jsExtendsKeyword PreProc -hi! link jsReturn PreProc -hi! link jsRepeat PreProc -call s:h("jsxOpenPunct", {"fg": s:norm_subtle}) -hi! link jsxClosePunct jsxOpenPunct - -" Elixir -call s:h("elixirVariable", {"fg": s:purple}) -call s:h("elixirAtom", {"fg": s:yellow}) - -" tpope/vim-markdown -call s:h("markdownBlockquote", {"fg": s:norm}) -call s:h("markdownBold", {"fg": s:norm , "gui": "bold" , "cterm": "bold" }) -call s:h("markdownBoldItalic", {"fg": s:norm , "gui": s:maybe_italic("bold"), "cterm": "bold" }) -call s:h("markdownEscape", {"fg": s:norm}) -call s:h("markdownH1", {"fg": s:head_a, "gui": s:maybe_italic("bold"), "cterm": "bold" }) -call s:h("markdownH2", {"fg": s:head_a, "gui": "bold" , "cterm": "bold" }) -call s:h("markdownH3", {"fg": s:head_a, "gui": s:maybe_italic("") , "cterm": s:maybe_italic("")}) -call s:h("markdownH4", {"fg": s:head_a, "gui": s:maybe_italic("") , "cterm": s:maybe_italic("")}) -call s:h("mckarkdownH5", {"fg": s:head_a}) -call s:h("markdownH6", {"fg": s:head_a}) -call s:h("markdownHeadingDelimiter", {"fg": s:norm}) -call s:h("markdownHeadingRule", {"fg": s:norm}) -call s:h("markdownId", {"fg": s:norm_subtle}) -call s:h("markdownIdDeclaration", {"fg": s:norm_subtle}) -call s:h("markdownItalic", {"fg": s:norm , "gui": s:maybe_italic("") , "cterm": s:maybe_italic("")}) -call s:h("markdownLinkDelimiter", {"fg": s:norm_subtle}) -call s:h("markdownLinkText", {"fg": s:norm}) -call s:h("markdownLinkTextDelimiter", {"fg": s:norm_subtle}) -call s:h("markdownListMarker", {"fg": s:norm}) -call s:h("markdownOrderedListMarker", {"fg": s:norm}) -call s:h("markdownRule", {"fg": s:norm}) -call s:h("markdownUrl", {"fg": s:norm_subtle, "gui": "underline", "cterm": "underline"}) -call s:h("markdownUrlDelimiter", {"fg": s:norm_subtle}) -call s:h("markdownUrlTitle", {"fg": s:norm}) -call s:h("markdownUrlTitleDelimiter", {"fg": s:norm_subtle}) -call s:h("markdownCode", {"fg": s:norm}) -call s:h("markdownCodeDelimiter", {"fg": s:norm}) - -" plasticboy/vim-markdown -call s:h("mkdBlockQuote", {"fg": s:norm}) -call s:h("mkdDelimiter", {"fg": s:norm_subtle}) -call s:h("mkdID", {"fg": s:norm_subtle}) -call s:h("mkdLineContinue", {"fg": s:norm}) -call s:h("mkdLink", {"fg": s:norm}) -call s:h("mkdLinkDef", {"fg": s:norm_subtle}) -call s:h("mkdListItem", {"fg": s:norm}) -call s:h("mkdNonListItemBlock", {"fg": s:norm}) " bug in syntax? -call s:h("mkdRule", {"fg": s:norm}) -call s:h("mkdUrl", {"fg": s:norm_subtle, "gui": "underline", "cterm": "underline"}) -call s:h("mkdCode", {"fg": s:norm}) -call s:h("mkdIndentCode", {"fg": s:norm}) - -" gabrielelana/vim-markdown -call s:h("markdownBlockquoteDelimiter", {"fg": s:norm}) -call s:h("markdownInlineDelimiter", {"fg": s:norm}) -call s:h("markdownItemDelimiter", {"fg": s:norm}) -call s:h("markdownLinkReference", {"fg": s:norm_subtle}) -call s:h("markdownLinkText", {"fg": s:norm}) -call s:h("markdownLinkTextContainer", {"fg": s:norm_subtle}) -call s:h("markdownLinkUrl", {"fg": s:norm_subtle, "gui": "underline", "cterm": "underline"}) -call s:h("markdownLinkUrlContainer", {"fg": s:norm_subtle}) -call s:h("markdownFencedCodeBlock", {"fg": s:norm}) -call s:h("markdownInlineCode", {"fg": s:norm}) - -" mattly/vim-markdown-enhancements -call s:h("mmdFootnoteDelimiter", {"fg": s:norm_subtle}) -call s:h("mmdFootnoteMarker", {"fg": s:norm}) -call s:h("mmdTableAlign", {"fg": s:norm}) -call s:h("mmdTableDelimiter", {"fg": s:norm}) -call s:h("mmdTableHeadDelimiter", {"fg": s:norm}) -call s:h("mmdTableHeader", {"fg": s:norm}) -call s:h("mmdTableCaptionDelimiter", {"fg": s:norm}) -call s:h("mmdTableCaption", {"fg": s:norm}) - -" XML content -hi! link xmlTag htmlTag -hi! link xmlEndTag xmlTag -hi! link xmlTagName htmlTagName - -call s:h("qfLineNr", {"fg": s:norm_subtle}) - -" Signify, git-gutter, gitsigns.nvim -hi link SignifySignAdd LineNr -hi link SignifySignDelete LineNr -hi link SignifySignChange LineNr -call s:h("GitGutterAdd",{"fg": s:green, "bg": s:bg}) -call s:h("GitGutterDelete",{"fg": s:red, "bg": s:bg}) -call s:h("GitGutterChange",{"fg": s:yellow, "bg": s:bg}) -call s:h("GitGutterChangeDelete",{"fg": s:red, "bg": s:bg}) -hi link GitSignsAdd GitGutterAdd -hi link GitSignsChange GitGutterChange -hi link GitSignsDelete GitGutterDelete -hi link GitSignsChangedelete GitGutterDelete -hi link GitSignsTopdelete GitGutterDelete - -" Fugitive -call s:h("diffAdded", {"fg": s:green}) -call s:h("diffRemoved", {"fg": s:red}) -call s:h("diffFile", {"fg": s:purple}) -call s:h("diffIndexLine", {"fg": s:purple}) -call s:h("diffOldFile", {"fg": s:blue}) -call s:h("diffNewFile", {"fg": s:blue}) -call s:h("diffLine", {"fg": s:purple}) -call s:h("diffSubname", {"fg": s:norm}) - -" Ale -call s:h("ALEErrorSign", {"fg": s:red, "bg": s:bg}) -call s:h("ALEWarningSign", {"fg": s:dark_yellow, "bg": s:bg}) -call s:h("ALEVirtualTextWarning", {"fg": s:dark_yellow}) -" CTRLP -call s:h("CtrlpMatch", {"fg": s:yellow}) -call s:h("NERDTreeDir", {"fg": s:blue}) -call s:h("NERDTreeFlags", {"fg": s:green}) - -let g:terminal_color_0 = s:bg_bright.gui -let g:terminal_color_1 = s:red.gui -let g:terminal_color_2 = s:green.gui -let g:terminal_color_3 = s:yellow.gui -let g:terminal_color_4 = s:blue.gui -let g:terminal_color_5 = s:purple.gui -let g:terminal_color_6 = s:cyan.gui -let g:terminal_color_7 = s:bg.gui -let g:terminal_color_8 = s:bg_bright.gui -let g:terminal_color_9 = s:dark_red.gui -let g:terminal_color_10 = s:dark_green.gui -let g:terminal_color_11 = s:dark_yellow.gui -let g:terminal_color_12 = s:dark_blue.gui -let g:terminal_color_13 = s:dark_purple.gui -let g:terminal_color_14 = s:dark_cyan.gui -let g:terminal_color_15 = s:norm_subtle.gui - -" 256-color terminal colors -let g:terminal_ansi_colors = [ - \ s:bg_bright.gui, s:red.gui, s:green.gui, s:yellow.gui, - \ s:blue.gui, s:purple.gui, s:cyan.gui, s:bg.gui, - \ s:bg_bright.gui, s:dark_red.gui, s:dark_green.gui, s:dark_yellow.gui, - \ s:dark_blue.gui, s:dark_purple.gui, s:dark_cyan.gui, s:norm_subtle.gui] - diff --git a/lua/embark.lua b/lua/embark.lua new file mode 100644 index 0000000..b2fcfb1 --- /dev/null +++ b/lua/embark.lua @@ -0,0 +1,22 @@ +---@class embark +local M = {} + +---@return boolean +function M.check_tgc() + return vim.fn.exists("+termguicolors") == 1 +end + +---@param opts? embark.Opts +function M.setup(opts) + opts = opts or {} + + local config = require("embark.config") + config.options = vim.tbl_deep_extend("keep", opts, config.defaults) + + if not M.check_tgc() then + vim.notify("`termguicolors` not found!", vim.log.levels.WARN) + end +end + +return M +-- vim:ts=2:sts=2:sw=2:et diff --git a/lua/embark/colors.lua b/lua/embark/colors.lua new file mode 100644 index 0000000..836f4a9 --- /dev/null +++ b/lua/embark/colors.lua @@ -0,0 +1,405 @@ +local options = require("embark.config").options + +---@class embark.colors +local M = {} + +-- == COLOR PALETTE == +-- +-- TODO: Cterm values here are OG from Challenger Deep + +---@class embark.colors.palette +M.palette = { + -- Space + space0 = "#100E23", + space1 = "#1e1c31", + space2 = "#2F2A47", + space3 = "#3E3859", + space4 = "#585273", + -- Astral + astral0 = "#8A889D", + astral1 = "#cbe3e7", + -- Nebula + red = "#F48FB1", + dark_red = "#F02E6E", + green = "#A1EFD3", + dark_green = "#7fe9c3", + yellow = "#ffe6b3", + dark_yellow = "#F2B482", + blue = "#91ddff", + dark_blue = "#78a8ff", + purple = "#d4bfff", + dark_purple = "#7676ff", + cyan = "#ABF8F7", + dark_cyan = "#63f2f1", + diff_del = "#5E3859", + diff_add = "#2D5059", + diff_changed = "#38325A", + + bg = "#1e1c31", + bg_dark = "#100E23", + bg_bright = "#585273", + norm = "#cbe3e7", + fg = "#8A889D", + norm_subtle = "#8A889D", + visual = "#3E3859", + head_a = "#78a8ff", + head_b = "#91ddff", + head_c = "#63f2f1", +} + +---@type table +M.colors = { + ALEErrorSign = { fg = M.palette.red, bg = M.palette.bg }, + ALEVirtualTextWarning = { fg = M.palette.dark_yellow }, + ALEWarningSign = { fg = M.palette.dark_yellow, bg = M.palette.bg }, + Boolean = { fg = M.palette.dark_yellow }, + CmpItemAbbrMatch = { link = "Pmenu" }, + CmpItemKindDefault = { fg = M.palette.purple }, + CmpItemKindFunction = { link = "Function" }, + CmpItemKindInterface = { link = "CmpItemKindDefault" }, + CmpItemKindMethod = { link = "CmpItemKindFunction" }, + CmpItemKindModule = { link = "PreProc" }, + CmpItemKindReference = { link = "CmpItemKindDefault" }, + CmpItemKindSnippet = { link = "Constant" }, + CmpItemKindStruct = { link = "CmpItemKindModule" }, + CmpItemKindText = { link = "Comment" }, + CmpItemMenu = { link = "Comment" }, + ColorColumn = { bg = M.palette.space2 }, + Comment = { fg = M.palette.astral0, italic = options.italic }, + Conceal = { fg = M.palette.astral1 }, + Constant = { fg = M.palette.purple }, + CtrlpMatch = { fg = M.palette.yellow }, + Cursor = { bg = M.palette.blue, fg = M.palette.bg_bright }, + CursorColumn = { bg = M.palette.bg_dark }, + CursorLine = { bg = M.palette.bg_dark }, + CursorLineNr = { bg = M.palette.bg_dark, fg = M.palette.blue, bold = true }, + DiagnosticError = { fg = M.palette.red, bg = M.palette.bg_dark }, + DiagnosticFloatingError = { link = "DiagnosticSignError" }, + DiagnosticFloatingHint = { link = "DiagnosticSignHint" }, + DiagnosticFloatingInfo = { link = "DiagnosticSignInfo" }, + DiagnosticFloatingWarn = { link = "DiagnosticSignWarn" }, + DiagnosticHint = { fg = M.palette.purple, bg = M.palette.bg_dark }, + DiagnosticInfo = { fg = M.palette.blue, bg = M.palette.bg_dark }, + DiagnosticSignError = { fg = M.palette.red }, + DiagnosticSignHint = { fg = M.palette.purple }, + DiagnosticSignInfo = { fg = M.palette.blue }, + DiagnosticSignWarn = { fg = M.palette.yellow }, + DiagnosticUnderlineError = { underline = true, sp = M.palette.red }, + DiagnosticUnderlineHint = { underline = true, sp = M.palette.purple }, + DiagnosticUnderlineInfo = { underline = true, sp = M.palette.blue }, + DiagnosticUnderlineWarn = { underline = true, sp = M.palette.yellow }, + DiagnosticWarn = { fg = M.palette.yellow, bg = M.palette.bg_dark }, + DiffAdd = { bg = M.palette.diff_add }, + DiffChange = { bg = M.palette.diff_changed }, + DiffDelete = { fg = M.palette.space3, bg = M.palette.diff_del }, + DiffText = { bg = M.palette.diff_changed, underline = true, sp = M.palette.dark_blue }, + Directory = { fg = M.palette.purple }, + Error = { fg = M.palette.dark_red, bg = M.palette.space0, bold = true }, + ErrorMsg = { fg = M.palette.dark_red }, + FlashLabel = { link = "LeapLabelPrimary" }, + Float = { fg = M.palette.dark_yellow }, + FoldColumn = { fg = M.palette.dark_purple }, + Folded = { fg = M.palette.purple, bg = M.palette.space2 }, + Function = { fg = M.palette.red }, + GitGutterAdd = { fg = M.palette.green, bg = M.palette.bg }, + GitGutterChange = { fg = M.palette.yellow, bg = M.palette.bg }, + GitGutterChangeDelete = { fg = M.palette.red, bg = M.palette.bg }, + GitGutterDelete = { fg = M.palette.red, bg = M.palette.bg }, + GitSignsAdd = { link = "GitGutterAdd" }, + GitSignsChange = { link = "GitGutterChange" }, + GitSignsChangedelete = { link = "GitGutterDelete" }, + GitSignsDelete = { link = "GitGutterDelete" }, + GitSignsTopdelete = { link = "GitGutterDelete" }, + Identifier = { fg = M.palette.astral1 }, + Ignore = { fg = M.palette.space1 }, + IncSearch = { bg = M.palette.yellow, fg = M.palette.bg }, + Keyword = { fg = M.palette.green }, + Label = { fg = M.palette.dark_blue }, + LeapLabelPrimary = { fg = M.palette.bg_dark, bg = M.palette.dark_cyan, bold = true }, + LeapLabelSecondary = { fg = M.palette.bg_dark, bg = M.palette.purple }, + LineNr = { fg = M.palette.space4 }, + MatchParen = { bg = M.palette.bg_dark, fg = M.palette.purple, bold = true }, + ModeMsg = { fg = M.palette.norm_subtle, bold = true }, + MoreMsg = { link = "ModeMsg" }, + NERDTreeDir = { fg = M.palette.blue }, + NERDTreeFlags = { fg = M.palette.green }, + NeoTreeGitUnStaged = { fg = M.palette.dark_cyan }, + NeoTreeGitUntracked = { fg = M.palette.astral0, bold = true, italic = options.italic }, + NonText = { fg = M.palette.bg_bright }, + Normal = { bg = M.palette.bg, fg = M.palette.norm }, + NormalFloat = { link = "Pmenu" }, + NotifyDEBUGBorder = { fg = M.palette.blue }, + NotifyDEBUGIcon = { link = "NotifyDEBUGIcon" }, + NotifyDEBUGTitle = { link = "NotifyDEBUGBorder" }, + NotifyERRORBorder = { fg = M.palette.red }, + NotifyERRORIcon = { link = "NotifyERRORBorder" }, + NotifyERRORTitle = { link = "NotifyERRORBorder" }, + NotifyINFOBODY = { link = "NotifyInfoBorder" }, + NotifyINFOBorder = { fg = M.palette.green }, + NotifyINFOIcon = { link = "NotifyInfoBorder" }, + NotifyINFOTitle = { link = "NotifyInfoBorder" }, + NotifyTRACEBorder = { fg = M.palette.purple }, + NotifyTRACEIcon = { link = "NotifyTRACEBorder" }, + NotifyTRACETitle = { link = "NotifyTRACEBorder" }, + NotifyWARNBorder = { fg = M.palette.yellow }, + NotifyWARNIcon = { link = "NotifyWARNTitle" }, + NotifyWARNTitle = { link = "NotifyWARNBorder" }, + Number = { fg = M.palette.dark_yellow }, + NvimTreeFolderIcon = { fg = M.palette.purple }, + NvimTreeFolderName = { fg = M.palette.blue }, + NvimTreeRootFolder = { fg = M.palette.green }, + Operator = { fg = M.palette.dark_cyan }, + Pmenu = { fg = M.palette.norm, bg = M.palette.space2 }, + PmenuSbar = { fg = M.palette.norm, bg = M.palette.bg_dark }, + PmenuSel = { fg = M.palette.purple, bg = M.palette.bg }, + PmenuThumb = { fg = M.palette.norm, bg = M.palette.bg_dark }, + PreProc = { fg = M.palette.green }, + Question = { fg = M.palette.green }, + RenderMarkdownH1Bg = { fg = M.palette.dark_purple, underline = true, bold = true }, + RenderMarkdownH2Bg = { fg = M.palette.dark_blue, underline = true, bold = true }, + RenderMarkdownH3Bg = { fg = M.palette.dark_cyan, underline = true, bold = true }, + RenderMarkdownH4Bg = { fg = M.palette.green, underline = true, bold = true }, + RenderMarkdownH5Bg = { fg = M.palette.yellow, underline = true, bold = true }, + RenderMarkdownH6Bg = { fg = M.palette.yellow, underline = true, bold = true }, + Search = { bg = M.palette.dark_yellow, fg = M.palette.bg }, + SignColumn = { fg = M.palette.green }, + SignifySignAdd = { link = "LineNr" }, + SignifySignChange = { link = "LineNr" }, + SignifySignDelete = { link = "LineNr" }, + Sneak = { link = "Search" }, + Special = { fg = M.palette.cyan }, + SpecialKey = { fg = M.palette.blue }, + SpellBad = { underline = true, fg = M.palette.dark_red }, + SpellCap = { underline = true, fg = M.palette.green }, + SpellLocal = { underline = true, fg = M.palette.dark_green, sp = M.palette.dark_green }, + SpellRare = { underline = true, fg = M.palette.red }, + Statement = { fg = M.palette.green }, + StatusLine = { bg = M.palette.bg, fg = M.palette.norm }, + StatusLineNC = { bg = M.palette.bg }, + String = { fg = M.palette.yellow }, + TabLine = { fg = M.palette.norm_subtle, bg = M.palette.bg }, + TabLineFill = { fg = M.palette.norm_subtle, bg = M.palette.bg }, + TabLineSel = { fg = M.palette.norm, bg = M.palette.visual, bold = true }, + TelescopeBorder = { link = "LineNr" }, + TelescopeMatching = { link = "String" }, + TelescopeNormal = { fg = M.palette.astral0 }, + TelescopePreviewTitle = { fg = M.palette.space0, bg = M.palette.purple }, + TelescopePromptNormal = { link = "Normal" }, + TelescopePromptPrefix = { link = "Type" }, + TelescopePromptTitle = { fg = M.palette.space0, bg = M.palette.green }, + TelescopeResultsDiffAdd = { link = "GitGutterAdd" }, + TelescopeResultsDiffChange = { link = "GitGutterChange" }, + TelescopeResultsDiffDelete = { link = "GitGutterDelete" }, + TelescopeResultsDiffUntracked = { link = "Title" }, + TelescopeResultsTitle = { fg = M.palette.space0, bg = M.palette.blue }, + TelescopeSelection = { bg = M.palette.visual, fg = M.palette.astral1 }, + TelescopeSelectionCaret = { bg = M.palette.visual, fg = M.palette.green }, + Title = { fg = M.palette.dark_blue }, + Todo = { fg = M.palette.dark_yellow, bg = M.palette.space1, bold = true }, + Type = { fg = M.palette.purple }, + Underlined = { fg = M.palette.astral1, underline = true }, + Visual = { bg = M.palette.visual }, + WarningMsg = { fg = M.palette.yellow }, + WhichKey = { fg = M.palette.blue }, + WhichKeyDesc = { fg = M.palette.astral1 }, + WhichKeyGroup = { fg = M.palette.purple }, + WildMenu = { fg = M.palette.bg_dark, bg = M.palette.cyan }, + WinSeparator = { fg = M.palette.space3 }, + diffAdded = { fg = M.palette.green }, + diffFile = { fg = M.palette.purple }, + diffIndexLine = { fg = M.palette.purple }, + diffLine = { fg = M.palette.purple }, + diffNewFile = { fg = M.palette.blue }, + diffOldFile = { fg = M.palette.blue }, + diffRemoved = { fg = M.palette.red }, + diffSubname = { fg = M.palette.norm }, + elixirAtom = { fg = M.palette.yellow }, + elixirVariable = { fg = M.palette.purple }, + htmlBold = { bold = true }, + htmlBoldItalic = { bold = true, italic = options.italic }, + htmlEndTag = { link = "htmlTag" }, + htmlH1 = { fg = M.palette.head_a, bold = true, italic = options.italic }, + htmlH2 = { fg = M.palette.head_a, bold = true }, + htmlH3 = { fg = M.palette.head_b, italic = true }, + htmlH4 = { fg = M.palette.head_b, italic = true }, + htmlH5 = { fg = M.palette.head_c }, + htmlH6 = { fg = M.palette.head_c }, + htmlItalic = { italic = options.italic }, + htmlLink = { fg = M.palette.blue, underline = true }, + htmlTag = { link = "Special" }, + htmlTagN = { link = "Keyword" }, + htmlTagName = { link = "KeyWord" }, + jsAsyncKeyword = { link = "PreProc" }, + jsClassDefinition = { link = "Type" }, + jsClassKeyword = { fg = M.palette.purple }, + jsConditional = { link = "PreProc" }, + jsExtendsKeyword = { link = "PreProc" }, + jsForAwait = { link = "PreProc" }, + jsRepeat = { link = "PreProc" }, + jsReturn = { link = "PreProc" }, + jsxClosePunct = { link = "jsxOpenPunct" }, + jsxOpenPunct = { fg = M.palette.norm_subtle }, + markdownBlockquote = { fg = M.palette.norm }, + markdownBlockquoteDelimiter = { fg = M.palette.norm }, + markdownBold = { fg = M.palette.norm, bold = true }, + markdownBoldItalic = { fg = M.palette.norm, bold = true, italic = options.italic }, + markdownCode = { fg = M.palette.norm }, + markdownCodeDelimiter = { fg = M.palette.norm }, + markdownEscape = { fg = M.palette.norm }, + markdownFencedCodeBlock = { fg = M.palette.norm }, + markdownH1 = { fg = M.palette.head_a, bold = true, italic = options.italic }, + markdownH2 = { fg = M.palette.head_a, bold = true }, + markdownH3 = { fg = M.palette.head_a, italic = options.italic }, + markdownH4 = { fg = M.palette.head_a, italic = options.italic }, + markdownH6 = { fg = M.palette.head_a }, + markdownHeadingDelimiter = { fg = M.palette.norm }, + markdownHeadingRule = { fg = M.palette.norm }, + markdownId = { fg = M.palette.norm_subtle }, + markdownIdDeclaration = { fg = M.palette.norm_subtle }, + markdownInlineCode = { fg = M.palette.norm }, + markdownInlineDelimiter = { fg = M.palette.norm }, + markdownItalic = { fg = M.palette.norm, italic = options.italic }, + markdownItemDelimiter = { fg = M.palette.norm }, + markdownLinkDelimiter = { fg = M.palette.norm_subtle }, + markdownLinkReference = { fg = M.palette.norm_subtle }, + markdownLinkText = { fg = M.palette.norm }, + markdownLinkTextContainer = { fg = M.palette.norm_subtle }, + markdownLinkTextDelimiter = { fg = M.palette.norm_subtle }, + markdownLinkUrl = { fg = M.palette.norm_subtle, underline = true }, + markdownLinkUrlContainer = { fg = M.palette.norm_subtle }, + markdownListMarker = { fg = M.palette.norm }, + markdownOrderedListMarker = { fg = M.palette.norm }, + markdownRule = { fg = M.palette.norm }, + markdownUrl = { fg = M.palette.norm_subtle, underline = true }, + markdownUrlDelimiter = { fg = M.palette.norm_subtle }, + markdownUrlTitle = { fg = M.palette.norm }, + markdownUrlTitleDelimiter = { fg = M.palette.norm_subtle }, + mckarkdownH5 = { fg = M.palette.head_a }, + mkdBlockQuote = { fg = M.palette.norm }, + mkdCode = { fg = M.palette.norm }, + mkdDelimiter = { fg = M.palette.norm_subtle }, + mkdID = { fg = M.palette.norm_subtle }, + mkdIndentCode = { fg = M.palette.norm }, + mkdLineContinue = { fg = M.palette.norm }, + mkdLink = { fg = M.palette.norm }, + mkdLinkDef = { fg = M.palette.norm_subtle }, + mkdListItem = { fg = M.palette.norm }, + mkdNonListItemBlock = { fg = M.palette.norm }, -- bug in syntax? + mkdRule = { fg = M.palette.norm }, + mkdUrl = { fg = M.palette.norm_subtle, underline = true }, + mmdFootnoteDelimiter = { fg = M.palette.norm_subtle }, + mmdFootnoteMarker = { fg = M.palette.norm }, + mmdTableAlign = { fg = M.palette.norm }, + mmdTableCaption = { fg = M.palette.norm }, + mmdTableCaptionDelimiter = { fg = M.palette.norm }, + mmdTableDelimiter = { fg = M.palette.norm }, + mmdTableHeadDelimiter = { fg = M.palette.norm }, + mmdTableHeader = { fg = M.palette.norm }, + qfLineNr = { fg = M.palette.norm_subtle }, + xmlEndTag = { link = "xmlTag" }, + xmlTag = { link = "htmlTag" }, + xmlTagName = { link = "htmlTagName" }, +} + +---@param group string +---@param style vim.api.keyset.highlight +function M.h(group, style) + vim.api.nvim_set_hl(0, group, style) +end + +function M.setup() + vim.cmd([[ + hi clear + + if exists('syntax on') + syntax reset + endif + ]]) + + vim.g.colors_name = "embark" + vim.o.background = "dark" + + if vim.fn.exists("g:embark_terminal_italics") ~= 1 then + vim.g.embark_terminal_italics = 0 + end + if vim.fn.exists("g:embark_terminalcolors") ~= 1 then + vim.g.embark_termcolors = 256 + end + + if vim.fn.has("nvim-0.8") == 1 then + M.colors["@constructor"] = { fg = M.palette.purple } + M.colors["@function"] = { fg = M.palette.red } + M.colors["@function.call"] = { fg = M.palette.blue } + M.colors["@keyword.operator"] = { fg = M.palette.cyan } + M.colors["@markup.emphasis"] = { italic = options.italic } + M.colors["@markup.link"] = { fg = M.palette.purple } + M.colors["@markup.link.uri"] = { fg = M.palette.blue } + M.colors["@markup.list.checked"] = { fg = M.palette.norm_subtle } + M.colors["@markup.list.unchecked"] = { fg = M.palette.dark_cyan, bold = true } + M.colors["@markup.raw"] = { fg = M.palette.cyan } + M.colors["@markup.strong"] = { bold = true } + M.colors["@module"] = { fg = M.palette.purple } + M.colors["@punctuation.bracket"] = { fg = M.palette.cyan } + M.colors["@string.escape"] = { fg = M.palette.cyan } + M.colors["@string.special"] = { fg = M.palette.dark_blue } + M.colors["@string.special.symbol"] = { fg = M.palette.yellow } + M.colors["@symbol"] = { fg = M.palette.yellow } + M.colors["@text.emphasis"] = { italic = options.italic } + M.colors["@text.literal"] = { fg = M.palette.cyan } + M.colors["@text.reference"] = { fg = M.palette.purple } + M.colors["@text.strong"] = { bold = true } + M.colors["@text.todo.checked"] = { fg = M.palette.norm_subtle } + M.colors["@text.todo.unchecked"] = { fg = M.palette.dark_cyan, bold = true } + M.colors["@text.uri"] = { fg = M.palette.blue } + M.colors["@variable.builtin"] = { fg = M.palette.cyan } + + M.colors["@constant.builtin"] = { link = "Special" } + M.colors["@markup.heading"] = { link = "Title" } + M.colors["@tag"] = { link = "Keyword" } + M.colors["@tag.attribute"] = { link = "Constant" } + M.colors["@tag.delimiter"] = { link = "Special" } + end + + for name, style in pairs(M.colors) do + M.h(name, style) + end + + vim.g.terminal_color_0 = M.palette.bg_bright + vim.g.terminal_color_1 = M.palette.red + vim.g.terminal_color_2 = M.palette.green + vim.g.terminal_color_3 = M.palette.yellow + vim.g.terminal_color_4 = M.palette.blue + vim.g.terminal_color_5 = M.palette.purple + vim.g.terminal_color_6 = M.palette.cyan + vim.g.terminal_color_7 = M.palette.bg + vim.g.terminal_color_8 = M.palette.bg_bright + vim.g.terminal_color_9 = M.palette.dark_red + vim.g.terminal_color_10 = M.palette.dark_green + vim.g.terminal_color_11 = M.palette.dark_yellow + vim.g.terminal_color_12 = M.palette.dark_blue + vim.g.terminal_color_13 = M.palette.dark_purple + vim.g.terminal_color_14 = M.palette.dark_cyan + vim.g.terminal_color_15 = M.palette.norm_subtle + + vim.g.terminal_ansi_colors = { + M.palette.bg_bright, + M.palette.red, + M.palette.green, + M.palette.yellow, + M.palette.blue, + M.palette.purple, + M.palette.cyan, + M.palette.bg, + M.palette.bg_bright, + M.palette.dark_red, + M.palette.dark_green, + M.palette.dark_yellow, + M.palette.dark_blue, + M.palette.dark_purple, + M.palette.dark_cyan, + M.palette.norm_subtle, + } +end + +return M +-- vim:ts=2:sts=2:sw=2:et diff --git a/lua/embark/config.lua b/lua/embark/config.lua new file mode 100644 index 0000000..d278daf --- /dev/null +++ b/lua/embark/config.lua @@ -0,0 +1,13 @@ +local M = {} + +---@class embark.Opts +M.defaults = { + ---@type boolean + italic = false, +} + +---@type embark.Opts +M.options = {} + +return M +-- vim:ts=2:sts=2:sw=2:et diff --git a/lua/lualine/themes/embark.lua b/lua/lualine/themes/embark.lua index 1842d04..910c6bd 100644 --- a/lua/lualine/themes/embark.lua +++ b/lua/lualine/themes/embark.lua @@ -1,44 +1,44 @@ local colors = { - space0 = "#100e23", - space1 = "#1e1c31", - space2 = "#2d2b40", - space3 = "#3e3859", - space4 = "#585273", - astral1 = "#cbe3e7", - cyan = "#aaffe4", - darkcyan = "#63f2f1", - yellow = "#ffe9aa", - darkyellow = "#ffb378", - red = "#f48fb1", - darkred = "#ff5458", - green = "#a1efd3", - darkgreen = "#62d196", - purple = "#d4bfff", - nebula10 = "#78A8ff", - nebula11 = "#7676ff", + space0 = "#100e23", + space1 = "#1e1c31", + space2 = "#2d2b40", + space3 = "#3e3859", + space4 = "#585273", + astral1 = "#cbe3e7", + cyan = "#aaffe4", + darkcyan = "#63f2f1", + yellow = "#ffe9aa", + darkyellow = "#ffb378", + red = "#f48fb1", + darkred = "#ff5458", + green = "#a1efd3", + darkgreen = "#62d196", + purple = "#d4bfff", + nebula10 = "#78A8ff", + nebula11 = "#7676ff", } local embark = { normal = { - a = { fg = colors.space0, bg = colors.cyan, gui = "bold", }, + a = { fg = colors.space0, bg = colors.cyan, gui = "bold" }, b = { fg = colors.astral1, bg = colors.space2 }, c = { fg = colors.astral1, bg = colors.space0 }, y = { fg = colors.space0, bg = colors.darkcyan }, }, visual = { - a = { fg = colors.space0, bg = colors.yellow, gui = "bold", }, + a = { fg = colors.space0, bg = colors.yellow, gui = "bold" }, b = { fg = colors.space0, bg = colors.darkyellow }, }, insert = { - a = { fg = colors.space0, bg = colors.red, gui = "bold", }, + a = { fg = colors.space0, bg = colors.red, gui = "bold" }, b = { fg = colors.space0, bg = colors.darkred }, }, replace = { - a = { fg = colors.space0, bg = colors.nebula10, gui = "bold", }, + a = { fg = colors.space0, bg = colors.nebula10, gui = "bold" }, b = { fg = colors.space0, bg = colors.nebula11 }, }, inactive = { - a = { fg = colors.space4, bg = colors.space1, gui = "bold", }, + a = { fg = colors.space4, bg = colors.space1, gui = "bold" }, b = { fg = colors.space4, bg = colors.space1 }, c = { fg = colors.space4, bg = colors.space2 }, x = { fg = colors.space0, bg = colors.purple }, @@ -46,3 +46,4 @@ local embark = { } return embark +-- vim:ts=2:sts=2:sw=2:et: