From 82fe04d44fcb0384cabaa430ae952ecd5dbce60c Mon Sep 17 00:00:00 2001 From: Abdulkaiz Khatri <24286590+ful1e5@users.noreply.github.com> Date: Sat, 2 Dec 2023 16:46:22 +0530 Subject: [PATCH] chore: Re-implemented `*_default` colorschemes related to #298 --- CHANGELOG.md | 509 +++++++++--------- README.md | 146 ++--- Usage.md | 92 ++-- .../airline/themes/github_dark_default.vim | 2 +- .../airline/themes/github_light_default.vim | 1 + colors/github_dark_default.vim | 19 +- colors/github_light_default.vim | 19 +- doc/github-nvim-theme.txt | 2 + doc/gt_changelog.txt | 23 + doc/gt_deprecated.txt | 5 - lua/github-theme/group/modules/treesitter.lua | 4 +- lua/github-theme/palette.lua | 4 +- lua/github-theme/palette/github_dark.lua | 19 +- .../palette/github_dark_colorblind.lua | 10 +- .../palette/github_dark_default.lua | 205 +++++++ .../palette/github_dark_dimmed.lua | 10 +- .../palette/github_dark_high_contrast.lua | 10 +- .../palette/github_dark_tritanopia.lua | 10 +- lua/github-theme/palette/github_light.lua | 9 +- .../palette/github_light_default.lua | 206 +++++++ lua/lualine/themes/github_dark_default.lua | 2 +- lua/lualine/themes/github_light_default.lua | 2 +- 22 files changed, 879 insertions(+), 430 deletions(-) create mode 100644 autoload/airline/themes/github_light_default.vim create mode 100644 lua/github-theme/palette/github_dark_default.lua create mode 100644 lua/github-theme/palette/github_light_default.lua diff --git a/CHANGELOG.md b/CHANGELOG.md index 469e16ae..13e5528a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,8 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### What's New? -- Implement [highlight-blend](https://neovim.io/doc/user/syntax.html#highlight-blend) feature #251 -- Added Rust lifetime highlights #289 +- Implement [highlight-blend](https://neovim.io/doc/user/syntax.html#highlight-blend) feature #251 +- Added Rust lifetime highlights #289 +- Reimplemented `*_default` colorschemes. ### Changes @@ -18,339 +19,339 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Issues Fix -- Fixed few regex-based/legacy highlight corrections (fixed #285) -- Closed #251 -- Fixed darkened sidebars when disabling `options.sidebars.disabled` +- Fixed few regex-based/legacy highlight corrections (fixed #285) +- Closed #251 +- Fixed darkened sidebars when disabling `options.sidebars.disabled` ## [v1.0.1] - 23 July 2023 ### What's New? -- Included Airline themes Fixed #20 -- CI: Get and update primer primitives automatically #253 -- Support coc-explorer highlights +- Included Airline themes Fixed #20 +- CI: Get and update primer primitives automatically #253 +- Support coc-explorer highlights ### Changes -- Enhance Current Statusline and Popup selection with blue tint -- Enhance [indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim) plugin highlights +- Enhance Current Statusline and Popup selection with blue tint +- Enhance [indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim) plugin highlights ### Issues Fix -- Fixed Interactive mode in compiled colorscheme -- #160 closed due to inactivity. -- #232 fixed with #266 -- #254 fixed -- #257 fixed -- #261 fixed -- #268 fixed -- #274 fixed -- #281 fixed +- Fixed Interactive mode in compiled colorscheme +- #160 closed due to inactivity. +- #232 fixed with #266 +- #254 fixed +- #257 fixed +- #261 fixed +- #268 fixed +- #274 fixed +- #281 fixed ## [v1.0.0] - 19 May 2023 ### Deprecation & Breaking Changes -- The Method of setting and loading colorscheme is changed. Refer to `:h github-theme.changelog-10042023` -- The `config.vim_config` and `config.default` modules are now deprecated. -- The `config.apply_configuration()` function is also deprecated. -- The `theme_style` option is removed. Use `:colorscheme` command instead. -- The module `plugins.lualine` moved to `util.lualine` and `plugins` module removed. -- Old `util` module deprecated. +- The Method of setting and loading colorscheme is changed. Refer to `:h github-theme.changelog-10042023` +- The `config.vim_config` and `config.default` modules are now deprecated. +- The `config.apply_configuration()` function is also deprecated. +- The `theme_style` option is removed. Use `:colorscheme` command instead. +- The module `plugins.lualine` moved to `util.lualine` and `plugins` module removed. +- Old `util` module deprecated. ### Configuration Deprecation and Migration -- `msg_area_style` -> Removed. -- `comment_style` -> `options.styles.comments` -- `function_style` -> `options.styles.functions` -- `keyword_style` -> `options.styles.keywords` -- `variable_style` -> `options.styles.variables` -- `transparent` -> `options.transparent` -- `hide_end_of_buffer` -> `options.hide_end_of_buffer` -- `hide_inactive_statusline` -> `options.hide_nc_statusline` -- `dark_float` -> `options.darken.floats` -- `dark_sidebar`-> `options.darken.sidebars.enable` -- `sidebars`-> `options.darken.sidebars.list` -- `colors`-> `palettes` or `specs` -- `overrides` -> `groups` -- `dev` -> use vim command `:GithubThemeInteractive` +- `msg_area_style` -> Removed. +- `comment_style` -> `options.styles.comments` +- `function_style` -> `options.styles.functions` +- `keyword_style` -> `options.styles.keywords` +- `variable_style` -> `options.styles.variables` +- `transparent` -> `options.transparent` +- `hide_end_of_buffer` -> `options.hide_end_of_buffer` +- `hide_inactive_statusline` -> `options.hide_nc_statusline` +- `dark_float` -> `options.darken.floats` +- `dark_sidebar`-> `options.darken.sidebars.enable` +- `sidebars`-> `options.darken.sidebars.list` +- `colors`-> `palettes` or `specs` +- `overrides` -> `groups` +- `dev` -> use vim command `:GithubThemeInteractive` ### New Configuration -- `options.compile_file_suffix` -> Option for setting compiled file suffix. -- `options.compile_path` -> Option for setting compile files path. -- `options.dim_inactive` -> Option for setting darker tint to non active buffers. -- `options.terminal_colors` -> Option for toggling builtin terminal highlights. -- `options.module_default` -> Option for toggling plugins highlights -- `options.modules` -> Option for individual plugins related configuration -- `options.styles.conditionals` -> Style for conditionals -- `options.styles.constants` -> Style for constants -- `options.styles.numbers` -> Style for numbers -- `options.styles.operators` -> Style for operators -- `options.styles.strings` -> Style for strings -- `options.styles.types` -> Style for types -- `options.inverse.match_paren` -> Reverse match parentheses -- `options.inverse.visual` -> Reverse visual selection -- `options.inverse.search` -> Reverse search string +- `options.compile_file_suffix` -> Option for setting compiled file suffix. +- `options.compile_path` -> Option for setting compile files path. +- `options.dim_inactive` -> Option for setting darker tint to non active buffers. +- `options.terminal_colors` -> Option for toggling builtin terminal highlights. +- `options.module_default` -> Option for toggling plugins highlights +- `options.modules` -> Option for individual plugins related configuration +- `options.styles.conditionals` -> Style for conditionals +- `options.styles.constants` -> Style for constants +- `options.styles.numbers` -> Style for numbers +- `options.styles.operators` -> Style for operators +- `options.styles.strings` -> Style for strings +- `options.styles.types` -> Style for types +- `options.inverse.match_paren` -> Reverse match parentheses +- `options.inverse.visual` -> Reverse visual selection +- `options.inverse.search` -> Reverse search string ### What's New? -- Compiling colorscheme for blazingly fast load using `:GithubThemeCompile` -- Interactive development mode using `:GithubThemeInteractive` -- `lib.deprecation` - A Deprecation library to print Deprecation Messages. -- `lib.log` - A logging library to print log Messages. -- The `config.default` module has been changed to a variable and moved inside the `config` module. -- Support [Fidget](https://github.com/j-hui/fidget.nvim) plugin highlights #202 -- Support [fzf-lua](https://github.com/ibhagwan/fzf-lua) plugin highlights #221 -- Support [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim) plugin highlights #221 -- Support [dap-ui](https://github.com/rcarriga/nvim-dap-ui) plugin highlights #207 -- Support [diffchar.vim](https://github.com/rickhowe/diffchar.vim) plugin highlights #216 +- Compiling colorscheme for blazingly fast load using `:GithubThemeCompile` +- Interactive development mode using `:GithubThemeInteractive` +- `lib.deprecation` - A Deprecation library to print Deprecation Messages. +- `lib.log` - A logging library to print log Messages. +- The `config.default` module has been changed to a variable and moved inside the `config` module. +- Support [Fidget](https://github.com/j-hui/fidget.nvim) plugin highlights #202 +- Support [fzf-lua](https://github.com/ibhagwan/fzf-lua) plugin highlights #221 +- Support [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim) plugin highlights #221 +- Support [dap-ui](https://github.com/rcarriga/nvim-dap-ui) plugin highlights #207 +- Support [diffchar.vim](https://github.com/rickhowe/diffchar.vim) plugin highlights #216 ### Issues Fix -- #157 fixed -- #160 closed due to inactivity. -- #191 closed due to inactivity. -- #193 closed with conversation. -- #201 fixed -- #209 fixed -- #213 fixed -- #218 closed due to inactivity. -- #225 closed with conversation. -- #228 fixed -- #229 closed with conversation. -- #231 fixed -- #232 closed due to inactivity. -- #233 closed with conversation. -- #235 closed with conversation. -- #238 fixed -- #239 fixed -- #241 fixed -- #243 fixed -- #244 fixed -- #246 fixed -- #247 fixed -- #249 fixed +- #157 fixed +- #160 closed due to inactivity. +- #191 closed due to inactivity. +- #193 closed with conversation. +- #201 fixed +- #209 fixed +- #213 fixed +- #218 closed due to inactivity. +- #225 closed with conversation. +- #228 fixed +- #229 closed with conversation. +- #231 fixed +- #232 closed due to inactivity. +- #233 closed with conversation. +- #235 closed with conversation. +- #238 fixed +- #239 fixed +- #241 fixed +- #243 fixed +- #244 fixed +- #246 fixed +- #247 fixed +- #249 fixed ## [v0.0.7] - 16 January 2023 ### Changes -- merged: #222 -- Fixed #214 #220 #223 #224 +- merged: #222 +- Fixed #214 #220 #223 #224 ## [v0.0.6] - 03 August 2022 ### Changes -- Terminal Themes moved to - [github-theme-contrib](https://github.com/projekt0n/github-theme-contrib) -- Terminal themes related code removed +- Terminal Themes moved to + [github-theme-contrib](https://github.com/projekt0n/github-theme-contrib) +- Terminal themes related code removed ### Added -- feat: plugin support [sindrets/diffview.nvim](https://github.com/sindrets/diffview.nvim) fixed #182 -- feat: plugin support [nvim-treesitter/nvim-treesitter-context](https://github.com/nvim-treesitter/nvim-treesitter-context) fixed #184 -- terminal-theme: foot theme added #183 -- Added `NvimTreeOpenedeFile` highlight -- feat: plugin support [echasnovski/mini.nvim](https://github.com/echasnovski/mini.nvim) -- feat: plugin support [romgrk/barbar.nvim](https://github.com/romgrk/barbar.nvim) -- docs: Breaking Change logs with `:h github-theme-changelog` +- feat: plugin support [sindrets/diffview.nvim](https://github.com/sindrets/diffview.nvim) fixed #182 +- feat: plugin support [nvim-treesitter/nvim-treesitter-context](https://github.com/nvim-treesitter/nvim-treesitter-context) fixed #184 +- terminal-theme: foot theme added #183 +- Added `NvimTreeOpenedeFile` highlight +- feat: plugin support [echasnovski/mini.nvim](https://github.com/echasnovski/mini.nvim) +- feat: plugin support [romgrk/barbar.nvim](https://github.com/romgrk/barbar.nvim) +- docs: Breaking Change logs with `:h github-theme-changelog` ### Fixes -- fixed #175 -- removed `hi clear` command from loading colorscheme fixed #181 -- removed html tags from README.md -- fixed #189 -- fixed #186 -- fixed #190 -- fixed lsp warnings and types +- fixed #175 +- removed `hi clear` command from loading colorscheme fixed #181 +- removed html tags from README.md +- fixed #189 +- fixed #186 +- fixed #190 +- fixed lsp warnings and types ## [v0.0.5] - 03 May 2022 ### Added -- refactor: color types moved to `types/palette.lua` -- chore: terminal colors -- feat: use native autocmds on nvim >=0.7 ( fixed #168 ) -- chore: tmux theme's extension changed to `.conf` from `.tmux` -- BREAKING-CHANGE: removed some colors from `colors.lua` -- refactor: implement highlight override function in `util.load` -- enhance: `overrides` function is now able to add custom highlight in `dev` mode. -- docs: about developer mode -- BREAKING-CHANGE: set lualine theme with `theme="auto"` -- terminal-theme: Xresources theme added #166 -- chore: unlink 'Visual' highlight from plugin highlights -- kitty: add cursor foreground color ( fixed #174 ) -- terminal-theme: Windows Terminal theme added #180 @mutecipher +- refactor: color types moved to `types/palette.lua` +- chore: terminal colors +- feat: use native autocmds on nvim >=0.7 ( fixed #168 ) +- chore: tmux theme's extension changed to `.conf` from `.tmux` +- BREAKING-CHANGE: removed some colors from `colors.lua` +- refactor: implement highlight override function in `util.load` +- enhance: `overrides` function is now able to add custom highlight in `dev` mode. +- docs: about developer mode +- BREAKING-CHANGE: set lualine theme with `theme="auto"` +- terminal-theme: Xresources theme added #166 +- chore: unlink 'Visual' highlight from plugin highlights +- kitty: add cursor foreground color ( fixed #174 ) +- terminal-theme: Windows Terminal theme added #180 @mutecipher ### Fixes -- tmp-fix: deleted lua queries #159 -- nvim-dev-icons colors fixed projekt0n/circles.nvim#6 -- make: tmux prefix fixed -- tmux: set `bg2` as background in 'message-style' fixed #164 -- fixed #163 -- fixed #165 -- lualine docs updated (fixed #167) -- fixed #177 -- fix: use pcall to clear autocmd silently @xiyaowong #178 -- fix: skip native_autocmds on some neovim0.7 builds -- fixed #179 +- tmp-fix: deleted lua queries #159 +- nvim-dev-icons colors fixed projekt0n/circles.nvim#6 +- make: tmux prefix fixed +- tmux: set `bg2` as background in 'message-style' fixed #164 +- fixed #163 +- fixed #165 +- lualine docs updated (fixed #167) +- fixed #177 +- fix: use pcall to clear autocmd silently @xiyaowong #178 +- fix: skip native_autocmds on some neovim0.7 builds +- fixed #179 ## [v0.0.4] - 11 January 2022 ### Added -- Github Dark ColorBlind(Beta) added 🎉 #96 -- Github Light ColorBlind(Beta) added 🎉 #96 -- Dark background color for inactive statusline and lualine -- Minimal look (`hide_inactive_statusline`) removed from lualine -- `terminal` highlight added for lualine -- Added basic [coc.nvim](https://github.com/neoclide/coc.nvim) highlights #141 -- define global in project `luarc` config file. -- Removed unnecessary defer function & highlights -- allow customizing highlight group ful1e5/onedark.nvim#91 -- refactor: Colors moved to `palette` module -- `types` module initiate -- proper color docs with `gt.ColorPalette` type -- Support `ConfigSchema` type with all modules -- refactor: config module -- feat: `githooks` init -- formatter changed `LuaFormatter`-> `StyLua` -- chore: removed unnecessary module (`hsluv.lua`) -- feat: luadoc and type added inside `util.lua` -- feat: TerminalConf type added in `types` module -- refactor: modules export & typing -- refactor: terminal themes moved 'extras' -> 'terminal' -- feat: Apply highlight's style using `types.HighlightStyle` type -- refactor: color name changed 'term_fg' -> 'fg_term' -- feat: suggest config in `vim.g` autocompletion -- feat: reuse common color in palettes -- docs: team account added in funding +- Github Dark ColorBlind(Beta) added 🎉 #96 +- Github Light ColorBlind(Beta) added 🎉 #96 +- Dark background color for inactive statusline and lualine +- Minimal look (`hide_inactive_statusline`) removed from lualine +- `terminal` highlight added for lualine +- Added basic [coc.nvim](https://github.com/neoclide/coc.nvim) highlights #141 +- define global in project `luarc` config file. +- Removed unnecessary defer function & highlights +- allow customizing highlight group ful1e5/onedark.nvim#91 +- refactor: Colors moved to `palette` module +- `types` module initiate +- proper color docs with `gt.ColorPalette` type +- Support `ConfigSchema` type with all modules +- refactor: config module +- feat: `githooks` init +- formatter changed `LuaFormatter`-> `StyLua` +- chore: removed unnecessary module (`hsluv.lua`) +- feat: luadoc and type added inside `util.lua` +- feat: TerminalConf type added in `types` module +- refactor: modules export & typing +- refactor: terminal themes moved 'extras' -> 'terminal' +- feat: Apply highlight's style using `types.HighlightStyle` type +- refactor: color name changed 'term_fg' -> 'fg_term' +- feat: suggest config in `vim.g` autocompletion +- feat: reuse common color in palettes +- docs: team account added in funding ### Fixes -- dark foreground color for visited entries in telescope.nvim -- Fix #144 - Repatch removed hop.nvim highlights -- Fix #133 - highlights of inactive tabline in lualine plugin -- inherit `eof` color from `fg_gutter` #150 -- cleanup: _getColor()_ from `util` module -- fix #156 - highlight added for `GitSignsCurrentLineBlame` -- refactor: color renamed `lsp.referenceText` -> `lsp.ref_txt` -- `TabLineSel` highlight link with `PmenuSel` -- Fixed `iterm` theme generation -- fix: lualine theme +- dark foreground color for visited entries in telescope.nvim +- Fix #144 - Repatch removed hop.nvim highlights +- Fix #133 - highlights of inactive tabline in lualine plugin +- inherit `eof` color from `fg_gutter` #150 +- cleanup: _getColor()_ from `util` module +- fix #156 - highlight added for `GitSignsCurrentLineBlame` +- refactor: color renamed `lsp.referenceText` -> `lsp.ref_txt` +- `TabLineSel` highlight link with `PmenuSel` +- Fixed `iterm` theme generation +- fix: lualine theme ## [v0.0.3] - 09 December 2021 ### Added -- Github `dark_default` theme added #15 #16 #24 -- Github `light_default` theme added #15 #16 -- Make target added for reloading kitty theme with `kitty_dark_default` & `kitty_light_default` -- Individual themes for `colorscheme` command #68 -- BREAKING-CHANGE: use **snake_case** inside config instead of ~camelCase~ -- `hide_inactive_statusline` default value is `true` -- `dark_float` default value is `false` -- feat: vim config support with "vim.g" -- lualine colors refactored inside `colors.lua` (related to #80) -- `NvimTreeIndentMarker` highlight is light #74 -- Github's default themes for `tmux` -- plugin support: nvim-compe, nvim-cmp and nvim-notify -- set `vim.o.background` while loading individual colorscheme (folke/tokyonight.nvim#102) -- enhance: assign config default value to `vim.g` variables -- re-patch: #72 -- BREAKING-CHANGE: `github` deprecated from `colorscheme` command -- `pmenu.select` color removed -- pmenu select background color with dynamic blue color -- BREAKING-CHANGE: terminal colors are renamed -- feat: set `vim.o.background` with config module (re-patch #60 #116) -- enhance: support colorschemes with fzf `Colors` command -- enhance: unlink `NvimTreeGitIgnored` from `Comment` -- refactor: global variable prefix store in `key_prefix` variable -- refactor: pass common config in `extra` module -- enhance: `StatusLine` foreground & `StatusLineNC` background colors are customizable ( related to #11 ) -- feat: vscode like lspkind highlighting inside `nvim-cmp` #137 -- enhance: highlight all lspkind list in `nvim-cmp` #137 -- Link common highlights for `diff` group +- Github `dark_default` theme added #15 #16 #24 +- Github `light_default` theme added #15 #16 +- Make target added for reloading kitty theme with `kitty_dark_default` & `kitty_light_default` +- Individual themes for `colorscheme` command #68 +- BREAKING-CHANGE: use **snake_case** inside config instead of ~camelCase~ +- `hide_inactive_statusline` default value is `true` +- `dark_float` default value is `false` +- feat: vim config support with "vim.g" +- lualine colors refactored inside `colors.lua` (related to #80) +- `NvimTreeIndentMarker` highlight is light #74 +- Github's default themes for `tmux` +- plugin support: nvim-compe, nvim-cmp and nvim-notify +- set `vim.o.background` while loading individual colorscheme (folke/tokyonight.nvim#102) +- enhance: assign config default value to `vim.g` variables +- re-patch: #72 +- BREAKING-CHANGE: `github` deprecated from `colorscheme` command +- `pmenu.select` color removed +- pmenu select background color with dynamic blue color +- BREAKING-CHANGE: terminal colors are renamed +- feat: set `vim.o.background` with config module (re-patch #60 #116) +- enhance: support colorschemes with fzf `Colors` command +- enhance: unlink `NvimTreeGitIgnored` from `Comment` +- refactor: global variable prefix store in `key_prefix` variable +- refactor: pass common config in `extra` module +- enhance: `StatusLine` foreground & `StatusLineNC` background colors are customizable ( related to #11 ) +- feat: vscode like lspkind highlighting inside `nvim-cmp` #137 +- enhance: highlight all lspkind list in `nvim-cmp` #137 +- Link common highlights for `diff` group ### Fixes -- Fixed `diff` highlight colors for `dark_default` & `light_default` -- Screenshots and docs updated #63 #16 -- #72 fixed -- #73 fixed -- #80 fixed -- #76 fixed -- `IncSearch` highlight linked with `Search` -- `Search` highlight enhanced for `transparent` mode -- `LineNr` highlight enhanced for `transparent` mode -- refactor: `git_signs` & `dev_icons` colors -- docs: removed `lua` table assignment from `vim` example (related to #89 #77) -- Linting inside `tmux.lua` -- NvimTree git highlight -- refactor: de-attach 'bg_statusline' color from lualine -- fix #83: inactive lualine colors -- enhance: inactive statusline -- load colorscheme according to `theme_style` config -- removed `search` colors force assignments from `transparent` mode #113 -- todo highlight foreground color fixed #115 -- make `CursorLine` and `CursorColumn` background highlight more visible #109 -- `qfLineNr` & `QuickFixLine` colors updated #119 -- LuaDocs: duplicate warning fixed -- missing `'` in vim config (README.md) fixed #134 -- typo inisde `theme.lua` -- missing alias fixed inside `colors.lua` -- Fix `vim.o.background` setting in config module -- Fix assign `user_config` value to `vim.g` global variables +- Fixed `diff` highlight colors for `dark_default` & `light_default` +- Screenshots and docs updated #63 #16 +- #72 fixed +- #73 fixed +- #80 fixed +- #76 fixed +- `IncSearch` highlight linked with `Search` +- `Search` highlight enhanced for `transparent` mode +- `LineNr` highlight enhanced for `transparent` mode +- refactor: `git_signs` & `dev_icons` colors +- docs: removed `lua` table assignment from `vim` example (related to #89 #77) +- Linting inside `tmux.lua` +- NvimTree git highlight +- refactor: de-attach 'bg_statusline' color from lualine +- fix #83: inactive lualine colors +- enhance: inactive statusline +- load colorscheme according to `theme_style` config +- removed `search` colors force assignments from `transparent` mode #113 +- todo highlight foreground color fixed #115 +- make `CursorLine` and `CursorColumn` background highlight more visible #109 +- `qfLineNr` & `QuickFixLine` colors updated #119 +- LuaDocs: duplicate warning fixed +- missing `'` in vim config (README.md) fixed #134 +- typo inisde `theme.lua` +- missing alias fixed inside `colors.lua` +- Fix `vim.o.background` setting in config module +- Fix assign `user_config` value to `vim.g` global variables ## [v0.0.2] - 15 September 2021 ### Added -- `folded` colors are configurable -- Plugin Support check #16 -- added iTerm colorscheme #14 -- added Konsole colorscheme #33 -- `github-theme.util.color_overrides` function support "NONE" color (fix related to #36) -- Terminal themes are structured through `extra/init.lua` -- Area for messages and cmdline with `bold` text highlight #44 -- `hideEndOfBuffer` options added. Enabling this option, will hide filler lines (~) after the end of the buffer #46 -- Custom [nvim-web-devicons](https://github.com/kyazdani42/nvim-web-devicons) colors (related to #16) -- `msgAreaStyle` config added -- `border` color added in `colors.lua` -- Set `border` colors according to `themeStyle` +- `folded` colors are configurable +- Plugin Support check #16 +- added iTerm colorscheme #14 +- added Konsole colorscheme #33 +- `github-theme.util.color_overrides` function support "NONE" color (fix related to #36) +- Terminal themes are structured through `extra/init.lua` +- Area for messages and cmdline with `bold` text highlight #44 +- `hideEndOfBuffer` options added. Enabling this option, will hide filler lines (~) after the end of the buffer #46 +- Custom [nvim-web-devicons](https://github.com/kyazdani42/nvim-web-devicons) colors (related to #16) +- `msgAreaStyle` config added +- `border` color added in `colors.lua` +- Set `border` colors according to `themeStyle` ### Fixes -- Kitty themes typo fixed #3 -- Change terminal background color to `bg` #2 -- Fold Bright background fixed #5 -- Added option to customize statusline background with `bg_statusline` #11 -- Lualine `c` section background color get dark color `bg2` -- illuminate plugin highlights fixed #10 -- Change `commentTSConstant` highlight to `c.syntax.keyword` from `c.syntax.commentConstant` -- Removed `commentConstant` color -- lualine `command` background fixed #30 -- Make window-separator(`VertSplit`) highlight bright (related to #16) -- Removed unnecessary colors from `colors.lua` -- Enhanced `TabLineSel` is barely readable foreground color fixed #35 -- Enhanced `transparent` mode background color #41 -- Add proper `Description` inside `konsole` theme (bug from #33) -- Lualine `normal` section background color set blue color #43 -- Kitty window border colors fix #47 -- refactored `lua/github-theme/config.lua` fixed #29 -- telescope.nvim highlights improved -- use `bg_visiual` color as floating window border -- use `bg` and `bg2` colors for `EndOfBuffer` `NoneText` fixed #66 +- Kitty themes typo fixed #3 +- Change terminal background color to `bg` #2 +- Fold Bright background fixed #5 +- Added option to customize statusline background with `bg_statusline` #11 +- Lualine `c` section background color get dark color `bg2` +- illuminate plugin highlights fixed #10 +- Change `commentTSConstant` highlight to `c.syntax.keyword` from `c.syntax.commentConstant` +- Removed `commentConstant` color +- lualine `command` background fixed #30 +- Make window-separator(`VertSplit`) highlight bright (related to #16) +- Removed unnecessary colors from `colors.lua` +- Enhanced `TabLineSel` is barely readable foreground color fixed #35 +- Enhanced `transparent` mode background color #41 +- Add proper `Description` inside `konsole` theme (bug from #33) +- Lualine `normal` section background color set blue color #43 +- Kitty window border colors fix #47 +- refactored `lua/github-theme/config.lua` fixed #29 +- telescope.nvim highlights improved +- use `bg_visiual` color as floating window border +- use `bg` and `bg2` colors for `EndOfBuffer` `NoneText` fixed #66 ## [v0.0.1] - 09 July 2021 ### Added -- Initial release 🎊 +- Initial release 🎊 [unreleased]: https://github.com/projekt0n/github-nvim-theme/compare/v1.0.0...main [v1.0.0]: https://github.com/projekt0n/github-nvim-theme/compare/v1.0.0...v0.0.7 diff --git a/README.md b/README.md index 8edfc0ad..c8283969 100644 --- a/README.md +++ b/README.md @@ -13,35 +13,37 @@ Subscribe to this [discussion](https://github.com/projekt0n/github-nvim-theme/discussions/198) or `:h github-theme-changelog` to receive updates on breaking changes and deprecations. -- **2023-05-14**: This theme was major refactored with changes to Neovim support and - codebase, heavily inspired by [nightfox.nvim](https://github.com/EdenEast/nightfox.nvim). - Credit goes to [EdenEast](https://github.com/EdenEast). For older Neovim versions, use the - [0.0.x](https://github.com/projekt0n/github-nvim-theme/tree/0.0.x) branch. -- **2022-08-03**: Terminal and other themes have been moved to - **[github-theme-contrib](https://github.com/projekt0n/github-theme-contrib)** - git repository and related code have been removed from this repository. +- **2023-12-02**: Reimplemented the `*_default` colorschemes, previously deprecated in the + [changelog-23042023](https://github.com/projekt0n/github-nvim-theme/discussions/198#discussioncomment-5700014) +- **2023-05-14**: This theme was major refactored with changes to Neovim support and + codebase, heavily inspired by [nightfox.nvim](https://github.com/EdenEast/nightfox.nvim). + Credit goes to [EdenEast](https://github.com/EdenEast). For older Neovim versions, use the + [0.0.x](https://github.com/projekt0n/github-nvim-theme/tree/0.0.x) branch. +- **2022-08-03**: Terminal and other themes have been moved to + **[github-theme-contrib](https://github.com/projekt0n/github-theme-contrib)** + git repository and related code have been removed from this repository. ## Features -- Supports the latest Neovim>=0.5 features like Treesitter and LSP -- Resembles GitHub's VSCode themes and follows [primer design guidelines](https://primer.style/primitives/storybook) -- Has Github's colorblind themes -- Support for multiple [plugins](#supported-plugins) and [status lines](#status-lines) - - And many others should 'just work'! -- Minimal inactive Vim's Default statusline -- Vim terminal colors -- Darker background for sidebar-like windows -- Highly configurable with template overriding -- Most elegant lualine theme -- [Compile](#compile) user's configuration for fast startup times -- Export [Color](#color-lib) library utility -- [Interactive](#interactive) live config re-loading +- Supports the latest Neovim>=0.5 features like Treesitter and LSP +- Resembles GitHub's VSCode themes and follows [primer design guidelines](https://primer.style/primitives/storybook) +- Has Github's colorblind themes +- Support for multiple [plugins](#supported-plugins) and [status lines](#status-lines) + - And many others should 'just work'! +- Minimal inactive Vim's Default statusline +- Vim terminal colors +- Darker background for sidebar-like windows +- Highly configurable with template overriding +- Most elegant lualine theme +- [Compile](#compile) user's configuration for fast startup times +- Export [Color](#color-lib) library utility +- [Interactive](#interactive) live config re-loading ## Requirements -- Neovim >= 0.8.0 (for older version use [0.0.x](https://github.com/projekt0n/github-nvim-theme/tree/0.0.x) branch) -- True color support -- Undercurl terminal support (optional) +- Neovim >= 0.8.0 (for older version use [0.0.x](https://github.com/projekt0n/github-nvim-theme/tree/0.0.x) branch) +- True color support +- Undercurl terminal support (optional) > **Note** > for MacOS: The default `terminal` does not support `true color`. Use either `Iterm2` or [another] terminal that supports true color. @@ -126,16 +128,16 @@ vim.cmd('colorscheme github_dark') ## Screenshots -- Font: - [Iosevka Nerd Font Mono](https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/Iosevka) -- Terminal: - [kitty](https://sw.kovidgoyal.net/kitty) -- Icon: - [nvim-web-devicons](https://github.com/kyazdani42/nvim-web-devicons) -- StatusLine: Default - ([.vimrc](https://github.com/ful1e5/dotfiles/blob/main/nvim/.config/nvim/lua/ful1e5/statusline.lua)) -- dotfiles: - [ful1e5/dotfiles/nvim](https://github.com/ful1e5/dotfiles/tree/main/nvim/.config/nvim) +- Font: + [Iosevka Nerd Font Mono](https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/Iosevka) +- Terminal: + [kitty](https://sw.kovidgoyal.net/kitty) +- Icon: + [nvim-web-devicons](https://github.com/kyazdani42/nvim-web-devicons) +- StatusLine: Default + ([.vimrc](https://github.com/ful1e5/dotfiles/blob/main/nvim/.config/nvim/lua/ful1e5/statusline.lua)) +- dotfiles: + [ful1e5/dotfiles/nvim](https://github.com/ful1e5/dotfiles/tree/main/nvim/.config/nvim) ### Github Dark @@ -145,6 +147,14 @@ vim.cmd('colorscheme github_dark') ![github_dark](https://github.com/projekt0n/github-nvim-theme/assets/24286590/0e6525ef-8444-4097-855c-c2a9257a6a2f) +### Github Dark Default + +```lua +vim.cmd('colorscheme github_dark_default') +``` + +![github_dark_default](https://github.com/projekt0n/github-nvim-theme/assets/24286590/6df16271-20bc-4fd4-90df-a7477b95f3f8) + ### Github Dark Dimmed ```lua @@ -185,6 +195,14 @@ vim.cmd('colorscheme github_light') ![github_light](https://github.com/projekt0n/github-nvim-theme/assets/24286590/11c6606a-28e4-4126-b687-c84a403bbc57) +### Github Light Default + +```lua +vim.cmd('colorscheme github_light_default') +``` + +![github_light_default](https://github.com/projekt0n/github-nvim-theme/assets/24286590/1a7483e1-b008-42e0-8fab-eeb75e89a3a7) + ### Github Light High Contrast ```lua @@ -546,37 +564,37 @@ This command will attach an autocmd to the current buffer that executes on `Buff ## Supported Plugins -- [Builtin lsp diagnostics](https://neovim.io/doc/user/lsp.html) -- [ale](https://github.com/dense-analysis/ale) -- [circles.nvim](https://github.com/projekt0n/circles.nvim) -- [coc.nvim](https://github.com/neoclide/coc.nvim) -- [dap-ui](https://github.com/rcarriga/nvim-dap-ui) -- [dashboard-nvim](https://github.com/glepnir/dashboard-nvim) -- [diffchar.vim](https://github.com/rickhowe/diffchar.vim) -- [diffview.nvim](https://github.com/sindrets/diffview.nvim) -- [fidget.nvim](https://github.com/j-hui/fidget.nvim) -- [fsread.nvim](https://github.com/nullchilly/fsread.nvim) -- [fzf-lua](https://github.com/ibhagwan/fzf-lua) -- [gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim) -- [indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim) -- [lsp-trouble.nvim](https://github.com/folke/lsp-trouble.nvim) -- [lspsaga.nvim](https://github.com/glepnir/lspsaga.nvim) -- [lualine.nvim](https://github.com/nvim-lualine/lualine.nvim) -- [mini.nvim](https://github.com/echasnovski/mini.nvim) -- [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim) -- [neogit](https://github.com/TimUntersberger/neogit) -- [nvim-bufferline.lua](https://github.com/akinsho/nvim-bufferline.lua) -- [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) -- [nvim-compe](https://github.com/hrsh7th/nvim-compe) -- [nvim-notify](https://github.com/rcarriga/nvim-notify) -- [nvim-tree.lua](https://github.com/kyazdani42/nvim-tree.lua) -- [nvim-treesitter-context](https://github.com/nvim-treesitter/nvim-treesitter-context) -- [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) -- [nvim-web-devicons](https://github.com/kyazdani42/nvim-web-devicons) -- [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) -- [vim-airline](https://github.com/vim-airline/vim-airline) -- [vim-gitgutter](https://github.com/airblade/vim-gitgutter) -- [which-key.nvim](https://github.com/folke/which-key.nvim) +- [Builtin lsp diagnostics](https://neovim.io/doc/user/lsp.html) +- [ale](https://github.com/dense-analysis/ale) +- [circles.nvim](https://github.com/projekt0n/circles.nvim) +- [coc.nvim](https://github.com/neoclide/coc.nvim) +- [dap-ui](https://github.com/rcarriga/nvim-dap-ui) +- [dashboard-nvim](https://github.com/glepnir/dashboard-nvim) +- [diffchar.vim](https://github.com/rickhowe/diffchar.vim) +- [diffview.nvim](https://github.com/sindrets/diffview.nvim) +- [fidget.nvim](https://github.com/j-hui/fidget.nvim) +- [fsread.nvim](https://github.com/nullchilly/fsread.nvim) +- [fzf-lua](https://github.com/ibhagwan/fzf-lua) +- [gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim) +- [indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim) +- [lsp-trouble.nvim](https://github.com/folke/lsp-trouble.nvim) +- [lspsaga.nvim](https://github.com/glepnir/lspsaga.nvim) +- [lualine.nvim](https://github.com/nvim-lualine/lualine.nvim) +- [mini.nvim](https://github.com/echasnovski/mini.nvim) +- [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim) +- [neogit](https://github.com/TimUntersberger/neogit) +- [nvim-bufferline.lua](https://github.com/akinsho/nvim-bufferline.lua) +- [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) +- [nvim-compe](https://github.com/hrsh7th/nvim-compe) +- [nvim-notify](https://github.com/rcarriga/nvim-notify) +- [nvim-tree.lua](https://github.com/kyazdani42/nvim-tree.lua) +- [nvim-treesitter-context](https://github.com/nvim-treesitter/nvim-treesitter-context) +- [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) +- [nvim-web-devicons](https://github.com/kyazdani42/nvim-web-devicons) +- [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) +- [vim-airline](https://github.com/vim-airline/vim-airline) +- [vim-gitgutter](https://github.com/airblade/vim-gitgutter) +- [which-key.nvim](https://github.com/folke/which-key.nvim) ## Status lines diff --git a/Usage.md b/Usage.md index 41b4f3a3..21d2f8f4 100644 --- a/Usage.md +++ b/Usage.md @@ -3,16 +3,18 @@ The Github Theme is a community-driven theme for Neovim, designed to support LSP (Language Server Protocol), Treesitter, and various plugins. It offers multiple themes, including colorblind-friendly options. Here are the available themes: -- `github_dark` -- `github_dark_colorblind` -- `github_dark_dimmed` -- `github_dark_high_contrast` -- `github_dark_tritanopia` -- `github_dimmed` -- `github_light` -- `github_light_colorblind` -- `github_light_high_contrast` -- `github_light_tritanopia` +- `github_dark` +- `github_dark_colorblind` +- `github_dark_default` +- `github_dark_dimmed` +- `github_dark_high_contrast` +- `github_dark_tritanopia` +- `github_dimmed` +- `github_light` +- `github_light_colorblind` +- `github_light_default` +- `github_light_high_contrast` +- `github_light_tritanopia` ## Usage @@ -207,16 +209,16 @@ Specifies the default value of a module that has not been overridden in the modu The `styles` table contains a list of syntax components and their corresponding styles. These styles can be any combination of |highlight-args|. The available syntax components are: -- comments -- conditionals -- constants -- functions -- keywords -- numbers -- operators -- strings -- types -- variables +- comments +- conditionals +- constants +- functions +- keywords +- numbers +- operators +- strings +- types +- variables Example: @@ -385,28 +387,28 @@ determine if the module is applied. Current list of modules are: -- cmp -- coc -- dapui -- dashboard -- diagnostic -- diffchar -- fidget -- fzf -- gitgutter -- gitsigns -- indent_blankline -- lsp_trouble -- mini -- native_lsp -- neogit -- neotree -- notify -- nvimtree -- telescope -- treesitter -- treesitter_context -- whichkey +- cmp +- coc +- dapui +- dashboard +- diagnostic +- diffchar +- fidget +- fzf +- gitgutter +- gitsigns +- indent_blankline +- lsp_trouble +- mini +- native_lsp +- neogit +- neotree +- notify +- nvimtree +- telescope +- treesitter +- treesitter_context +- whichkey ### Neovim specific modules @@ -558,9 +560,9 @@ and re-source it's config from the newly saved file. It will then reset the colo There are a few things to note: -- This requires executing `luafile` on the current file. Any syntax errors will throw errors. -- If you are using packer and have Github theme's config in a `config = function() end` block, this will not work as packer - would require to be re-compiled and the compiled file sourced. +- This requires executing `luafile` on the current file. Any syntax errors will throw errors. +- If you are using packer and have Github theme's config in a `config = function() end` block, this will not work as packer + would require to be re-compiled and the compiled file sourced. #### :GithubThemeInteractive diff --git a/autoload/airline/themes/github_dark_default.vim b/autoload/airline/themes/github_dark_default.vim index e231d954..6fa5bd62 100644 --- a/autoload/airline/themes/github_dark_default.vim +++ b/autoload/airline/themes/github_dark_default.vim @@ -1 +1 @@ -lua require('github-theme.util.airline')('github_dark_high_contrast') +lua require('github-theme.util.airline')('github_dark_default') diff --git a/autoload/airline/themes/github_light_default.vim b/autoload/airline/themes/github_light_default.vim new file mode 100644 index 00000000..b13a02e4 --- /dev/null +++ b/autoload/airline/themes/github_light_default.vim @@ -0,0 +1 @@ +lua require('github-theme.util.airline')('github_light_default') diff --git a/colors/github_dark_default.vim b/colors/github_dark_default.vim index f8f3937c..6833f7a7 100644 --- a/colors/github_dark_default.vim +++ b/colors/github_dark_default.vim @@ -1,18 +1,9 @@ lua << EOF -local dep = require('github-theme.lib.deprecation') -dep.write( - ' Colorscheme ', - { 'github_dark_default', 'WarningMsg' }, - ' has been deprecated.', - ' Use ', - { 'github_dark_high_contrast', 'WarningMsg' }, - ' Instead. Refer to ', - { ':h github-theme.changelog-23042023', 'WarningMsg' }, - ' for more info.' -) - -require('github-theme.config').set_theme('github_dark_high_contrast') -require('github-theme').load() +if vim.g.github_theme_debug then + require("github-theme.util.reload")() +end +require("github-theme.config").set_theme('github_dark_default') +require("github-theme").load() EOF diff --git a/colors/github_light_default.vim b/colors/github_light_default.vim index 86e75a51..8856f281 100644 --- a/colors/github_light_default.vim +++ b/colors/github_light_default.vim @@ -1,18 +1,9 @@ lua << EOF -local dep = require('github-theme.lib.deprecation') -dep.write( - ' Colorscheme ', - { 'github_light_default', 'WarningMsg' }, - ' has been deprecated.', - ' Use ', - { 'github_light_high_contrast', 'WarningMsg' }, - ' Instead. Refer to ', - { ':h github-theme.changelog-23042023', 'WarningMsg' }, - ' for more info.' -) - -require('github-theme.config').set_theme('github_light_high_contrast') -require('github-theme').load() +if vim.g.github_theme_debug then + require("github-theme.util.reload")() +end +require("github-theme.config").set_theme('github_light_default') +require("github-theme").load() EOF diff --git a/doc/github-nvim-theme.txt b/doc/github-nvim-theme.txt index df285ef3..72a10b12 100644 --- a/doc/github-nvim-theme.txt +++ b/doc/github-nvim-theme.txt @@ -25,12 +25,14 @@ themes: - `github_dark` - `github_dark_colorblind` +- `github_dark_default` - `github_dark_dimmed` - `github_dark_high_contrast` - `github_dark_tritanopia` - `github_dimmed` - `github_light` - `github_light_colorblind` +- `github_light_default` - `github_light_high_contrast` - `github_light_tritanopia` diff --git a/doc/gt_changelog.txt b/doc/gt_changelog.txt index ecba8c1d..18cb4606 100644 --- a/doc/gt_changelog.txt +++ b/doc/gt_changelog.txt @@ -5,6 +5,29 @@ CHANGELOGS *github-theme.changelog* + *github-theme.changelog-02122023* + +Date: December 02, 2023 + +Reimplemented the `*_default` colorschemes, previously deprecated in the +|github-theme.changelog-23042023|. + +The updated colorscheme list now includes: + +- github_dark +- github_dark_colorblind +- github_dark_default (Re-Implemented) +- github_dark_dimmed +- github_dark_high_contrast +- github_dark_tritanopia +- github_light +- github_light_colorblind +- github_light_default (Re-Implemented) +- github_light_high_contrast +- github_light_tritanopia + + + *github-theme.changelog-06052023* Date: May 06, 2023 diff --git a/doc/gt_deprecated.txt b/doc/gt_deprecated.txt index bfdc7cb7..6f298a9d 100644 --- a/doc/gt_deprecated.txt +++ b/doc/gt_deprecated.txt @@ -10,11 +10,6 @@ Deprecated features *github-theme.deprecated* COLORSCHEMES - `'github_dimmed'` Deprecated. Use |'github_dark_dimmed'| Instead. -- `'github_dark_default'` Deprecated. Use |'github_dark_high_contrast'| - Instead. -- `'github_light_default'` Deprecated. Use |'github_light_high_contrast'| - Instead. - SETUP OPTIONS diff --git a/lua/github-theme/group/modules/treesitter.lua b/lua/github-theme/group/modules/treesitter.lua index 39b36a52..75e11be0 100644 --- a/lua/github-theme/group/modules/treesitter.lua +++ b/lua/github-theme/group/modules/treesitter.lua @@ -5,7 +5,9 @@ function M.get(spec, config, opts) -- being integrated. local primitives = require( 'github-theme.palette.primitives.' - .. require('github-theme.config').theme:gsub('^github%W*', '', 1) + .. require('github-theme.config').theme + :gsub('^github_(.-)_default$', '%1') + :gsub('^github_(.-)$', '%1') ) local pl = primitives.prettylights diff --git a/lua/github-theme/palette.lua b/lua/github-theme/palette.lua index 5b00b10a..db3378f3 100644 --- a/lua/github-theme/palette.lua +++ b/lua/github-theme/palette.lua @@ -5,12 +5,14 @@ local M = {} M.themes = { 'github_dark', - 'github_dark_dimmed', 'github_dark_colorblind', + 'github_dark_default', + 'github_dark_dimmed', 'github_dark_high_contrast', 'github_dark_tritanopia', 'github_light', 'github_light_colorblind', + 'github_light_default', 'github_light_high_contrast', 'github_light_tritanopia', } diff --git a/lua/github-theme/palette/github_dark.lua b/lua/github-theme/palette/github_dark.lua index 477cffe6..8d198524 100755 --- a/lua/github-theme/palette/github_dark.lua +++ b/lua/github-theme/palette/github_dark.lua @@ -13,7 +13,7 @@ local scale = primitives.scale C.WHITE = C(scale.white) C.BLACK = C(scale.black) -C.BG = C(assert(primitives.canvas.default)) +C.BG = C(scale.gray[7]) local function alpha(color, a) return color:alpha_blend(a):to_css() @@ -42,7 +42,12 @@ local palette = { on_emphasis = scale.white, }, - canvas = primitives.canvas, + canvas = { + default = scale.gray[7], + overlay = scale.gray[9], + inset = scale.gray[8], + subtle = scale.gray[9], + }, border = { default = scale.gray[9], @@ -124,11 +129,11 @@ local palette = { local function generate_spec(pal) -- stylua: ignore start local spec = { - bg0 = alpha(C(pal.canvas.inset), 0.75), -- Dark bg (popup and float) - bg1 = pal.canvas.default, -- Default bg - bg2 = alpha(C(pal.neutral.emphasis), 0.1), -- Lighter bg (colorcolumn Folds) - bg3 = pal.scale.gray[6], -- Lighter bg (cursor line) - bg4 = pal.scale.gray[4], -- Conceal + bg0 = alpha(C(pal.canvas.inset), 0.75), -- Dark bg (popup and float) + bg1 = pal.canvas.default, -- Default bg + bg2 = alpha(C(pal.neutral.emphasis), 0.1), -- Lighter bg (colorcolumn Folds) + bg3 = pal.scale.gray[6], -- Lighter bg (cursor line) + bg4 = pal.scale.gray[4], -- Conceal fg0 = pal.fg.subtle, -- Lighter fg fg1 = pal.fg.default, -- Default fg diff --git a/lua/github-theme/palette/github_dark_colorblind.lua b/lua/github-theme/palette/github_dark_colorblind.lua index 28a11cd8..c528f574 100644 --- a/lua/github-theme/palette/github_dark_colorblind.lua +++ b/lua/github-theme/palette/github_dark_colorblind.lua @@ -124,11 +124,11 @@ local palette = { local function generate_spec(pal) -- stylua: ignore start local spec = { - bg0 = alpha(C(pal.canvas.inset), 0.75), -- Dark bg (status line, popup and float) - bg1 = pal.canvas.default, -- Default bg - bg2 = alpha(C(pal.neutral.emphasis), 0.1), -- Lighter bg (colorcolumn Folds) - bg3 = pal.scale.gray[9], -- Lighter bg (cursor line) - bg4 = pal.scale.gray[4], -- Conceal + bg0 = alpha(C(pal.canvas.inset), 0.75), -- Dark bg (status line, popup and float) + bg1 = pal.canvas.default, -- Default bg + bg2 = alpha(C(pal.neutral.emphasis), 0.1), -- Lighter bg (colorcolumn Folds) + bg3 = pal.scale.gray[9], -- Lighter bg (cursor line) + bg4 = pal.scale.gray[4], -- Conceal fg0 = pal.fg.subtle, -- Lighter fg fg1 = pal.fg.default, -- Default fg diff --git a/lua/github-theme/palette/github_dark_default.lua b/lua/github-theme/palette/github_dark_default.lua new file mode 100644 index 00000000..93805672 --- /dev/null +++ b/lua/github-theme/palette/github_dark_default.lua @@ -0,0 +1,205 @@ +local C = require('github-theme.lib.color') + +local meta = { + name = 'github_dark_default', + light = false, +} + +local primitives = require('github-theme.palette.primitives.dark') + +local pl = primitives.prettylights +local scale = primitives.scale + +C.WHITE = C(scale.white) +C.BLACK = C(scale.black) +C.BG = C(assert(primitives.canvas.default)) + +local function alpha(color, a) + return color:alpha_blend(a):to_css() +end + +local palette = { + scale = scale, + + orange = scale.orange[4], + + black = { base = scale.gray[10], bright = scale.gray[9] }, + gray = { base = scale.gray[5], bright = scale.gray[5] }, + blue = { base = scale.blue[4], bright = scale.blue[3] }, + green = { base = scale.green[4], bright = scale.green[3] }, + magenta = { base = scale.purple[4], bright = scale.purple[3] }, + pink = { base = scale.pink[4], bright = scale.pink[3] }, + red = { base = scale.red[4], bright = scale.red[3] }, + white = { base = scale.gray[3], bright = scale.gray[3] }, + yellow = { base = scale.yellow[4], bright = scale.yellow[3] }, + cyan = { base = '#76e3ea', bright = '#b3f0ff' }, + + fg = { + default = '#e6edf3', + muted = '#7d8590', + subtle = scale.gray[5], + on_emphasis = scale.white, + }, + + canvas = primitives.canvas, + + border = { + default = scale.gray[9], + muted = scale.gray[8], + subtle = alpha(C.from_rgba(240, 246, 252, 1), 0.1), + }, + + neutral = { + emphasis_plus = scale.gray[5], + emphasis = scale.gray[5], + muted = alpha(C.from_rgba(110, 118, 129, 1), 0.4), + subtle = alpha(C.from_rgba(110, 118, 129, 1), 0.1), + }, + + accent = { + fg = '#2f81f7', + emphasis = scale.blue[6], + muted = alpha(C.from_rgba(56, 139, 253, 1), 0.4), + subtle = alpha(C.from_rgba(56, 139, 253, 1), 0.15), + }, + + success = { + fg = scale.green[4], + emphasis = scale.green[6], + muted = alpha(C.from_rgba(46, 160, 67, 1), 0.4), + subtle = alpha(C.from_rgba(46, 160, 67, 1), 0.15), + }, + + attention = { + fg = scale.yellow[4], + emphasis = scale.yellow[6], + muted = alpha(C.from_rgba(187, 128, 9, 1), 0.4), + subtle = alpha(C.from_rgba(187, 128, 9, 1), 0.15), + }, + + severe = { + fg = scale.orange[5], + emphasis = scale.orange[6], + muted = alpha(C.from_rgba(219, 109, 40, 1), 0.4), + subtle = alpha(C.from_rgba(219, 109, 40, 1), 0.1), + }, + + danger = { + fg = scale.red[5], + emphasis = scale.red[6], + muted = alpha(C.from_rgba(248, 81, 73, 1), 0.4), + subtle = alpha(C.from_rgba(248, 81, 73, 1), 0.1), + }, + + open = { + fg = scale.green[4], + emphasis = scale.green[6], + muted = alpha(C.from_rgba(46, 160, 67, 1), 0.4), + subtle = alpha(C.from_rgba(46, 160, 67, 1), 0.15), + }, + + done = { + fg = scale.purple[5], + emphasis = scale.purple[6], + muted = alpha(C.from_rgba(163, 113, 247, 1), 0.4), + subtle = alpha(C.from_rgba(163, 113, 247, 1), 0.1), + }, + + closed = { + fg = scale.red[5], + emphasis = scale.red[6], + muted = alpha(C.from_rgba(248, 81, 73, 1), 0.4), + subtle = alpha(C.from_rgba(248, 81, 73, 1), 0.15), + }, + + sponsors = { + fg = scale.pink[5], + emphasis = scale.pink[6], + muted = alpha(C.from_rgba(219, 97, 162, 1), 0.4), + subtle = alpha(C.from_rgba(219, 97, 162, 1), 0.1), + }, +} + +local function generate_spec(pal) + -- stylua: ignore start + local spec = { + bg0 = alpha(C(pal.canvas.inset), 0.75), -- Dark bg (popup and float) + bg1 = pal.canvas.default, -- Default bg + bg2 = alpha(C(pal.neutral.emphasis), 0.1), -- Lighter bg (colorcolumn Folds) + bg3 = pal.scale.gray[6], -- Lighter bg (cursor line) + bg4 = pal.scale.gray[4], -- Conceal + + fg0 = pal.fg.subtle, -- Lighter fg + fg1 = pal.fg.default, -- Default fg + fg2 = pal.fg.muted, -- Darker fg (status line) + fg3 = pal.scale.gray[5], -- Darker fg (line numbers, fold columns) + + sel0 = alpha(C(pal.accent.fg), 0.30), -- Visual selection bg + sel1 = alpha(C(pal.accent.muted), 0.90), -- Popup sel bg + sel2 = alpha(C(pal.scale.yellow[1]), 0.20), -- Search bg + } + + spec.syntax = { + bracket = spec.fg1, -- Brackets and Punctuation + builtin0 = pl.syntax.constant, -- Builtin variable + builtin1 = pl.syntax.keyword, -- Builtin type + builtin2 = pl.syntax.constant, -- Builtin const + comment = pl.syntax.comment, -- Comment + conditional = pl.syntax.keyword, -- Conditional and loop + const = pl.syntax.constant, -- Constants, imports and booleans + dep = pal.scale.red[3], -- Deprecated + field = pl.syntax.constant, -- Field + func = pl.syntax.entity, -- Functions and Titles + ident = spec.fg1, -- Identifiers + keyword = pl.syntax.keyword, -- Keywords + number = pl.syntax.constant, -- Numbers + operator = pl.syntax.constant, -- Operators + param = spec.fg1, -- Parameters + preproc = pl.syntax.keyword, -- PreProc + regex = pl.syntax.string, -- Regex + statement = pl.syntax.keyword, -- Statements + string = pl.syntax.string, -- Strings + type = pl.syntax.variable, -- Types + tag = pl.syntax.entityTag, -- Tags + variable = spec.fg1, -- Variables + } + + spec.diag = { + error = pal.danger.fg, + warn = pal.attention.fg, + info = pal.accent.fg, + hint = pal.fg.muted, + } + + spec.diag_bg = { + error = C(spec.bg1):blend(C(spec.diag.error), 0.15):to_css(), + warn = C(spec.bg1):blend(C(spec.diag.warn), 0.15):to_css(), + info = C(spec.bg1):blend(C(spec.diag.info), 0.15):to_css(), + hint = C(spec.bg1):blend(C(spec.diag.hint), 0.15):to_css(), + } + + spec.diff = { + add = alpha(C(pal.scale.green[6]), 0.15), + delete = alpha(C(pal.scale.red[6]), 0.15), + change = alpha(C(pal.scale.yellow[6]), 0.15), + text = spec.fg0 + } + + spec.git = { + add = pal.success.fg, + removed = pal.danger.fg, + changed = pal.attention.fg, + conflict = pal.severe.fg, + ignored = pal.fg.subtle, + } + + -- stylua: ignore end + return spec +end + +return { + meta = meta, + primitives = primitives, + palette = palette, + generate_spec = generate_spec, +} diff --git a/lua/github-theme/palette/github_dark_dimmed.lua b/lua/github-theme/palette/github_dark_dimmed.lua index ccb9e34b..36d83580 100644 --- a/lua/github-theme/palette/github_dark_dimmed.lua +++ b/lua/github-theme/palette/github_dark_dimmed.lua @@ -124,11 +124,11 @@ local palette = { local function generate_spec(pal) -- stylua: ignore start local spec = { - bg0 = alpha(C(pal.canvas.inset), 0.75), -- Dark bg (popup and float) - bg1 = pal.canvas.default, -- Default bg - bg2 = alpha(C(pal.neutral.emphasis), 0.1), -- Lighter bg (colorcolumn Folds) - bg3 = alpha(C(pal.fg.default), 0.1), -- Lighter bg (cursor line) - bg4 = pal.scale.gray[4], -- Conceal + bg0 = alpha(C(pal.canvas.inset), 0.75), -- Dark bg (popup and float) + bg1 = pal.canvas.default, -- Default bg + bg2 = alpha(C(pal.neutral.emphasis), 0.1), -- Lighter bg (colorcolumn Folds) + bg3 = alpha(C(pal.fg.default), 0.1), -- Lighter bg (cursor line) + bg4 = pal.scale.gray[4], -- Conceal fg0 = pal.fg.subtle, -- Lighter fg fg1 = pal.fg.default, -- Default fg diff --git a/lua/github-theme/palette/github_dark_high_contrast.lua b/lua/github-theme/palette/github_dark_high_contrast.lua index b52ea4fe..7ee7eda1 100644 --- a/lua/github-theme/palette/github_dark_high_contrast.lua +++ b/lua/github-theme/palette/github_dark_high_contrast.lua @@ -124,11 +124,11 @@ local palette = { local function generate_spec(pal) -- stylua: ignore start local spec = { - bg0 = alpha(C(pal.canvas.inset), 0.75), -- Dark bg (popup and float) - bg1 = pal.canvas.default, -- Default bg - bg2 = alpha(C(pal.neutral.emphasis), 0.1), -- Lighter bg (colorcolumn Folds) - bg3 = alpha(C(pal.fg.default), 0.1), -- Lighter bg (cursor line) - bg4 = pal.scale.gray[4], -- Conceal + bg0 = alpha(C(pal.canvas.inset), 0.75), -- Dark bg (popup and float) + bg1 = pal.canvas.default, -- Default bg + bg2 = alpha(C(pal.neutral.emphasis), 0.1), -- Lighter bg (colorcolumn Folds) + bg3 = alpha(C(pal.fg.default), 0.1), -- Lighter bg (cursor line) + bg4 = pal.scale.gray[4], -- Conceal fg0 = pal.fg.subtle, -- Lighter fg fg1 = pal.fg.default, -- Default fg diff --git a/lua/github-theme/palette/github_dark_tritanopia.lua b/lua/github-theme/palette/github_dark_tritanopia.lua index a60c0103..ded18460 100644 --- a/lua/github-theme/palette/github_dark_tritanopia.lua +++ b/lua/github-theme/palette/github_dark_tritanopia.lua @@ -124,11 +124,11 @@ local palette = { local function generate_spec(pal) -- stylua: ignore start local spec = { - bg0 = alpha(C(pal.canvas.inset), 0.75), -- Dark bg (popup and float) - bg1 = pal.canvas.default, -- Default bg - bg2 = alpha(C(pal.neutral.emphasis), 0.1), -- Lighter bg (colorcolumn Folds) - bg3 = pal.scale.gray[6], -- Lighter bg (cursor line) - bg4 = pal.scale.gray[4], -- Conceal + bg0 = alpha(C(pal.canvas.inset), 0.75), -- Dark bg (popup and float) + bg1 = pal.canvas.default, -- Default bg + bg2 = alpha(C(pal.neutral.emphasis), 0.1), -- Lighter bg (colorcolumn Folds) + bg3 = pal.scale.gray[6], -- Lighter bg (cursor line) + bg4 = pal.scale.gray[4], -- Conceal fg0 = pal.fg.subtle, -- Lighter fg fg1 = pal.fg.default, -- Default fg diff --git a/lua/github-theme/palette/github_light.lua b/lua/github-theme/palette/github_light.lua index af9645a5..4de3f80c 100644 --- a/lua/github-theme/palette/github_light.lua +++ b/lua/github-theme/palette/github_light.lua @@ -13,7 +13,7 @@ local scale = primitives.scale C.WHITE = C(scale.white) C.BLACK = C(scale.black) -C.BG = C(assert(primitives.canvas.default)) +C.BG = C(scale.white) local function alpha(color, a) return color:alpha_blend(a):to_css() @@ -43,7 +43,12 @@ local palette = { on_emphasis = scale.white, }, - canvas = primitives.canvas, + canvas = { + default = scale.white, + overlay = scale.white, + inset = scale.gray[1], + subtle = scale.gray[1], + }, border = { default = scale.gray[3], diff --git a/lua/github-theme/palette/github_light_default.lua b/lua/github-theme/palette/github_light_default.lua new file mode 100644 index 00000000..ce67aeeb --- /dev/null +++ b/lua/github-theme/palette/github_light_default.lua @@ -0,0 +1,206 @@ +local C = require('github-theme.lib.color') + +local meta = { + name = 'github_light_default', + light = true, +} + +local primitives = require('github-theme.palette.primitives.light') + +local pl = primitives.prettylights +local scale = primitives.scale + +C.WHITE = C(scale.white) +C.BLACK = C(scale.black) +C.BG = C(assert(primitives.canvas.default)) + +local function alpha(color, a) + return color:alpha_blend(a):to_css() +end + +-- Temp override until Primitives are updated +local palette = { + scale = scale, + + orange = scale.orange[4], + gray = scale.gray[6], + + black = { base = scale.gray[10], bright = scale.gray[7] }, + white = { base = scale.gray[6], bright = scale.gray[5] }, + red = { base = scale.red[6], bright = scale.red[7] }, + green = { base = scale.green[7], bright = scale.green[6] }, + yellow = { base = scale.yellow[9], bright = scale.yellow[8] }, + blue = { base = scale.blue[6], bright = scale.blue[5] }, + magenta = { base = scale.purple[6], bright = scale.purple[5] }, + pink = { base = scale.pink[6], bright = scale.pink[5] }, + cyan = { base = '#1b7c83', bright = '#3192aa' }, + + fg = { + default = scale.black, + muted = scale.gray[3], + subtle = scale.gray[6], + on_emphasis = scale.white, + }, + + canvas = primitives.canvas, + + border = { + default = scale.gray[3], + muted = C(scale.gray[3]):lighten(0.03), -- TODO: lighten method not working + subtle = alpha(C(scale.black), 0.15), + }, + + neutral = { + emphasis_plus = scale.gray[10], + emphasis = scale.gray[6], + muted = alpha(C(scale.gray[4]), 0.2), + subtle = alpha(C(scale.gray[2]), 0.5), + }, + + accent = { + fg = scale.blue[6], + emphasis = scale.blue[6], + muted = alpha(C(scale.blue[4]), 0.4), + subtle = scale.blue[1], + }, + + success = { + fg = scale.green[6], + emphasis = '#1f883d', + muted = alpha(C(scale.green[4]), 0.4), + subtle = scale.green[1], + }, + + attention = { + fg = scale.yellow[6], + emphasis = scale.yellow[6], + muted = alpha(C(scale.yellow[4]), 0.4), + subtle = scale.yellow[1], + }, + + severe = { + fg = scale.orange[6], + emphasis = scale.orange[6], + muted = alpha(C(scale.orange[4]), 0.4), + subtle = scale.orange[1], + }, + + danger = { + fg = '#d1242f', + emphasis = scale.red[6], + muted = alpha(C(scale.red[4]), 0.4), + subtle = scale.red[1], + }, + + open = { + fg = scale.green[6], + emphasis = '#1f883d', + muted = alpha(C(scale.green[4]), 0.4), + subtle = scale.green[1], + }, + + closed = { + fg = '#d1242f', + emphasis = scale.red[6], + muted = alpha(C(scale.red[4]), 0.4), + subtle = scale.red[1], + }, + + done = { + fg = scale.purple[6], + emphasis = scale.purple[6], + muted = alpha(C(scale.purple[4]), 0.4), + subtle = scale.purple[1], + }, + + sponsors = { + fg = scale.pink[6], + emphasis = scale.pink[6], + muted = alpha(C(scale.pink[4]), 0.4), + subtle = scale.pink[1], + }, +} + +local function generate_spec(pal) + -- stylua: ignore start + local spec = { + bg0 = pal.canvas.inset, -- Dark bg (popup and float) + bg1 = pal.canvas.default, -- Default bg + bg2 = alpha(C(pal.neutral.emphasis), 0.1), -- Lighter bg (colorcolumn Folds) + bg3 = alpha(C(pal.scale.blue[9]), 0.1), -- Lighter bg (cursor line) + bg4 = pal.scale.gray[6], -- Conceal + + fg0 = pal.fg.subtle, -- Lighter fg + fg1 = pal.fg.default, -- Default fg + fg2 = pal.scale.gray[9], -- Darker fg (status line) + fg3 = pal.scale.gray[7], -- Darker fg (line numbers, fold columns) + + sel0 = alpha(C(pal.accent.fg), 0.15), -- Visual selection bg + sel1 = alpha(C(pal.accent.muted), 0.90), -- Popup sel bg + sel2 = alpha(C(pal.attention.emphasis), 0.3) -- Search bg + } + + spec.syntax = { + bracket = spec.fg1, -- Brackets and Punctuation + builtin0 = pl.syntax.constant, -- Builtin variable + builtin1 = pl.syntax.keyword, -- Builtin type + builtin2 = pl.syntax.constant, -- Builtin const + comment = pl.syntax.comment, -- Comment + conditional = pl.syntax.keyword, -- Conditional and loop + const = pl.syntax.constant, -- Constants, imports and booleans + dep = pal.scale.red[8], -- Deprecated + field = pl.syntax.constant, -- Field + func = pl.syntax.entity, -- Functions and Titles + ident = spec.fg1, -- Identifiers + keyword = pl.syntax.keyword, -- Keywords + number = pl.syntax.constant, -- Numbers + operator = pl.syntax.constant, -- Operators + param = spec.fg1, -- Parameters + preproc = pl.syntax.keyword, -- PreProc + regex = pl.syntax.string, -- Regex + statement = pl.syntax.keyword, -- Statements + string = pl.syntax.string, -- Strings + type = pl.syntax.variable, -- Types + tag = pl.syntax.entityTag, -- Tags + variable = spec.fg1, -- Variables + } + + spec.diag = { + error = pal.danger.fg, + warn = pal.attention.fg, + info = pal.accent.fg, + hint = pal.fg.muted, + } + + spec.diag_bg = { + error = C(spec.bg1):blend(C(spec.diag.error), 0.15):to_css(), + warn = C(spec.bg1):blend(C(spec.diag.warn), 0.15):to_css(), + info = C(spec.bg1):blend(C(spec.diag.info), 0.15):to_css(), + hint = C(spec.bg1):blend(C(spec.diag.hint), 0.15):to_css(), + } + + spec.diff = { + add = alpha(C(pal.scale.green[7]), 0.3), + delete = alpha(C(pal.scale.red[7]), 0.3), + change = alpha(C(pal.scale.yellow[7]), 0.3), + text = spec.fg0 + } + + spec.git = { + add = pal.success.fg, + removed = pal.danger.fg, + changed = pal.attention.fg, + conflict = pal.severe.fg, + ignored = pal.fg.subtle, + } + + -- stylua: ignore end + return spec +end + +return { + meta = meta, + primitives = primitives, + palette = palette, + generate_spec = generate_spec, +} diff --git a/lua/lualine/themes/github_dark_default.lua b/lua/lualine/themes/github_dark_default.lua index 6a242260..d8568aa9 100644 --- a/lua/lualine/themes/github_dark_default.lua +++ b/lua/lualine/themes/github_dark_default.lua @@ -1 +1 @@ -return require('github-theme.util.lualine')('github_dark_high_contrast') +return require('github-theme.util.lualine')('github_dark_default') diff --git a/lua/lualine/themes/github_light_default.lua b/lua/lualine/themes/github_light_default.lua index 6285412f..b6acbb22 100644 --- a/lua/lualine/themes/github_light_default.lua +++ b/lua/lualine/themes/github_light_default.lua @@ -1 +1 @@ -return require('github-theme.util.lualine')('github_light_high_contrast') +return require('github-theme.util.lualine')('github_light_default')