From 341178ea1d9da135e2aace85ff186d4ba1eea85e Mon Sep 17 00:00:00 2001 From: Scott McKendry <39483124+scottmckendry@users.noreply.github.com> Date: Sun, 28 Apr 2024 05:25:15 +1200 Subject: [PATCH 01/18] fix: use visible color for colorcolumn highlight fixes #16 --- lua/cyberdream/theme.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/cyberdream/theme.lua b/lua/cyberdream/theme.lua index aa97265..1a80059 100644 --- a/lua/cyberdream/theme.lua +++ b/lua/cyberdream/theme.lua @@ -34,7 +34,7 @@ function M.setup() theme.highlights = { Comment = { fg = t.grey, italic = opts.italic_comments }, - ColorColumn = { bg = t.bg }, + ColorColumn = { bg = t.bgHighlight }, Conceal = { fg = t.grey }, Cursor = { fg = t.bg, bg = t.fg }, ICursor = { fg = t.bg, bg = t.fg }, From b6a5edacfab478b795faf2da49760b2179139809 Mon Sep 17 00:00:00 2001 From: Scott McKendry <39483124+scottmckendry@users.noreply.github.com> Date: Sun, 28 Apr 2024 05:35:42 +1200 Subject: [PATCH 02/18] chore(main): release 1.0.1 (#15) --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a5bb58..c4a76b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.0.1](https://github.com/scottmckendry/cyberdream.nvim/compare/v1.0.0...v1.0.1) (2024-04-27) + + +### Bug Fixes + +* set TS [@variable](https://github.com/variable) to built-in color ([eaabbae](https://github.com/scottmckendry/cyberdream.nvim/commit/eaabbaea162e90c671cff64bdbca2d2e2a211a30)) +* use visible color for colorcolumn highlight ([341178e](https://github.com/scottmckendry/cyberdream.nvim/commit/341178ea1d9da135e2aace85ff186d4ba1eea85e)), closes [#16](https://github.com/scottmckendry/cyberdream.nvim/issues/16) + ## 1.0.0 (2024-04-26) From d400d3fede6ad68df0c4c58d009da7420dcb43cb Mon Sep 17 00:00:00 2001 From: Scott McKendry <39483124+scottmckendry@users.noreply.github.com> Date: Sun, 28 Apr 2024 07:28:14 +1200 Subject: [PATCH 03/18] fix: use non-conflicting hl for quickfix list fixes #17 --- lua/cyberdream/theme.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/cyberdream/theme.lua b/lua/cyberdream/theme.lua index 1a80059..4534cee 100644 --- a/lua/cyberdream/theme.lua +++ b/lua/cyberdream/theme.lua @@ -72,7 +72,7 @@ function M.setup() PmenuSbar = { fg = t.bg, bg = t.bgHighlight }, PmenuThumb = { fg = t.bg, bg = t.bgHighlight }, Question = { fg = t.yellow }, - QuickFixLine = { fg = t.bg, bg = t.blue }, + QuickFixLine = { bg = t.bgHighlight }, Search = { fg = t.bgAlt, bg = t.fg }, IncSearch = { fg = t.bgAlt, bg = t.fg }, CurSearch = { fg = t.bgAlt, bg = t.cyan }, From 19693ee5a577addb4dd2f7c43474e84f283ccc3b Mon Sep 17 00:00:00 2001 From: Le Tieu <53562817+letieu@users.noreply.github.com> Date: Sun, 28 Apr 2024 02:31:57 +0700 Subject: [PATCH 04/18] feat: add fish theme (#18) --- extras/fish/README.md | 11 +++++++++++ extras/fish/cyberdream.theme | 30 ++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 extras/fish/README.md create mode 100644 extras/fish/cyberdream.theme diff --git a/extras/fish/README.md b/extras/fish/README.md new file mode 100644 index 0000000..8508b34 --- /dev/null +++ b/extras/fish/README.md @@ -0,0 +1,11 @@ +## Usage + +### Install + +1. Place the `cyberdream.theme` under `~/.config/fish/themes/` + +2. Run command to set the theme: + +```bash +fish_config theme save cyberdream +``` diff --git a/extras/fish/cyberdream.theme b/extras/fish/cyberdream.theme new file mode 100644 index 0000000..f5d453b --- /dev/null +++ b/extras/fish/cyberdream.theme @@ -0,0 +1,30 @@ +# name: 'cyberdream' +# url: 'https://github.com/scottmckendry/cyberdream.nvim' +# preferred_background: 16181A + +fish_color_normal ffffff +fish_color_command 52cfff +fish_color_param f2cdcd +fish_color_keyword 5eff6c +fish_color_quote f1ff5e +fish_color_redirection 5ea1ff +fish_color_end bd5eff +fish_color_comment 7f849c +fish_color_error ff6e5e +fish_color_gray 6c7086 +fish_color_selection --background=3c4048 +fish_color_search_match --background=3c4048 +fish_color_option f1ff5e +fish_color_operator 5ea1ff +fish_color_escape eba0ac +fish_color_autosuggestion 6c7086 +fish_color_cancel ff6e5e +fish_color_cwd f9e2af +fish_color_user 94e2d5 +fish_color_host 5eff6c +fish_color_host_remote f1ff5e +fish_color_status ff6e5e +fish_pager_color_progress 6c7086 +fish_pager_color_prefix 5ea1ff +fish_pager_color_completion ffffff +fish_pager_color_description 6c7086 From 75966c7ee08b6ebb6ca97fd7ee8d8f8b27103481 Mon Sep 17 00:00:00 2001 From: Le Tieu <53562817+letieu@users.noreply.github.com> Date: Sun, 28 Apr 2024 02:44:43 +0700 Subject: [PATCH 05/18] fix: change wezterm cursor_fg (#19) * fix: change wezterm cursor_fg * feat: add config tab bar transparency * remove tab bar config --------- Co-authored-by: Scott McKendry <39483124+scottmckendry@users.noreply.github.com> --- extras/wezterm.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extras/wezterm.lua b/extras/wezterm.lua index db6c1f1..e4e9b18 100644 --- a/extras/wezterm.lua +++ b/extras/wezterm.lua @@ -3,7 +3,7 @@ return { background = "#16181a", cursor_bg = "#ffffff", - cursor_fg = "#ffffff", + cursor_fg = "#000000", cursor_border = "#ffffff", selection_fg = "#ffffff", From 281b8aef215114113102986ad0de64d89fc89cba Mon Sep 17 00:00:00 2001 From: Scott McKendry <39483124+scottmckendry@users.noreply.github.com> Date: Sun, 28 Apr 2024 07:46:30 +1200 Subject: [PATCH 06/18] chore(main): release 1.1.0 (#20) --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c4a76b7..a08f4df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [1.1.0](https://github.com/scottmckendry/cyberdream.nvim/compare/v1.0.1...v1.1.0) (2024-04-27) + + +### Features + +* add fish theme ([#18](https://github.com/scottmckendry/cyberdream.nvim/issues/18)) ([19693ee](https://github.com/scottmckendry/cyberdream.nvim/commit/19693ee5a577addb4dd2f7c43474e84f283ccc3b)) + + +### Bug Fixes + +* change wezterm cursor_fg ([#19](https://github.com/scottmckendry/cyberdream.nvim/issues/19)) ([75966c7](https://github.com/scottmckendry/cyberdream.nvim/commit/75966c7ee08b6ebb6ca97fd7ee8d8f8b27103481)) +* use non-conflicting hl for quickfix list ([d400d3f](https://github.com/scottmckendry/cyberdream.nvim/commit/d400d3fede6ad68df0c4c58d009da7420dcb43cb)), closes [#17](https://github.com/scottmckendry/cyberdream.nvim/issues/17) + ## [1.0.1](https://github.com/scottmckendry/cyberdream.nvim/compare/v1.0.0...v1.0.1) (2024-04-27) From 8008e70302ecf70b32c7d3658dc6a346351ed93d Mon Sep 17 00:00:00 2001 From: Scott McKendry <39483124+scottmckendry@users.noreply.github.com> Date: Sun, 28 Apr 2024 13:01:07 +1200 Subject: [PATCH 07/18] fix: typo in default config properties --- lua/cyberdream/config.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/cyberdream/config.lua b/lua/cyberdream/config.lua index 58e5b75..52fa42b 100644 --- a/lua/cyberdream/config.lua +++ b/lua/cyberdream/config.lua @@ -6,7 +6,7 @@ local default_options = { italic_comments = false, hide_fillchars = false, borderless_telescope = true, - terminal_colos = true, + terminal_colors = true, theme = { colors = {}, From dab90f1cf0c49bab8fb7a967d47724e075bcc437 Mon Sep 17 00:00:00 2001 From: Scott McKendry <39483124+scottmckendry@users.noreply.github.com> Date: Mon, 29 Apr 2024 08:22:21 +1200 Subject: [PATCH 08/18] feat: add support for nofify fixes #22 --- lua/cyberdream/theme.lua | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/lua/cyberdream/theme.lua b/lua/cyberdream/theme.lua index 4534cee..451a121 100644 --- a/lua/cyberdream/theme.lua +++ b/lua/cyberdream/theme.lua @@ -271,6 +271,28 @@ function M.setup() HeirlineInsert = { bg = t.green }, HeirlineTerminal = { bg = t.cyan }, + -- Nvim Notify + NotifyDEBUGBody = { fg = t.fg }, + NotifyDEBUGBorder = { fg = t.bgHighlight }, + NotifyDEBUGIcon = { fg = t.grey }, + NotifyDEBUGTitle = { fg = t.grey }, + NotifyERRORBody = { fg = t.fg }, + NotifyERRORBorder = { fg = t.bgHighlight }, + NotifyERRORIcon = { fg = t.red }, + NotifyERRORTitle = { fg = t.pink }, + NotifyINFOBody = { fg = t.fg }, + NotifyINFOBorder = { fg = t.bgHighlight }, + NotifyINFOIcon = { fg = t.green }, + NotifyINFOTitle = { fg = t.cyan }, + NotifyTRACEBorder = { fg = t.bgHighlight }, + NotifyTRACEIcon = { fg = t.purple }, + NotifyTRACETitle = { fg = t.magenta }, + NotifyWARNBody = { fg = t.fg }, + NotifyWARNBorder = { fg = t.bgHighlight }, + NotifyWARNIcon = { fg = t.orange }, + NotifyWARNTitle = { fg = t.yellow }, + NotifyBackground = { bg = t.bg }, + -- TreeSitter Specific ["@variable"] = { fg = t.fg }, } @@ -316,6 +338,11 @@ function M.setup() vim.g.terminal_color_14 = t.cyan end + -- Use #000000 for full transparency + if opts.transparent then + theme.highlights.NotifyBackground = { bg = "#000000" } + end + -- Override highlights with user defined highlights theme.highlights = vim.tbl_deep_extend("force", theme.highlights, opts.theme.highlights or {}) From 0d3f549518435e306c69cfea51b04f4be3ef8136 Mon Sep 17 00:00:00 2001 From: Scott McKendry <39483124+scottmckendry@users.noreply.github.com> Date: Mon, 29 Apr 2024 19:45:32 +1200 Subject: [PATCH 09/18] chore(main): release 1.2.0 (#21) --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a08f4df..61f39f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [1.2.0](https://github.com/scottmckendry/cyberdream.nvim/compare/v1.1.0...v1.2.0) (2024-04-28) + + +### Features + +* add support for nofify ([dab90f1](https://github.com/scottmckendry/cyberdream.nvim/commit/dab90f1cf0c49bab8fb7a967d47724e075bcc437)), closes [#22](https://github.com/scottmckendry/cyberdream.nvim/issues/22) + + +### Bug Fixes + +* typo in default config properties ([8008e70](https://github.com/scottmckendry/cyberdream.nvim/commit/8008e70302ecf70b32c7d3658dc6a346351ed93d)) + ## [1.1.0](https://github.com/scottmckendry/cyberdream.nvim/compare/v1.0.1...v1.1.0) (2024-04-27) From d777f1bfb0e6e1d74b3f243d8e4999b6b931ae19 Mon Sep 17 00:00:00 2001 From: Scott McKendry <39483124+scottmckendry@users.noreply.github.com> Date: Tue, 30 Apr 2024 20:10:10 +1200 Subject: [PATCH 10/18] fix: differentiate matches when replacing with /gc --- lua/cyberdream/theme.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/cyberdream/theme.lua b/lua/cyberdream/theme.lua index 451a121..1a8a444 100644 --- a/lua/cyberdream/theme.lua +++ b/lua/cyberdream/theme.lua @@ -74,7 +74,7 @@ function M.setup() Question = { fg = t.yellow }, QuickFixLine = { bg = t.bgHighlight }, Search = { fg = t.bgAlt, bg = t.fg }, - IncSearch = { fg = t.bgAlt, bg = t.fg }, + IncSearch = { fg = t.bgAlt, bg = t.cyan }, CurSearch = { fg = t.bgAlt, bg = t.cyan }, SpecialKey = { fg = t.grey }, SpellBad = { fg = t.red, style = "undercurl" }, From 528085bc1760a76ff4e9aba4d85b0d39d2486866 Mon Sep 17 00:00:00 2001 From: Scott McKendry <39483124+scottmckendry@users.noreply.github.com> Date: Wed, 1 May 2024 08:28:24 +1200 Subject: [PATCH 11/18] fix: set CursorLine hl to visible color --- lua/cyberdream/theme.lua | 3 ++- lua/cyberdream/util.lua | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/lua/cyberdream/theme.lua b/lua/cyberdream/theme.lua index 1a8a444..8ce67e1 100644 --- a/lua/cyberdream/theme.lua +++ b/lua/cyberdream/theme.lua @@ -1,4 +1,5 @@ local colors = require("cyberdream.colors") +local util = require("cyberdream.util") local M = {} function M.setup() @@ -40,7 +41,7 @@ function M.setup() ICursor = { fg = t.bg, bg = t.fg }, CursorIM = { fg = t.bg, bg = t.fg }, CursorColumn = { bg = t.bgHighlight }, - CursorLine = { bg = t.bg }, + CursorLine = { bg = (util.blend(t.bgAlt, t.bgHighlight)) }, Directory = { fg = t.blue }, DiffAdd = { fg = t.green }, DiffChange = { fg = t.cyan }, diff --git a/lua/cyberdream/util.lua b/lua/cyberdream/util.lua index ed1401a..4846cc2 100644 --- a/lua/cyberdream/util.lua +++ b/lua/cyberdream/util.lua @@ -46,4 +46,22 @@ function M.load(theme) M.syntax(theme.highlights) end +--- Blend two colors together based on a weight. +--- @param color1 string +--- @param color2 string +--- @param weight? number +--- @return string +function M.blend(color1, color2, weight) + weight = weight or 0.5 + + local rgb1 = { tonumber(color1:sub(2, 3), 16), tonumber(color1:sub(4, 5), 16), tonumber(color1:sub(6, 7), 16) } + local rgb2 = { tonumber(color2:sub(2, 3), 16), tonumber(color2:sub(4, 5), 16), tonumber(color2:sub(6, 7), 16) } + local rgb_blended = {} + for i = 1, 3 do + rgb_blended[i] = math.floor(rgb1[i] * weight + rgb2[i] * (1 - weight)) + end + + return string.format("#%02x%02x%02x", rgb_blended[1], rgb_blended[2], rgb_blended[3]) +end + return M From 2d23fe29d75279137a3406c14e0098ed34897b69 Mon Sep 17 00:00:00 2001 From: Scott McKendry <39483124+scottmckendry@users.noreply.github.com> Date: Wed, 1 May 2024 08:30:11 +1200 Subject: [PATCH 12/18] chore(main): release 1.2.1 (#26) --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61f39f1..873d666 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.2.1](https://github.com/scottmckendry/cyberdream.nvim/compare/v1.2.0...v1.2.1) (2024-04-30) + + +### Bug Fixes + +* differentiate matches when replacing with /gc ([d777f1b](https://github.com/scottmckendry/cyberdream.nvim/commit/d777f1bfb0e6e1d74b3f243d8e4999b6b931ae19)) +* set CursorLine hl to visible color ([528085b](https://github.com/scottmckendry/cyberdream.nvim/commit/528085bc1760a76ff4e9aba4d85b0d39d2486866)) + ## [1.2.0](https://github.com/scottmckendry/cyberdream.nvim/compare/v1.1.0...v1.2.0) (2024-04-28) From a9eb003663010322b3acbf41740dd8024f24acb9 Mon Sep 17 00:00:00 2001 From: Scott McKendry <39483124+scottmckendry@users.noreply.github.com> Date: Thu, 2 May 2024 20:20:33 +1200 Subject: [PATCH 13/18] feat: add support for indent-blankline --- lua/cyberdream/theme.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/cyberdream/theme.lua b/lua/cyberdream/theme.lua index 8ce67e1..cb32e32 100644 --- a/lua/cyberdream/theme.lua +++ b/lua/cyberdream/theme.lua @@ -294,6 +294,10 @@ function M.setup() NotifyWARNTitle = { fg = t.yellow }, NotifyBackground = { bg = t.bg }, + -- Indent Blankline + IblIndent = { fg = util.blend(t.bgHighlight, t.bgAlt, 0.3) }, + IblScope = { fg = t.bgHighlight }, + -- TreeSitter Specific ["@variable"] = { fg = t.fg }, } From ef2cbccda1197f5ed07d52177456c14db27fd0f5 Mon Sep 17 00:00:00 2001 From: Scott McKendry <39483124+scottmckendry@users.noreply.github.com> Date: Sat, 4 May 2024 07:15:20 +1200 Subject: [PATCH 14/18] feat: add support for treesitter-context --- lua/cyberdream/theme.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/cyberdream/theme.lua b/lua/cyberdream/theme.lua index cb32e32..ea9b573 100644 --- a/lua/cyberdream/theme.lua +++ b/lua/cyberdream/theme.lua @@ -298,6 +298,10 @@ function M.setup() IblIndent = { fg = util.blend(t.bgHighlight, t.bgAlt, 0.3) }, IblScope = { fg = t.bgHighlight }, + -- TreeSitter Context + TreeSitterContext = { bg = util.blend(t.bgAlt, t.cyan, 0.9) }, + TreeSitterContextLineNumber = { fg = util.blend(t.bgHighlight, t.fg) }, + -- TreeSitter Specific ["@variable"] = { fg = t.fg }, } From c195c252deff1a48ce8cf9cb1cb2a92d533d6d18 Mon Sep 17 00:00:00 2001 From: Scott McKendry <39483124+scottmckendry@users.noreply.github.com> Date: Sat, 4 May 2024 07:36:16 +1200 Subject: [PATCH 15/18] chore(main): release 1.3.0 (#31) --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 873d666..b0e1eff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.3.0](https://github.com/scottmckendry/cyberdream.nvim/compare/v1.2.1...v1.3.0) (2024-05-03) + + +### Features + +* add support for indent-blankline ([a9eb003](https://github.com/scottmckendry/cyberdream.nvim/commit/a9eb003663010322b3acbf41740dd8024f24acb9)) +* add support for treesitter-context ([ef2cbcc](https://github.com/scottmckendry/cyberdream.nvim/commit/ef2cbccda1197f5ed07d52177456c14db27fd0f5)) + ## [1.2.1](https://github.com/scottmckendry/cyberdream.nvim/compare/v1.2.0...v1.2.1) (2024-04-30) From 24201167df02088f66577831742d120d10a554ce Mon Sep 17 00:00:00 2001 From: Zoey de Souza Pessanha Date: Fri, 3 May 2024 19:14:22 -0300 Subject: [PATCH 16/18] feat: add helix theme extra (#28) * feat: port cyberdream to helix editor * fix: change a few highlights for parity and readability --------- Co-authored-by: Scott McKendry <39483124+scottmckendry@users.noreply.github.com> --- extras/helix/README.md | 10 +++++ extras/helix/cyberdream.toml | 86 ++++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 extras/helix/README.md create mode 100644 extras/helix/cyberdream.toml diff --git a/extras/helix/README.md b/extras/helix/README.md new file mode 100644 index 0000000..298e29c --- /dev/null +++ b/extras/helix/README.md @@ -0,0 +1,10 @@ +## Usage + +### Install + +1. Place the `cyberdream.toml` under `$HOME/.config/helix/themes` +2. Open `hx` and run the command `:theme cyberdream` +3. If you want permanentely to use the theme, add this to your `$HOME/.config/helix/config.toml`: +```toml +theme = "cyberdream" +``` diff --git a/extras/helix/cyberdream.toml b/extras/helix/cyberdream.toml new file mode 100644 index 0000000..6d4580c --- /dev/null +++ b/extras/helix/cyberdream.toml @@ -0,0 +1,86 @@ +"ui.background" = "bg" +"ui.text" = "fg" +"ui.cursor" = { bg = "fg", fg = "bg" } +"ui.linenr" = "grey" +"ui.statusline" = { fg = "cyan" } +"ui.selection" = "green" +"ui.selection.primary" = "magenta" + +# Syntax Highlighting for Code +"comment" = { fg = "grey", modifiers = ["italic"] } +"comment.line" = { fg = "grey", modifiers = ["italic"] } +"comment.block" = { fg = "grey", modifiers = ["italic"] } +"comment.documentation" = { fg = "blue", modifiers = ["italic"] } +"keyword" = "orange" +"keyword.control" = "orange" +"keyword.operator" = "pink" +"keyword.function" = "orange" +"type" = "cyan" +"type.builtin" = "cyan" +"function" = "blue" +"function.builtin" = "pink" +"function.method" = "blue" +"variable" = "fg" +"variable.builtin" = "magenta" +"variable.parameter" = "cyan" +"string" = "green" +"string.special" = "pink" +"constant" = "fg" +"constant.builtin" = "red" +"constant.numeric" = "yellow" +"constant.character" = "pink" +"constant.boolean" = "red" +"attribute" = "magenta" +"operator" = "purple" +"tag" = { fg = "purple", modifiers = ["bold"] } +"tag.special" = { fg = "orange", modifiers = ["bold"] } +"namespace" = "purple" +"macro" = "orange" +"label" = "red" + +# Interface specific +"ui.cursorline.primary" = { bg = "bgHighlight" } +"ui.cursorline.secondary" = { bg = "bgAlt" } +"ui.cursorcolumn.primary" = { bg = "bgHighlight" } +"ui.cursorcolumn.secondary" = { bg = "bgAlt" } +"ui.statusline.normal" = { fg = "fg", bg = "bg" } +"ui.statusline.insert" = { fg = "green", bg = "bg" } +"ui.statusline.select" = { fg = "blue", bg = "bg" } +"ui.statusline.command" = { fg = "red", bg = "bg" } +"ui.statusline.visual" = { fg = "purple", bg = "bg" } + +# Diagnostic styles +"warning" = { fg = "yellow", modifiers = ["bold"] } +"error" = { fg = "red", modifiers = ["bold"] } +"info" = { fg = "cyan", modifiers = ["bold"] } +"hint" = { fg = "blue", modifiers = ["bold"] } +"diagnostic.error" = { fg = "red" } +"diagnostic.warning" = { fg = "yellow" } +"diagnostic.info" = { fg = "cyan" } +"diagnostic.hint" = { fg = "blue" } + +# Popups and Menus +"ui.popup" = { fg = "fg", bg = "bg" } +"ui.popup.info" = { fg = "cyan", bg = "bgAlt" } +"ui.menu" = { fg = "fg", bg = "bg" } +"ui.menu.selected" = { fg = "bg", bg = "fg" } + +# Additional overrides +"ui.virtual.whitespace" = "grey" +"ui.virtual.indent-guide" = { fg = "grey", style = "dotted" } + +[palette] +bg = "#16181a" +fg = "#ffffff" +grey = "#7b8496" +blue = "#5ea1ff" +green = "#5eff6c" +cyan = "#5ef1ff" +red = "#ff6e5e" +yellow = "#f1ff5e" +magenta = "#ff5ef1" +pink = "#ff5ea0" +orange = "#ffbd5e" +purple = "#bd5eff" +bgAlt = "#1e2124" +bgHighlight = "#3c4048" From 03251adb7ac5c29867f0658c613599af329cf917 Mon Sep 17 00:00:00 2001 From: Brandon Reid Date: Sat, 4 May 2024 00:57:42 +0200 Subject: [PATCH 17/18] feat(gitui): Basic theme setup for gitui (#36) Co-authored-by: Brandon Reid --- extras/gitui/theme.ron | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 extras/gitui/theme.ron diff --git a/extras/gitui/theme.ron b/extras/gitui/theme.ron new file mode 100644 index 0000000..9df130c --- /dev/null +++ b/extras/gitui/theme.ron @@ -0,0 +1,23 @@ +( + selected_tab: Rgb(5, 241, 255), // bright cyan for highlight + command_fg: Rgb(255, 255, 255), // white for commands foreground + selection_bg: Rgb(60, 64, 72), // darker grey for selection background + selection_fg: Rgb(255, 255, 255), // white for selected text + cmdbar_bg: Rgb(22, 24, 26), // very dark grey almost black for command bar background + cmdbar_extra_lines_bg: Rgb(22, 24, 26), // very dark grey almost black for extra lines in command bar + disabled_fg: Rgb(128, 135, 162), // a soft grey for disabled elements, adjusted to fit the theme + diff_line_add: Rgb(94, 255, 108), // vibrant green for added lines + diff_line_delete: Rgb(255, 110, 94), // vibrant red for deleted lines + diff_file_added: Rgb(241, 255, 94), // yellow for added files + diff_file_removed: Rgb(237, 135, 150), // light red for removed files + diff_file_moved: Rgb(189, 94, 255), // purple for moved files + diff_file_modified: Rgb(94, 161, 255), // blue for modified files + commit_hash: Rgb(183, 189, 248), // light purplish for commit hashes + commit_time: Rgb(184, 192, 224), // greyish blue for commit time + commit_author: Rgb(125, 196, 228), // soft blue for author + danger_fg: Rgb(255, 110, 94), // vibrant red for danger + push_gauge_bg: Rgb(138, 173, 244), // soft blue for push gauge background + push_gauge_fg: Rgb(36, 39, 58), // dark blue for push gauge foreground + tag_fg: Rgb(244, 219, 214), // light pastel pink for tags + branch_fg: Rgb(139, 213, 202) // soft turquoise for branches +) From 61b2a27784bbaaa3c5a7783d951b8743164fb070 Mon Sep 17 00:00:00 2001 From: Scott McKendry <39483124+scottmckendry@users.noreply.github.com> Date: Sat, 4 May 2024 16:29:06 +1200 Subject: [PATCH 18/18] feat(extras): auto-generate extras (#37) * add helper functions for auto-generating extras * add alacritty template * small refactor + bug fixes * add wezterm extra * add lazygit extra * add gitui extra * add helix extra * add tilux extra * add textmate extra * add pywal extra * add windows terminal extra * add fish extra * add autogen workflow * move workflow to correct dir * delete extras ahead of auto generation * chore: generate extras --------- Co-authored-by: scottmckendry --- .github/workflows/extras.yml | 24 + .../cyberdream.toml} | 2 +- extras/fish/cyberdream.theme | 22 +- extras/gitui/{theme.ron => cyberdream.ron} | 20 +- extras/helix/cyberdream.toml | 1 + .../{lazygit.yml => lazygit/cyberdream.yml} | 1 + .../cyberdream.json} | 0 extras/{ => textmate}/cyberdream.tmTheme | 0 extras/{ => tilix}/cyberdream.json | 6 +- .../{wezterm.lua => wezterm/cyberdream.lua} | 3 +- .../cyberdream.json} | 2 +- lua/cyberdream/extra/alacritty.lua | 68 ++ lua/cyberdream/extra/fish.lua | 64 ++ lua/cyberdream/extra/gitui.lua | 66 ++ lua/cyberdream/extra/helix.lua | 102 ++ lua/cyberdream/extra/init.lua | 51 + lua/cyberdream/extra/lazygit.lua | 38 + lua/cyberdream/extra/pywal.lua | 42 + lua/cyberdream/extra/textmate.lua | 952 ++++++++++++++++++ lua/cyberdream/extra/tilix.lua | 49 + lua/cyberdream/extra/wezterm.lua | 34 + lua/cyberdream/extra/windowsterminal.lua | 38 + lua/cyberdream/util.lua | 8 + 23 files changed, 1566 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/extras.yml rename extras/{alacritty_cyberdream.toml => alacritty/cyberdream.toml} (94%) rename extras/gitui/{theme.ron => cyberdream.ron} (56%) rename extras/{lazygit.yml => lazygit/cyberdream.yml} (95%) rename extras/{pywal-theme.json => pywal/cyberdream.json} (100%) rename extras/{ => textmate}/cyberdream.tmTheme (100%) rename extras/{ => tilix}/cyberdream.json (89%) rename extras/{wezterm.lua => wezterm/cyberdream.lua} (89%) rename extras/{windows_terminal.json => windowsterminal/cyberdream.json} (94%) create mode 100644 lua/cyberdream/extra/alacritty.lua create mode 100644 lua/cyberdream/extra/fish.lua create mode 100644 lua/cyberdream/extra/gitui.lua create mode 100644 lua/cyberdream/extra/helix.lua create mode 100644 lua/cyberdream/extra/init.lua create mode 100644 lua/cyberdream/extra/lazygit.lua create mode 100644 lua/cyberdream/extra/pywal.lua create mode 100644 lua/cyberdream/extra/textmate.lua create mode 100644 lua/cyberdream/extra/tilix.lua create mode 100644 lua/cyberdream/extra/wezterm.lua create mode 100644 lua/cyberdream/extra/windowsterminal.lua diff --git a/.github/workflows/extras.yml b/.github/workflows/extras.yml new file mode 100644 index 0000000..0cceb77 --- /dev/null +++ b/.github/workflows/extras.yml @@ -0,0 +1,24 @@ +name: Generate Extras +on: + push: + +jobs: + generate-extras: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Install Neovim + uses: rhysd/action-setup-vim@v1 + with: + neovim: true + version: stable + + - name: Generate Extras + run: | + nvim -u NONE -E -R --headless --cmd "set rtp^=." --cmd "lua require('cyberdream.extra').generate_all_extras()" --cmd qa + + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: "chore: generate extras" diff --git a/extras/alacritty_cyberdream.toml b/extras/alacritty/cyberdream.toml similarity index 94% rename from extras/alacritty_cyberdream.toml rename to extras/alacritty/cyberdream.toml index 0c7b0e1..483299a 100644 --- a/extras/alacritty_cyberdream.toml +++ b/extras/alacritty/cyberdream.toml @@ -1,4 +1,4 @@ -# cyberdream theme for Alacritty +# cyberdream theme for alacritty [[colors.indexed_colors]] color = "0xffbd5e" index = 16 diff --git a/extras/fish/cyberdream.theme b/extras/fish/cyberdream.theme index f5d453b..a76d50d 100644 --- a/extras/fish/cyberdream.theme +++ b/extras/fish/cyberdream.theme @@ -1,30 +1,30 @@ # name: 'cyberdream' # url: 'https://github.com/scottmckendry/cyberdream.nvim' -# preferred_background: 16181A +# preferred_background: 16181a fish_color_normal ffffff -fish_color_command 52cfff -fish_color_param f2cdcd +fish_color_command 5ef1ff +fish_color_param ffaecf fish_color_keyword 5eff6c fish_color_quote f1ff5e fish_color_redirection 5ea1ff fish_color_end bd5eff -fish_color_comment 7f849c +fish_color_comment 7b8496 fish_color_error ff6e5e -fish_color_gray 6c7086 +fish_color_gray 7b8496 fish_color_selection --background=3c4048 fish_color_search_match --background=3c4048 fish_color_option f1ff5e fish_color_operator 5ea1ff -fish_color_escape eba0ac -fish_color_autosuggestion 6c7086 +fish_color_escape ffaecf +fish_color_autosuggestion 7b8496 fish_color_cancel ff6e5e -fish_color_cwd f9e2af -fish_color_user 94e2d5 +fish_color_cwd ffbd5e +fish_color_user 5ef5d2 fish_color_host 5eff6c fish_color_host_remote f1ff5e fish_color_status ff6e5e -fish_pager_color_progress 6c7086 +fish_pager_color_progress 7b8496 fish_pager_color_prefix 5ea1ff fish_pager_color_completion ffffff -fish_pager_color_description 6c7086 +fish_pager_color_description 7b8496 diff --git a/extras/gitui/theme.ron b/extras/gitui/cyberdream.ron similarity index 56% rename from extras/gitui/theme.ron rename to extras/gitui/cyberdream.ron index 9df130c..2f1fb26 100644 --- a/extras/gitui/theme.ron +++ b/extras/gitui/cyberdream.ron @@ -1,23 +1,23 @@ ( - selected_tab: Rgb(5, 241, 255), // bright cyan for highlight + selected_tab: Rgb(94, 241, 255), // bright cyan for highlight command_fg: Rgb(255, 255, 255), // white for commands foreground selection_bg: Rgb(60, 64, 72), // darker grey for selection background selection_fg: Rgb(255, 255, 255), // white for selected text cmdbar_bg: Rgb(22, 24, 26), // very dark grey almost black for command bar background cmdbar_extra_lines_bg: Rgb(22, 24, 26), // very dark grey almost black for extra lines in command bar - disabled_fg: Rgb(128, 135, 162), // a soft grey for disabled elements, adjusted to fit the theme + disabled_fg: Rgb(123, 132, 150), // a soft grey for disabled elements, adjusted to fit the theme diff_line_add: Rgb(94, 255, 108), // vibrant green for added lines diff_line_delete: Rgb(255, 110, 94), // vibrant red for deleted lines diff_file_added: Rgb(241, 255, 94), // yellow for added files - diff_file_removed: Rgb(237, 135, 150), // light red for removed files + diff_file_removed: Rgb(255, 94, 160), // light red for removed files diff_file_moved: Rgb(189, 94, 255), // purple for moved files diff_file_modified: Rgb(94, 161, 255), // blue for modified files - commit_hash: Rgb(183, 189, 248), // light purplish for commit hashes - commit_time: Rgb(184, 192, 224), // greyish blue for commit time - commit_author: Rgb(125, 196, 228), // soft blue for author + commit_hash: Rgb(222, 174, 255), // light purplish for commit hashes + commit_time: Rgb(108, 146, 202), // greyish blue for commit time + commit_author: Rgb(94, 161, 255), // soft blue for author danger_fg: Rgb(255, 110, 94), // vibrant red for danger - push_gauge_bg: Rgb(138, 173, 244), // soft blue for push gauge background - push_gauge_fg: Rgb(36, 39, 58), // dark blue for push gauge foreground - tag_fg: Rgb(244, 219, 214), // light pastel pink for tags - branch_fg: Rgb(139, 213, 202) // soft turquoise for branches + push_gauge_bg: Rgb(94, 161, 255), // soft blue for push gauge background + push_gauge_fg: Rgb(62, 97, 145), // dark blue for push gauge foreground + tag_fg: Rgb(255, 174, 207), // light pastel pink for tags + branch_fg: Rgb(94, 245, 210) // soft turquoise for branches ) diff --git a/extras/helix/cyberdream.toml b/extras/helix/cyberdream.toml index 6d4580c..5050f04 100644 --- a/extras/helix/cyberdream.toml +++ b/extras/helix/cyberdream.toml @@ -1,3 +1,4 @@ +# cyberdream theme for helix "ui.background" = "bg" "ui.text" = "fg" "ui.cursor" = { bg = "fg", fg = "bg" } diff --git a/extras/lazygit.yml b/extras/lazygit/cyberdream.yml similarity index 95% rename from extras/lazygit.yml rename to extras/lazygit/cyberdream.yml index a53f07e..b19c95f 100644 --- a/extras/lazygit.yml +++ b/extras/lazygit/cyberdream.yml @@ -1,4 +1,5 @@ # yaml-language-server: $schema=https://raw.githubusercontent.com/jesseduffield/lazygit/master/schema/config.json +# cyberdream theme for lazygit gui: border: rounded theme: diff --git a/extras/pywal-theme.json b/extras/pywal/cyberdream.json similarity index 100% rename from extras/pywal-theme.json rename to extras/pywal/cyberdream.json diff --git a/extras/cyberdream.tmTheme b/extras/textmate/cyberdream.tmTheme similarity index 100% rename from extras/cyberdream.tmTheme rename to extras/textmate/cyberdream.tmTheme diff --git a/extras/cyberdream.json b/extras/tilix/cyberdream.json similarity index 89% rename from extras/cyberdream.json rename to extras/tilix/cyberdream.json index d3bdd13..b572ea8 100644 --- a/extras/cyberdream.json +++ b/extras/tilix/cyberdream.json @@ -1,9 +1,9 @@ { "name": "cyberdream", "comment": "A high-contrast, futuristic & vibrant colourscheme", - "background-color": "#16181A ", + "background-color": "#16181a", "foreground-color": "#ffffff", - "badge-color": "#16181A ", + "badge-color": "#16181a", "bold-color": "#5ef1ff", "cursor-color": "#ffffff", "highlight-background-color": "#3c4048", @@ -18,7 +18,7 @@ "#5ef1ff", "#ffffff", "#3c4048", - "#ff6e5e", + #ff6e5e", "#5eff6c", "#f1ff5e", "#5ea1ff", diff --git a/extras/wezterm.lua b/extras/wezterm/cyberdream.lua similarity index 89% rename from extras/wezterm.lua rename to extras/wezterm/cyberdream.lua index e4e9b18..2b2e2a1 100644 --- a/extras/wezterm.lua +++ b/extras/wezterm/cyberdream.lua @@ -1,9 +1,10 @@ +-- cyberdream theme for wezterm return { foreground = "#ffffff", background = "#16181a", cursor_bg = "#ffffff", - cursor_fg = "#000000", + cursor_fg = "#16181a", cursor_border = "#ffffff", selection_fg = "#ffffff", diff --git a/extras/windows_terminal.json b/extras/windowsterminal/cyberdream.json similarity index 94% rename from extras/windows_terminal.json rename to extras/windowsterminal/cyberdream.json index 4ff0323..d713c97 100644 --- a/extras/windows_terminal.json +++ b/extras/windowsterminal/cyberdream.json @@ -1,5 +1,5 @@ { - "background": "#16181A ", + "background": "#16181a", "black": "#16181a", "blue": "#5ea1ff", "brightBlack": "#3c4048", diff --git a/lua/cyberdream/extra/alacritty.lua b/lua/cyberdream/extra/alacritty.lua new file mode 100644 index 0000000..f6569bc --- /dev/null +++ b/lua/cyberdream/extra/alacritty.lua @@ -0,0 +1,68 @@ +local colors = require("cyberdream.colors") +local util = require("cyberdream.util") + +local M = {} + +--- Format a color for use in allacritty. +--- @param hex string: The hex color to format. Must be in the format "#RRGGBB". +local function format_color(hex) + return "0x" .. string.sub(hex, 2) +end + +--- Iterate over the colors in a table and format them. +--- @param t table: The table of colors to format. +local function format_colors(t) + local formatted = {} + for k, v in pairs(t) do + formatted[k] = format_color(v) + end + return formatted +end + +--- Generate the theme for alacritty. +--- @param variant string: Variation of the colorscheme to use. +function M.generate(variant) + local t = format_colors(colors[variant]) + local template = [==[ +# cyberdream theme for alacritty +[[colors.indexed_colors]] +color = "${orange}" +index = 16 + +[[colors.indexed_colors]] +color = "${red}" +index = 17 + +[colors.bright] +black = "${bgHighlight}" +blue = "${blue}" +cyan = "${cyan}" +green = "${green}" +magenta = "${purple}" +red = "${red}" +white = "${fg}" +yellow = "${yellow}" + +[colors.normal] +black = "${bg}" +blue = "${blue}" +cyan = "${cyan}" +green = "${green}" +magenta = "${purple}" +red = "${red}" +white = "${fg}" +yellow = "${yellow}" + +[colors.primary] +background = "${bg}" +foreground = "${fg}" + +[colors.selection] +background = "${bgHighlight}" +foreground = "${fg}" +]==] + + return util.parse_extra_template(template, t) +end + +return M diff --git a/lua/cyberdream/extra/fish.lua b/lua/cyberdream/extra/fish.lua new file mode 100644 index 0000000..0856d21 --- /dev/null +++ b/lua/cyberdream/extra/fish.lua @@ -0,0 +1,64 @@ +local colors = require("cyberdream.colors") +local util = require("cyberdream.util") + +local M = {} + +--- Format a color for use in fish. +--- @param hex string: The hex color to format. Must be in the format "#RRGGBB". +local function format_color(hex) + return string.sub(hex, 2) +end + +--- Iterate over the colors in a table and format them. +--- @param t table: The table of colors to format. +local function format_colors(t) + local formatted = {} + for k, v in pairs(t) do + formatted[k] = format_color(v) + end + return formatted +end + +--- Generate the theme for fish. +--- @param variant string: Variation of the colorscheme to use. +function M.generate(variant) + local t = format_colors(colors[variant]) + t.pastel_pink = format_color(util.blend(colors[variant].fg, colors[variant].pink)) + t.turquoise = format_color(util.blend(colors[variant].green, colors[variant].cyan, 0.3)) + local template = [==[ +# name: 'cyberdream' +# url: 'https://github.com/scottmckendry/cyberdream.nvim' +# preferred_background: ${bg} + +fish_color_normal ${fg} +fish_color_command ${cyan} +fish_color_param ${pastel_pink} +fish_color_keyword ${green} +fish_color_quote ${yellow} +fish_color_redirection ${blue} +fish_color_end ${purple} +fish_color_comment ${grey} +fish_color_error ${red} +fish_color_gray ${grey} +fish_color_selection --background=${bgHighlight} +fish_color_search_match --background=${bgHighlight} +fish_color_option ${yellow} +fish_color_operator ${blue} +fish_color_escape ${pastel_pink} +fish_color_autosuggestion ${grey} +fish_color_cancel ${red} +fish_color_cwd ${orange} +fish_color_user ${turquoise} +fish_color_host ${green} +fish_color_host_remote ${yellow} +fish_color_status ${red} +fish_pager_color_progress ${grey} +fish_pager_color_prefix ${blue} +fish_pager_color_completion ${fg} +fish_pager_color_description ${grey} +]==] + + return util.parse_extra_template(template, t) +end + +return M diff --git a/lua/cyberdream/extra/gitui.lua b/lua/cyberdream/extra/gitui.lua new file mode 100644 index 0000000..2cc121b --- /dev/null +++ b/lua/cyberdream/extra/gitui.lua @@ -0,0 +1,66 @@ +local colors = require("cyberdream.colors") +local util = require("cyberdream.util") + +local M = {} + +--- Format a color for use in gitui +--- @param hex string: The hex color to formatted. Must be in the format "#RRGGBB". +local function format_color(hex) + local r = tonumber(string.sub(hex, 2, 3), 16) + local g = tonumber(string.sub(hex, 4, 5), 16) + local b = tonumber(string.sub(hex, 6, 7), 16) + + return string.format("%d, %d, %d", r, g, b) +end + +--- Iterate over the colors in a table and format them. +--- @param t table: The table of colors to formaunformatted. +local function format_colors(t) + local formatted = {} + for k, v in pairs(t) do + formatted[k] = format_color(v) + end + return formatted +end + +--- Generate the theme for gitui +--- @param variant string: Variation of the colorscheme to use. +function M.generate(variant) + local unformatted = colors[variant] + unformatted.light_purple = util.blend(unformatted.fg, unformatted.purple) + unformatted.grey_blue = util.blend(unformatted.grey, unformatted.blue) + unformatted.dark_blue = util.blend(unformatted.bgAlt, unformatted.blue) + unformatted.pastel_pink = util.blend(unformatted.fg, unformatted.pink) + unformatted.turquoise = util.blend(unformatted.green, unformatted.cyan, 0.3) + + local t = format_colors(unformatted) + local template = [==[ +( + selected_tab: Rgb(${cyan}), // bright cyan for highlight + command_fg: Rgb(${fg}), // white for commands foreground + selection_bg: Rgb(${bgHighlight}), // darker grey for selection background + selection_fg: Rgb(${fg}), // white for selected text + cmdbar_bg: Rgb(${bg}), // very dark grey almost black for command bar background + cmdbar_extra_lines_bg: Rgb(${bg}), // very dark grey almost black for extra lines in command bar + disabled_fg: Rgb(${grey}), // a soft grey for disabled elements, adjusted to fit the theme + diff_line_add: Rgb(${green}), // vibrant green for added lines + diff_line_delete: Rgb(${red}), // vibrant red for deleted lines + diff_file_added: Rgb(${yellow}), // yellow for added files + diff_file_removed: Rgb(${pink}), // light red for removed files + diff_file_moved: Rgb(${purple}), // purple for moved files + diff_file_modified: Rgb(${blue}), // blue for modified files + commit_hash: Rgb(${light_purple}), // light purplish for commit hashes + commit_time: Rgb(${grey_blue}), // greyish blue for commit time + commit_author: Rgb(${blue}), // soft blue for author + danger_fg: Rgb(${red}), // vibrant red for danger + push_gauge_bg: Rgb(${blue}), // soft blue for push gauge background + push_gauge_fg: Rgb(${dark_blue}), // dark blue for push gauge foreground + tag_fg: Rgb(${pastel_pink}), // light pastel pink for tags + branch_fg: Rgb(${turquoise}) // soft turquoise for branches +) +]==] + + return util.parse_extra_template(template, t) +end + +return M diff --git a/lua/cyberdream/extra/helix.lua b/lua/cyberdream/extra/helix.lua new file mode 100644 index 0000000..4957d41 --- /dev/null +++ b/lua/cyberdream/extra/helix.lua @@ -0,0 +1,102 @@ +local colors = require("cyberdream.colors") +local util = require("cyberdream.util") + +local M = {} + +--- Generate cyberdream theme for helix. +--- @param variant string: Variation of the colorscheme to use. +function M.generate(variant) + local template = [==[ +# cyberdream theme for helix +"ui.background" = "bg" +"ui.text" = "fg" +"ui.cursor" = { bg = "fg", fg = "bg" } +"ui.linenr" = "grey" +"ui.statusline" = { fg = "cyan" } +"ui.selection" = "green" +"ui.selection.primary" = "magenta" + +# Syntax Highlighting for Code +"comment" = { fg = "grey", modifiers = ["italic"] } +"comment.line" = { fg = "grey", modifiers = ["italic"] } +"comment.block" = { fg = "grey", modifiers = ["italic"] } +"comment.documentation" = { fg = "blue", modifiers = ["italic"] } +"keyword" = "orange" +"keyword.control" = "orange" +"keyword.operator" = "pink" +"keyword.function" = "orange" +"type" = "cyan" +"type.builtin" = "cyan" +"function" = "blue" +"function.builtin" = "pink" +"function.method" = "blue" +"variable" = "fg" +"variable.builtin" = "magenta" +"variable.parameter" = "cyan" +"string" = "green" +"string.special" = "pink" +"constant" = "fg" +"constant.builtin" = "red" +"constant.numeric" = "yellow" +"constant.character" = "pink" +"constant.boolean" = "red" +"attribute" = "magenta" +"operator" = "purple" +"tag" = { fg = "purple", modifiers = ["bold"] } +"tag.special" = { fg = "orange", modifiers = ["bold"] } +"namespace" = "purple" +"macro" = "orange" +"label" = "red" + +# Interface specific +"ui.cursorline.primary" = { bg = "bgHighlight" } +"ui.cursorline.secondary" = { bg = "bgAlt" } +"ui.cursorcolumn.primary" = { bg = "bgHighlight" } +"ui.cursorcolumn.secondary" = { bg = "bgAlt" } +"ui.statusline.normal" = { fg = "fg", bg = "bg" } +"ui.statusline.insert" = { fg = "green", bg = "bg" } +"ui.statusline.select" = { fg = "blue", bg = "bg" } +"ui.statusline.command" = { fg = "red", bg = "bg" } +"ui.statusline.visual" = { fg = "purple", bg = "bg" } + +# Diagnostic styles +"warning" = { fg = "yellow", modifiers = ["bold"] } +"error" = { fg = "red", modifiers = ["bold"] } +"info" = { fg = "cyan", modifiers = ["bold"] } +"hint" = { fg = "blue", modifiers = ["bold"] } +"diagnostic.error" = { fg = "red" } +"diagnostic.warning" = { fg = "yellow" } +"diagnostic.info" = { fg = "cyan" } +"diagnostic.hint" = { fg = "blue" } + +# Popups and Menus +"ui.popup" = { fg = "fg", bg = "bg" } +"ui.popup.info" = { fg = "cyan", bg = "bgAlt" } +"ui.menu" = { fg = "fg", bg = "bg" } +"ui.menu.selected" = { fg = "bg", bg = "fg" } + +# Additional overrides +"ui.virtual.whitespace" = "grey" +"ui.virtual.indent-guide" = { fg = "grey", style = "dotted" } + +[palette] +bg = "${bg}" +fg = "${fg}" +grey = "${grey}" +blue = "${blue}" +green = "${green}" +cyan = "${cyan}" +red = "${red}" +yellow = "${yellow}" +magenta = "${magenta}" +pink = "${pink}" +orange = "${orange}" +purple = "${purple}" +bgAlt = "${bgAlt}" +bgHighlight = "${bgHighlight}" +]==] + + return util.parse_extra_template(template, colors[variant]) +end + +return M diff --git a/lua/cyberdream/extra/init.lua b/lua/cyberdream/extra/init.lua new file mode 100644 index 0000000..67356f5 --- /dev/null +++ b/lua/cyberdream/extra/init.lua @@ -0,0 +1,51 @@ +local M = {} + +M.variants = { default = "default" } + +M.extras = { + alacritty = { extension = "toml", name = "alacritty" }, + fish = { extension = "theme", name = "fish" }, + gitui = { extension = "ron", name = "gitui" }, + helix = { extension = "toml", name = "helix" }, + lazygit = { extension = "yml", name = "lazygit" }, + pywal = { extension = "json", name = "pywal" }, + textmate = { extension = "tmTheme", name = "textmate" }, + tilix = { extension = "json", name = "tilix" }, + wezterm = { extension = "lua", name = "wezterm" }, + windowsterminal = { extension = "json", name = "windowsterminal" }, +} + +--- Create/overwrite a file in the extras directory. +--- @param str string: The string to write to the file. +local function write(str, filename) + print("writing extra: extras/" .. filename) + vim.fn.mkdir(vim.fs.dirname("extras/" .. filename), "p") + local file = io.open("extras/" .. filename, "w") + if file then + file:write(str) + file:close() + else + print("Failed to write to file: extras/" .. filename) + end +end + +--- Generate the extras for a given variant. +--- @param variant string: Variation of the colorscheme to use. Defaults to "default". +local function generate_extras(variant) + local suffix = variant == "default" and "" or "-" .. variant + + for name, extra in pairs(M.extras) do + local extra_module = require("cyberdream.extra." .. name) + local str = extra_module.generate(variant) + write(str, extra.name .. "/" .. "cyberdream" .. suffix .. "." .. extra.extension) + end +end + +--- Generate Extras for all styles. +function M.generate_all_extras() + for variant, _ in pairs(M.variants) do + generate_extras(variant) + end +end + +return M diff --git a/lua/cyberdream/extra/lazygit.lua b/lua/cyberdream/extra/lazygit.lua new file mode 100644 index 0000000..de238fa --- /dev/null +++ b/lua/cyberdream/extra/lazygit.lua @@ -0,0 +1,38 @@ +local colors = require("cyberdream.colors") +local util = require("cyberdream.util") + +local M = {} + +--- Generate the theme for lazygit +--- @param variant string: Variation of the colorscheme to use. +function M.generate(variant) + local template = [==[ +# yaml-language-server: $schema=https://raw.githubusercontent.com/jesseduffield/lazygit/master/schema/config.json +# cyberdream theme for lazygit +gui: + border: rounded + theme: + activeBorderColor: + - "${cyan}" + inactiveBorderColor: + - "${grey}" + searchingActiveBorderColor: + - "${magenta}" + optionsTextColor: + - "${bgHighlight}" + selectedLineBgColor: + - "${bgHighlight}" + cherryPickedCommitBgColor: + - "${bgHighlight}" + cherryPickedCommitFgColor: + - "${pink}" + unstagedChangesColor: + - "${orange}" + defaultFgColor: + - "${fg}" +]==] + + return util.parse_extra_template(template, colors[variant]) +end + +return M diff --git a/lua/cyberdream/extra/pywal.lua b/lua/cyberdream/extra/pywal.lua new file mode 100644 index 0000000..807fb46 --- /dev/null +++ b/lua/cyberdream/extra/pywal.lua @@ -0,0 +1,42 @@ +local colors = require("cyberdream.colors") +local util = require("cyberdream.util") + +local M = {} + +--- Generate cyberdream theme for pywal. +--- @param variant string: Variation of the colorscheme to use. +function M.generate(variant) + local template = [==[ +{ + "colors": { + "color0": "${bg}", + "color1": "${red}", + "color2": "${green}", + "color3": "${yellow}", + "color4": "${blue}", + "color5": "${purple}", + "color6": "${cyan}", + "color7": "${fg}", + "color8": "${bgHighlight}", + "color9": "${red}", + "color10": "${green}", + "color11": "${yellow}", + "color12": "${blue}", + "color13": "${purple}", + "color14": "${cyan}", + "color15": "${fg}", + "color16": "${orange}", + "color17": "${red}" + }, + "special": { + "foreground": "${fg}", + "background": "${bg}", + "cursor": "${fg}" + } +} +]==] + + return util.parse_extra_template(template, colors[variant]) +end + +return M diff --git a/lua/cyberdream/extra/textmate.lua b/lua/cyberdream/extra/textmate.lua new file mode 100644 index 0000000..fe753af --- /dev/null +++ b/lua/cyberdream/extra/textmate.lua @@ -0,0 +1,952 @@ +local colors = require("cyberdream.colors") +local util = require("cyberdream.util") + +local M = {} + +--- Generate cyberdream theme for textmate. +--- @param variant string: Variation of the colorscheme to use. +function M.generate(variant) + local template = [==[ + + + + + name + Cyberdream + settings + + + settings + + background + ${bg} + caret + ${fg} + block_caret + ${grey} + foreground + ${fg} + invisibles + ${bg} + lineHighlight + ${bgHighlight} + selection + ${bgHighlight} + findHighlight + ${cyan} + findHighlightForeground + ${bgAlt} + selectionBorder + ${bg} + activeGuide + ${orange} + bracketsForeground + ${pink} + bracketsOptions + underline + bracketContentsForeground + ${fg} + bracketContentsOptions + underline + tagsOptions + stippled_underline + + + + name + Comment + scope + comment + settings + + foreground + ${grey} + fontStyle + + + + + name + String + scope + string + settings + + foreground + ${green} + + + + name + Number + scope + constant.numeric + settings + + foreground + ${fg} + + + + name + Built-in constant + scope + constant.language + settings + + foreground + ${fg} + + + + name + User-defined constant + scope + constant.character, constant.other + settings + + foreground + ${fg} + + + + name + Variable + scope + variable + settings + + fontStyle + + + + + name + Ruby's @variable + scope + variable.other.readwrite.instance + settings + + fontStyle + + foreground + ${orange} + + + + name + String interpolation + scope + constant.character.escaped, constant.character.escape, string source, string source.ruby + settings + + fontStyle + + foreground + #ff5ef1 + + + + name + Ruby Regexp + scope + source.ruby string.regexp.classic.ruby,source.ruby string.regexp.mod-r.ruby + settings + + fontStyle + + foreground + #ff6e5e + + + + name + Keyword + scope + keyword + settings + + foreground + ${orange} + + + + name + Keyword Operator + scope + keyword.operator + settings + + foreground + ${purple} + + + + name + Storage + scope + storage + settings + + fontStyle + + foreground + ${pink} + + + + name + Storage type + scope + storage.type + settings + + fontStyle + italic + foreground + ${cyan} + + + + name + Storage Type Namespace + scope + storage.type.namespace + settings + + fontStyle + italic + foreground + ${purple} + + + + name + Storage Type Class + scope + storage.type.class + settings + + fontStyle + italic + foreground + ${purple} + + + + name + Class name + scope + entity.name.class + settings + + fontStyle + underline + foreground + ${purple} + + + + name + Meta Path + scope + meta.path + settings + + fontStyle + underline + foreground + ${cyan} + + + + name + Inherited class + scope + entity.other.inherited-class + settings + + fontStyle + italic underline + foreground + ${purple} + + + + name + Function name + scope + entity.name.function + settings + + fontStyle + + foreground + ${blue} + + + + name + Function argument + scope + variable.parameter + settings + + fontStyle + italic + foreground + ${purple} + + + + name + Tag name + scope + entity.name.tag + settings + + fontStyle + + foreground + ${cyan} + + + + name + Tag attribute + scope + entity.other.attribute-name + settings + + fontStyle + + foreground + ${cyan} + + + + name + Library function + scope + support.function + settings + + fontStyle + + foreground + ${blue} + + + + name + Library constant + scope + support.constant + settings + + fontStyle + + foreground + ${fg} + + + + name + Library class/type + scope + support.type, support.class + settings + + fontStyle + italic + foreground + ${purple} + + + + name + Library variable + scope + support.other.variable + settings + + fontStyle + + + + + name + Support Other Namespace + scope + support.other.namespace + settings + + fontStyle + italic + foreground + ${purple} + + + + name + Invalid + scope + invalid + settings + + background + ${pink} + fontStyle + + foreground + ${fg} + + + + name + Invalid deprecated + scope + invalid.deprecated + settings + + background + ${purple} + foreground + ${fg} + + + + name + JSON String + scope + meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + ${fg} + + + + name + diff.header + scope + meta.diff, meta.diff.header + settings + + foreground + ${grey} + + + + name + diff.deleted + scope + markup.deleted + settings + + foreground + #ff6e5e + + + + name + diff.inserted + scope + markup.inserted + settings + + foreground + ${green} + + + + name + diff.changed + scope + markup.changed + settings + + foreground + ${cyan} + + + + scope + constant.numeric.line-number.find-in-files - match + settings + + foreground + #ff5ef1 + + + + scope + entity.name.filename + settings + + foreground + ${green} + + + + scope + message.error + settings + + foreground + #ff6e5e + + + + name + JSON Punctuation + scope + punctuation.definition.string.begin.json - meta.structure.dictionary.value.json, punctuation.definition.string.end.json - meta.structure.dictionary.value.json + settings + + foreground + ${fg} + + + + name + JSON Structure + scope + meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + ${fg} + + + + name + JSON String + scope + meta.structure.dictionary.value.json string.quoted.double.json + settings + + foreground + ${fg} + + + + name + JSON: 6 deep + scope + meta meta meta meta meta meta meta.structure.dictionary.value string + settings + + foreground + ${pink} + + + + name + JSON: 5 deep + scope + meta meta meta meta meta meta.structure.dictionary.value string + settings + + foreground + #ff5ef1 + + + + name + JSON: 4 deep + scope + meta meta meta meta meta.structure.dictionary.value string + settings + + foreground + ${purple} + + + + name + JSON: 3 deep + scope + meta meta meta meta.structure.dictionary.value string + settings + + foreground + ${blue} + + + + name + JSON: 2 deep + scope + meta meta meta.structure.dictionary.value string + settings + + foreground + ${cyan} + + + + name + JSON: 1 deep + scope + meta meta.structure.dictionary.value string + settings + + foreground + ${orange} + + + + + + name + Markup: strike + scope + markup.strike + settings + + fontStyle + italic + foreground + ${orange} + + + + name + Markup: bold + scope + markup.bold + settings + + fontStyle + bold + foreground + ${orange} + + + + name + Markup: italic + scope + markup.italic + settings + + fontStyle + italic + foreground + ${orange} + + + + name + Markdown: heading + scope + markup.heading + settings + + foreground + ${orange} + + + + name + Markdown: List Items Punctuation + scope + punctuation.definition.list_item.markdown + settings + + foreground + ${pink} + + + + name + Markdown: Blockquote + scope + markup.quote + settings + + fontStyle + italic + foreground + ${fg} + + + + name + Markdown: Blockquote Punctuation + scope + punctuation.definition.blockquote.markdown + settings + + fontStyle + italic + foreground + ${fg} + + + + name + Markdown: Separator + scope + meta.separator + settings + + foreground + ${grey} + + + + name + Markup: raw inline + scope + text.html.markdown markup.raw.inline + settings + + foreground + ${green} + + + + name + Markup: underline + scope + markup.underline + settings + + fontStyle + underline + foreground + ${purple} + + + + name + Markup: Raw block + scope + markup.raw.block + settings + + foreground + ${fg} + + + + name + Markdown: Raw Block fenced source + scope + markup.raw.block.fenced.markdown source + settings + + foreground + ${fg} + + + + name + Markdown: Fenced Bode Block + scope + punctuation.definition.fenced.markdown, variable.language.fenced.markdown + settings + + fontStyle + italic + foreground + ${grey} + + + + name + Markdown: Fenced Language + scope + variable.language.fenced.markdown + settings + + fontStyle + italic + foreground + ${grey} + + + + name + Punctuation Accessor + scope + punctuation.accessor + settings + + foreground + ${pink} + + + + name + Meta Function Return Type + scope + meta.function.return-type + settings + + foreground + ${purple} + + + + name + Punctuation Section Block Begin + scope + punctuation.section.block.begin + settings + + foreground + ${fg} + + + + name + Punctuation Section Block End + scope + punctuation.section.block.end + settings + + foreground + ${fg} + + + + name + Punctuation Section Embedded Begin + scope + punctuation.section.embedded.begin + settings + + foreground + ${pink} + + + + name + Punctuation Section Embedded End + scope + punctuation.section.embedded.end + settings + + foreground + ${pink} + + + + name + Punctuation Separator Namespace + scope + punctuation.separator.namespace + settings + + foreground + ${pink} + + + + name + Variable Function + scope + variable.function + settings + + foreground + ${blue} + + + + name + Variable Other + scope + variable.other + settings + + foreground + ${fg} + + + + name + Variable Language + scope + variable.language + settings + + foreground + ${purple} + + + + name + Entity Name Module Ruby + scope + entity.name.module.ruby + settings + + foreground + ${cyan} + + + + name + Entity Name Constant Ruby + scope + entity.name.constant.ruby + settings + + foreground + ${blue} + + + + name + Support Function Builtin Ruby + scope + support.function.builtin.ruby + settings + + foreground + ${fg} + + + + name + Storage Type Namespace CS + scope + storage.type.namespace.cs + settings + + foreground + ${pink} + + + + name + Entity Name Namespace CS + scope + entity.name.namespace.cs + settings + + foreground + ${cyan} + + + + uuid + 68394a4e-1404-4971-bdfc-81dd7f9d29f6 + colorSpaceName + sRGB + semanticClass + theme.cyberdream + author + Scott McKendry + + +]==] + + return util.parse_extra_template(template, colors[variant]) +end + +return M diff --git a/lua/cyberdream/extra/tilix.lua b/lua/cyberdream/extra/tilix.lua new file mode 100644 index 0000000..5ac22d1 --- /dev/null +++ b/lua/cyberdream/extra/tilix.lua @@ -0,0 +1,49 @@ +local colors = require("cyberdream.colors") +local util = require("cyberdream.util") + +local M = {} + +--- Generate cyberdream theme for tilix. +--- @param variant string: Variation of the colorscheme to use. +function M.generate(variant) + local template = [==[ +{ + "name": "cyberdream", + "comment": "A high-contrast, futuristic & vibrant colourscheme", + "background-color": "${bg}", + "foreground-color": "${fg}", + "badge-color": "${bg}", + "bold-color": "${cyan}", + "cursor-color": "${fg}", + "highlight-background-color": "${bgHighlight}", + "highlight-foreground-color": "${fg}", + "palette": [ + "${bg}", + "${red}", + "${green}", + "${yellow}", + "${blue}", + "${purple}", + "${cyan}", + "${fg}", + "${bgHighlight}", + ${red}", + "${green}", + "${yellow}", + "${blue}", + "${purple}", + "${cyan}", + "${fg}" + ], + "use-badge-color": false, + "use-bold-color": false, + "use-cursor-color": true, + "use-highlight-color": true, + "use-theme-colors": false +} +]==] + + return util.parse_extra_template(template, colors[variant]) +end + +return M diff --git a/lua/cyberdream/extra/wezterm.lua b/lua/cyberdream/extra/wezterm.lua new file mode 100644 index 0000000..bad11eb --- /dev/null +++ b/lua/cyberdream/extra/wezterm.lua @@ -0,0 +1,34 @@ +local colors = require("cyberdream.colors") +local util = require("cyberdream.util") + +local M = {} + +--- Generate cyberdream theme for wezterm. +--- @param variant string: Variation of the colorscheme to use. +function M.generate(variant) + local template = [==[ +-- cyberdream theme for wezterm +return { + foreground = "${fg}", + background = "${bg}", + + cursor_bg = "${fg}", + cursor_fg = "${bg}", + cursor_border = "${fg}", + + selection_fg = "${fg}", + selection_bg = "${bgHighlight}", + + scrollbar_thumb = "${bg}", + split = "${bg}", + + ansi = { "${bg}", "${red}", "${green}", "${yellow}", "${blue}", "${purple}", "${cyan}", "${fg}" }, + brights = { "${bgHighlight}", "${red}", "${green}", "${yellow}", "${blue}", "${purple}", "${cyan}", "${fg}" }, + indexed = { [16] = "${orange}", [17] = "${red}" }, +} +]==] + + return util.parse_extra_template(template, colors[variant]) +end + +return M diff --git a/lua/cyberdream/extra/windowsterminal.lua b/lua/cyberdream/extra/windowsterminal.lua new file mode 100644 index 0000000..f9c1248 --- /dev/null +++ b/lua/cyberdream/extra/windowsterminal.lua @@ -0,0 +1,38 @@ +local colors = require("cyberdream.colors") +local util = require("cyberdream.util") + +local M = {} + +--- Generate cyberdream theme for windows terminal. +--- @param variant string: Variation of the colorscheme to use. +function M.generate(variant) + local template = [==[ +{ + "background": "${bg}", + "black": "${bg}", + "blue": "${blue}", + "brightBlack": "${bgHighlight}", + "brightBlue": "${blue}", + "brightCyan": "${cyan}", + "brightGreen": "${green}", + "brightPurple": "${purple}", + "brightRed": "${red}", + "brightWhite": "${fg}", + "brightYellow": "${yellow}", + "cursorColor": "${fg}", + "cyan": "${cyan}", + "foreground": "${fg}", + "green": "${green}", + "name": "cyberdream", + "purple": "${purple}", + "red": "${red}", + "selectionBackground": "${bgHighlight}", + "white": "${fg}", + "yellow": "${yellow}" +} +]==] + + return util.parse_extra_template(template, colors[variant]) +end + +return M diff --git a/lua/cyberdream/util.lua b/lua/cyberdream/util.lua index 4846cc2..7b01f09 100644 --- a/lua/cyberdream/util.lua +++ b/lua/cyberdream/util.lua @@ -64,4 +64,12 @@ function M.blend(color1, color2, weight) return string.format("#%02x%02x%02x", rgb_blended[1], rgb_blended[2], rgb_blended[3]) end +function M.parse_extra_template(template, t) + for k, v in pairs(t) do + template = template:gsub("%${" .. k .. "}", v) + end + + return template +end + return M