diff --git a/CHANGELOG.md b/CHANGELOG.md index a18fed9c..7f350b92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,8 +9,10 @@ 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. +- Support `WinSeparator` highlight, introduced in Neovim >= 0.10, replacing `VertSplit`. ### Changes @@ -28,331 +30,331 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### 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..fd535826 100644 --- a/README.md +++ b/README.md @@ -13,35 +13,53 @@ 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. + +## Supported Colorschemes & Comparisons + +| github-nvim-theme | github-vscode-theme | Github Web UI | Primer | +| :------------------------- | :----------------------------- | :------------------------------ | :------------------ | +| github_dark | Github Dark | - | - | +| github_light | Github Light | - | - | +| github_dark_dimmed | Github Dark Dimmed | Dark dimmed | dark_dimmed | +| github_dark_default | Github Dark Default | Dark default | dark | +| github_light_default | Github Light Default | Light default | light | +| github_dark_high_contrast | Github Dark High Contrast | Dark high contrast | dark_high_contrast | +| github_light_high_contrast | Github Light High Contrast | Light high contrast | light_high_contrast | +| github_dark_colorblind | Github Dark Colorblind (Beta) | Dark Protanopia & Deuteranopia | dark_colorblind | +| github_light_colorblind | Github Light Colorblind (Beta) | Light Protanopia & Deuteranopia | light_colorblind | +| github_dark_tritanopia | - | Dark Tritanopia | dark_tritanopia | +| github_light_tritanopia | - | Light Tritanopia | light_tritanopia | ## 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 +144,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 +163,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 +211,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 +580,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..62092fab 100644 --- a/Usage.md +++ b/Usage.md @@ -1,18 +1,23 @@ ## Overview 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` +It offers multiple themes, including colorblind-friendly options. + +Here are the available themes: + +| github-nvim-theme | github-vscode-theme | Github Web UI | Primer | +| :------------------------- | :----------------------------- | :------------------------------ | :------------------ | +| github_dark | Github Dark | - | - | +| github_light | Github Light | - | - | +| github_dark_dimmed | Github Dark Dimmed | Dark dimmed | dark_dimmed | +| github_dark_default | Github Dark Default | Dark default | dark | +| github_light_default | Github Light Default | Light default | light | +| github_dark_high_contrast | Github Dark High Contrast | Dark high contrast | dark_high_contrast | +| github_light_high_contrast | Github Light High Contrast | Light high contrast | light_high_contrast | +| github_dark_colorblind | Github Dark Colorblind (Beta) | Dark Protanopia & Deuteranopia | dark_colorblind | +| github_light_colorblind | Github Light Colorblind (Beta) | Light Protanopia & Deuteranopia | light_colorblind | +| github_dark_tritanopia | - | Dark Tritanopia | dark_tritanopia | +| github_light_tritanopia | - | Light Tritanopia | light_tritanopia | ## Usage @@ -207,16 +212,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 +390,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 +563,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..ee71ea4a 100644 --- a/doc/github-nvim-theme.txt +++ b/doc/github-nvim-theme.txt @@ -20,20 +20,39 @@ OVERVIEW *github-nvim-theme-overview* 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` +multiple themes, including colorblind-friendly options. +Here are the available themes: + + --------------------------------------------------------------------------------------------- + github-nvim-theme github-vscode-theme Github Web UI Primer + ---------------------------- --------------------- -------------------- --------------------- + github_dark Github Dark - - + + github_light Github Light - - + + github_dark_dimmed Github Dark Dimmed Dark dimmed dark_dimmed + + github_dark_default Github Dark Default Dark default dark + + github_light_default Github Light Default Light default light + + github_dark_high_contrast Github Dark High Dark high contrast dark_high_contrast + Contrast + + github_light_high_contrast Github Light High Light high contrast light_high_contrast + Contrast + + github_dark_colorblind Github Dark Dark Protanopia & dark_colorblind + Colorblind (Beta) Deuteranopia + + github_light_colorblind Github Light Light Protanopia & light_colorblind + Colorblind (Beta) Deuteranopia + + github_dark_tritanopia - Dark Tritanopia dark_tritanopia + + github_light_tritanopia - Light Tritanopia light_tritanopia + --------------------------------------------------------------------------------------------- USAGE *github-nvim-theme-usage* diff --git a/doc/gt_changelog.txt b/doc/gt_changelog.txt index ecba8c1d..f6b11364 100644 --- a/doc/gt_changelog.txt +++ b/doc/gt_changelog.txt @@ -5,6 +5,17 @@ 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 on `:h github-nvim-theme-overview` + + + *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/_test/util.lua b/lua/github-theme/_test/util.lua new file mode 100644 index 00000000..8bc18690 --- /dev/null +++ b/lua/github-theme/_test/util.lua @@ -0,0 +1,21 @@ +local M = {} +local api = vim.api + +function M.await_VimEnter() + if vim.v.vim_did_enter == 0 then + local co = assert(coroutine.running(), 'test is not running in coroutine') + + api.nvim_create_autocmd('VimEnter', { + pattern = '*', + once = true, + nested = true, + callback = vim.schedule_wrap(function() + coroutine.resume(co) + end), + }) + + coroutine.yield() + end +end + +return M diff --git a/lua/github-theme/group/editor.lua b/lua/github-theme/group/editor.lua index f31e72db..d8c2fea3 100644 --- a/lua/github-theme/group/editor.lua +++ b/lua/github-theme/group/editor.lua @@ -40,6 +40,7 @@ function M.get(spec, config) -- TermCursorNC = {}, -- cursor in an unfocused terminal ErrorMsg = { fg = spec.diag.error }, -- error messages on the command line VertSplit = { fg = c.border.default }, -- the column separating vertically split windows + WinSeparator = { fg = c.border.default }, -- (nvim >= 0.10) the column separating vertically split windows Folded = { fg = spec.fg3, bg = spec.bg2 }, -- line used for closed folds FoldColumn = { fg = spec.fg3 }, -- 'foldcolumn' SignColumn = { fg = spec.fg3 }, -- column where |signs| are displayed 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 7bf31b76..8d198524 100755 --- a/lua/github-theme/palette/github_dark.lua +++ b/lua/github-theme/palette/github_dark.lua @@ -129,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 cc78cfea..c528f574 100644 --- a/lua/github-theme/palette/github_dark_colorblind.lua +++ b/lua/github-theme/palette/github_dark_colorblind.lua @@ -13,7 +13,7 @@ local scale = primitives.scale C.WHITE = C(scale.white) C.BLACK = C(scale.black) -C.BG = C(scale.gray[10]) +C.BG = C(assert(primitives.canvas.default)) local function alpha(color, a) return color:alpha_blend(a):to_css() @@ -42,12 +42,7 @@ local palette = { on_emphasis = scale.white, }, - canvas = { - default = scale.gray[10], - overlay = scale.gray[9], - inset = scale.black, - subtle = scale.gray[9], - }, + canvas = primitives.canvas, border = { default = scale.gray[7], @@ -129,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 69ecdcb1..36d83580 100644 --- a/lua/github-theme/palette/github_dark_dimmed.lua +++ b/lua/github-theme/palette/github_dark_dimmed.lua @@ -13,7 +13,7 @@ local scale = primitives.scale C.WHITE = C(scale.white) C.BLACK = C(scale.black) -C.BG = C(scale.gray[10]) +C.BG = C(assert(primitives.canvas.default)) local function alpha(color, a) return color:alpha_blend(a):to_css() @@ -42,12 +42,7 @@ local palette = { on_emphasis = scale.white, }, - canvas = { - default = scale.gray[10], - overlay = scale.gray[9], - inset = scale.black, - subtle = scale.gray[9], - }, + canvas = primitives.canvas, border = { default = scale.gray[7], @@ -129,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 66c037c9..7ee7eda1 100644 --- a/lua/github-theme/palette/github_dark_high_contrast.lua +++ b/lua/github-theme/palette/github_dark_high_contrast.lua @@ -13,7 +13,7 @@ local scale = primitives.scale C.WHITE = C(scale.white) C.BLACK = C(scale.black) -C.BG = C(scale.gray[10]) +C.BG = C(assert(primitives.canvas.default)) local function alpha(color, a) return color:alpha_blend(a):to_css() @@ -42,12 +42,7 @@ local palette = { on_emphasis = scale.gray[10], }, - canvas = { - default = scale.gray[10], - overlay = scale.gray[9], - inset = scale.black, - subtle = scale.gray[9], - }, + canvas = primitives.canvas, border = { default = scale.gray[4], @@ -129,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 0b9e4966..ded18460 100644 --- a/lua/github-theme/palette/github_dark_tritanopia.lua +++ b/lua/github-theme/palette/github_dark_tritanopia.lua @@ -13,7 +13,7 @@ local scale = primitives.scale C.WHITE = C(scale.white) C.BLACK = C(scale.black) -C.BG = C(scale.gray[10]) +C.BG = C(assert(primitives.canvas.default)) local function alpha(color, a) return color:alpha_blend(a):to_css() @@ -42,12 +42,7 @@ local palette = { on_emphasis = scale.white, }, - canvas = { - default = scale.gray[10], - overlay = scale.gray[9], - inset = scale.black, - subtle = scale.gray[9], - }, + canvas = primitives.canvas, border = { default = scale.gray[7], @@ -129,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_colorblind.lua b/lua/github-theme/palette/github_light_colorblind.lua index f88e7d0e..8bd64d87 100644 --- a/lua/github-theme/palette/github_light_colorblind.lua +++ b/lua/github-theme/palette/github_light_colorblind.lua @@ -13,7 +13,7 @@ local scale = primitives.scale C.WHITE = C(scale.white) C.BLACK = C(scale.black) -C.BG = C(scale.white) +C.BG = C(assert(primitives.canvas.default)) local function alpha(color, a) return color:alpha_blend(a):to_css() @@ -43,12 +43,7 @@ local palette = { on_emphasis = scale.white, }, - canvas = { - default = scale.white, - overlay = scale.white, - inset = scale.gray[1], - subtle = scale.gray[1], - }, + canvas = primitives.canvas, 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/github-theme/palette/github_light_high_contrast.lua b/lua/github-theme/palette/github_light_high_contrast.lua index 04769424..62123174 100644 --- a/lua/github-theme/palette/github_light_high_contrast.lua +++ b/lua/github-theme/palette/github_light_high_contrast.lua @@ -13,7 +13,7 @@ local scale = primitives.scale C.WHITE = C(scale.white) C.BLACK = C(scale.black) -C.BG = C(scale.white) +C.BG = C(assert(primitives.canvas.default)) local function alpha(color, a) return color:alpha_blend(a):to_css() @@ -43,12 +43,7 @@ local palette = { on_emphasis = scale.white, }, - canvas = { - default = scale.white, - overlay = scale.white, - inset = scale.white, - subtle = scale.gray[2], - }, + canvas = primitives.canvas, border = { default = scale.gray[9], diff --git a/lua/github-theme/palette/github_light_tritanopia.lua b/lua/github-theme/palette/github_light_tritanopia.lua index 7a174dc3..730d678c 100644 --- a/lua/github-theme/palette/github_light_tritanopia.lua +++ b/lua/github-theme/palette/github_light_tritanopia.lua @@ -13,7 +13,7 @@ local scale = primitives.scale C.WHITE = C(scale.white) C.BLACK = C(scale.black) -C.BG = C(scale.white) +C.BG = C(assert(primitives.canvas.default)) local function alpha(color, a) return color:alpha_blend(a):to_css() @@ -43,12 +43,7 @@ local palette = { on_emphasis = scale.white, }, - canvas = { - default = scale.white, - overlay = scale.white, - inset = scale.gray[1], - subtle = scale.gray[1], - }, + canvas = primitives.canvas, border = { default = scale.gray[3], diff --git a/lua/github-theme/palette/primitives/dark.lua b/lua/github-theme/palette/primitives/dark.lua index 0e223944..79023092 100644 --- a/lua/github-theme/palette/primitives/dark.lua +++ b/lua/github-theme/palette/primitives/dark.lua @@ -26,7 +26,7 @@ local M = vim.json.decode( "numBg": "rgba(56,139,253,0.4)" }, "expander": { - "icon": "#7d8590" + "icon": "#848d97" }, "selectedLineHighlightMixBlendMode": "screen" }, @@ -78,7 +78,7 @@ local M = vim.json.decode( "guttersBg": "#0d1117", "guttermarkerText": "#0d1117", "guttermarkerSubtleText": "#6e7681", - "linenumberText": "#7d8590", + "linenumberText": "#848d97", "cursor": "#e6edf3", "selectionBg": "rgba(56,139,253,0.4)", "activelineBg": "rgba(110,118,129,0.1)", @@ -100,12 +100,12 @@ local M = vim.json.decode( "runBorderWidth": "1px", "containerBorderWidth": "1px", "textPrimary": "#e6edf3", - "textSecondary": "#7d8590", + "textSecondary": "#848d97", "textLink": "#2f81f7", - "btnIcon": "#7d8590", + "btnIcon": "#848d97", "btnHoverIcon": "#e6edf3", "btnHoverBg": "rgba(110,118,129,0.1)", - "inputText": "#7d8590", + "inputText": "#848d97", "inputPlaceholderText": "#6e7681", "inputFocusText": "#e6edf3", "inputBg": "#161b22", @@ -123,11 +123,11 @@ local M = vim.json.decode( "dropdownBtnHoverText": "#e6edf3", "dropdownBtnHoverBg": "rgba(110,118,129,0.1)", "scrollbarThumbBg": "rgba(110,118,129,0.4)", - "headerLabelText": "#7d8590", + "headerLabelText": "#848d97", "headerLabelOpenText": "#e6edf3", "headerBorder": "#21262d", - "headerIcon": "#7d8590", - "lineText": "#7d8590", + "headerIcon": "#848d97", + "lineText": "#848d97", "lineNumText": "#6e7681", "lineTimestampText": "#6e7681", "lineHoverBg": "rgba(110,118,129,0.1)", @@ -136,18 +136,18 @@ local M = vim.json.decode( "lineDtFmText": "#ffffff", "lineDtFmBg": "#9e6a03", "gateBg": "rgba(187,128,9,0.15)", - "gateText": "#7d8590", + "gateText": "#848d97", "gateWaitingText": "#d29922", "stepHeaderOpenBg": "#161b22", "stepErrorText": "#f85149", "stepWarningText": "#d29922", - "loglineText": "#7d8590", + "loglineText": "#848d97", "loglineNumText": "#6e7681", "loglineDebugText": "#a371f7", - "loglineErrorText": "#7d8590", + "loglineErrorText": "#848d97", "loglineErrorNumText": "#6e7681", "loglineErrorBg": "rgba(248,81,73,0.1)", - "loglineWarningText": "#7d8590", + "loglineWarningText": "#848d97", "loglineWarningNumText": "#d29922", "loglineWarningBg": "rgba(187,128,9,0.15)", "loglineCommandText": "#2f81f7", @@ -326,6 +326,10 @@ local M = vim.json.decode( "counterFg": "#f85149", "disabledCounterFg": "rgba(248,81,73,0.5)", "hoverCounterFg": "#ffffff" + }, + "inactive": { + "bg": "#21262d", + "text": "#8b949e" } }, "underlinenav": { @@ -352,7 +356,7 @@ local M = vim.json.decode( "hoverBg": "hsla(215,8%,72%,0.1)", "activeBg": "rgba(110,118,129,0.4)", "disabledBg": "#21262d", - "fg": "#7d8590", + "fg": "#848d97", "disabledFg": "#010409", "border": "rgba(0,0,0,0)", "checked": { @@ -394,12 +398,12 @@ local M = vim.json.decode( "hoverBg": "rgba(177,186,196,0.12)" }, "directory": { - "fill": "#7d8590" + "fill": "#848d97" } }, "fg": { "default": "#e6edf3", - "muted": "#7d8590", + "muted": "#848d97", "subtle": "#6e7681", "onEmphasis": "#ffffff" }, @@ -613,7 +617,7 @@ local M = vim.json.decode( { luanil = { object = false, array = false } } ) M._VERSION = - vim.json.decode([=["7.13.1"]=], { luanil = { object = false, array = false } }) + vim.json.decode([=["7.15.5"]=], { luanil = { object = false, array = false } }) M._LICENSE = [=[ The MIT License (MIT) diff --git a/lua/github-theme/palette/primitives/dark_colorblind.lua b/lua/github-theme/palette/primitives/dark_colorblind.lua index b3ac4c82..2af473e1 100644 --- a/lua/github-theme/palette/primitives/dark_colorblind.lua +++ b/lua/github-theme/palette/primitives/dark_colorblind.lua @@ -326,6 +326,10 @@ local M = vim.json.decode( "counterFg": "#d47616", "disabledCounterFg": "rgba(212,118,22,0.5)", "hoverCounterFg": "#ffffff" + }, + "inactive": { + "bg": "#21262d", + "text": "#8b949e" } }, "underlinenav": { @@ -613,7 +617,7 @@ local M = vim.json.decode( { luanil = { object = false, array = false } } ) M._VERSION = - vim.json.decode([=["7.13.1"]=], { luanil = { object = false, array = false } }) + vim.json.decode([=["7.15.5"]=], { luanil = { object = false, array = false } }) M._LICENSE = [=[ The MIT License (MIT) diff --git a/lua/github-theme/palette/primitives/dark_dimmed.lua b/lua/github-theme/palette/primitives/dark_dimmed.lua index b3d18bdd..db0fc402 100644 --- a/lua/github-theme/palette/primitives/dark_dimmed.lua +++ b/lua/github-theme/palette/primitives/dark_dimmed.lua @@ -326,6 +326,10 @@ local M = vim.json.decode( "counterFg": "#e5534b", "disabledCounterFg": "rgba(229,83,75,0.5)", "hoverCounterFg": "#cdd9e5" + }, + "inactive": { + "bg": "#373e47", + "text": "#768390" } }, "underlinenav": { @@ -613,7 +617,7 @@ local M = vim.json.decode( { luanil = { object = false, array = false } } ) M._VERSION = - vim.json.decode([=["7.13.1"]=], { luanil = { object = false, array = false } }) + vim.json.decode([=["7.15.5"]=], { luanil = { object = false, array = false } }) M._LICENSE = [=[ The MIT License (MIT) diff --git a/lua/github-theme/palette/primitives/dark_high_contrast.lua b/lua/github-theme/palette/primitives/dark_high_contrast.lua index 33baaf4b..f57bcb1b 100644 --- a/lua/github-theme/palette/primitives/dark_high_contrast.lua +++ b/lua/github-theme/palette/primitives/dark_high_contrast.lua @@ -326,6 +326,10 @@ local M = vim.json.decode( "counterFg": "#ff6a69", "disabledCounterFg": "rgba(255,106,105,0.5)", "hoverCounterFg": "#ffffff" + }, + "inactive": { + "bg": "#272b33", + "text": "#bdc4cc" } }, "underlinenav": { @@ -613,7 +617,7 @@ local M = vim.json.decode( { luanil = { object = false, array = false } } ) M._VERSION = - vim.json.decode([=["7.13.1"]=], { luanil = { object = false, array = false } }) + vim.json.decode([=["7.15.5"]=], { luanil = { object = false, array = false } }) M._LICENSE = [=[ The MIT License (MIT) diff --git a/lua/github-theme/palette/primitives/dark_tritanopia.lua b/lua/github-theme/palette/primitives/dark_tritanopia.lua index ff437c03..49d37b9a 100644 --- a/lua/github-theme/palette/primitives/dark_tritanopia.lua +++ b/lua/github-theme/palette/primitives/dark_tritanopia.lua @@ -326,6 +326,10 @@ local M = vim.json.decode( "counterFg": "#f85149", "disabledCounterFg": "rgba(248,81,73,0.5)", "hoverCounterFg": "#ffffff" + }, + "inactive": { + "bg": "#21262d", + "text": "#8b949e" } }, "underlinenav": { @@ -613,7 +617,7 @@ local M = vim.json.decode( { luanil = { object = false, array = false } } ) M._VERSION = - vim.json.decode([=["7.13.1"]=], { luanil = { object = false, array = false } }) + vim.json.decode([=["7.15.5"]=], { luanil = { object = false, array = false } }) M._LICENSE = [=[ The MIT License (MIT) diff --git a/lua/github-theme/palette/primitives/light.lua b/lua/github-theme/palette/primitives/light.lua index 70e34e53..cbdc0f04 100644 --- a/lua/github-theme/palette/primitives/light.lua +++ b/lua/github-theme/palette/primitives/light.lua @@ -40,7 +40,7 @@ local M = vim.json.decode( }, "prettylights": { "syntax": { - "comment": "#6e7781", + "comment": "#57606a", "constant": "#0550ae", "entity": "#6639ba", "storageModifierImport": "#24292f", @@ -326,6 +326,10 @@ local M = vim.json.decode( "counterFg": "#a40e26", "hoverCounterFg": "#ffffff", "disabledCounterFg": "rgba(207,34,46,0.5)" + }, + "inactive": { + "bg": "#eaeef2", + "text": "#57606a" } }, "underlinenav": { @@ -613,7 +617,7 @@ local M = vim.json.decode( { luanil = { object = false, array = false } } ) M._VERSION = - vim.json.decode([=["7.13.1"]=], { luanil = { object = false, array = false } }) + vim.json.decode([=["7.15.5"]=], { luanil = { object = false, array = false } }) M._LICENSE = [=[ The MIT License (MIT) diff --git a/lua/github-theme/palette/primitives/light_colorblind.lua b/lua/github-theme/palette/primitives/light_colorblind.lua index 331770dc..7d937722 100644 --- a/lua/github-theme/palette/primitives/light_colorblind.lua +++ b/lua/github-theme/palette/primitives/light_colorblind.lua @@ -40,7 +40,7 @@ local M = vim.json.decode( }, "prettylights": { "syntax": { - "comment": "#6e7781", + "comment": "#57606a", "constant": "#0550ae", "entity": "#6639ba", "storageModifierImport": "#24292f", @@ -326,6 +326,10 @@ local M = vim.json.decode( "counterFg": "#8a4600", "hoverCounterFg": "#ffffff", "disabledCounterFg": "rgba(179,89,0,0.5)" + }, + "inactive": { + "bg": "#eaeef2", + "text": "#57606a" } }, "underlinenav": { @@ -613,7 +617,7 @@ local M = vim.json.decode( { luanil = { object = false, array = false } } ) M._VERSION = - vim.json.decode([=["7.13.1"]=], { luanil = { object = false, array = false } }) + vim.json.decode([=["7.15.5"]=], { luanil = { object = false, array = false } }) M._LICENSE = [=[ The MIT License (MIT) diff --git a/lua/github-theme/palette/primitives/light_high_contrast.lua b/lua/github-theme/palette/primitives/light_high_contrast.lua index 1f243573..ff1228d4 100644 --- a/lua/github-theme/palette/primitives/light_high_contrast.lua +++ b/lua/github-theme/palette/primitives/light_high_contrast.lua @@ -40,7 +40,7 @@ local M = vim.json.decode( }, "prettylights": { "syntax": { - "comment": "#66707b", + "comment": "#4b535d", "constant": "#023b95", "entity": "#512598", "storageModifierImport": "#0e1116", @@ -326,6 +326,10 @@ local M = vim.json.decode( "counterFg": "#86061d", "hoverCounterFg": "#ffffff", "disabledCounterFg": "rgba(160,17,31,0.5)" + }, + "inactive": { + "bg": "#e7ecf0", + "text": "#4b535d" } }, "underlinenav": { @@ -613,7 +617,7 @@ local M = vim.json.decode( { luanil = { object = false, array = false } } ) M._VERSION = - vim.json.decode([=["7.13.1"]=], { luanil = { object = false, array = false } }) + vim.json.decode([=["7.15.5"]=], { luanil = { object = false, array = false } }) M._LICENSE = [=[ The MIT License (MIT) diff --git a/lua/github-theme/palette/primitives/light_tritanopia.lua b/lua/github-theme/palette/primitives/light_tritanopia.lua index 7b7fd0fa..de098d33 100644 --- a/lua/github-theme/palette/primitives/light_tritanopia.lua +++ b/lua/github-theme/palette/primitives/light_tritanopia.lua @@ -40,7 +40,7 @@ local M = vim.json.decode( }, "prettylights": { "syntax": { - "comment": "#6e7781", + "comment": "#57606a", "constant": "#0550ae", "entity": "#6639ba", "storageModifierImport": "#24292f", @@ -326,6 +326,10 @@ local M = vim.json.decode( "counterFg": "#a40e26", "hoverCounterFg": "#ffffff", "disabledCounterFg": "rgba(207,34,46,0.5)" + }, + "inactive": { + "bg": "#eaeef2", + "text": "#57606a" } }, "underlinenav": { @@ -613,7 +617,7 @@ local M = vim.json.decode( { luanil = { object = false, array = false } } ) M._VERSION = - vim.json.decode([=["7.13.1"]=], { luanil = { object = false, array = false } }) + vim.json.decode([=["7.15.5"]=], { luanil = { object = false, array = false } }) M._LICENSE = [=[ The MIT License (MIT) 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') diff --git a/package-lock.json b/package-lock.json index 54b00898..6100933f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,13 +6,13 @@ "": { "name": "github-nvim-theme", "dependencies": { - "@primer/primitives": "^7.13.1" + "@primer/primitives": "^7.15.5" } }, "node_modules/@primer/primitives": { - "version": "7.13.1", - "resolved": "https://registry.npmjs.org/@primer/primitives/-/primitives-7.13.1.tgz", - "integrity": "sha512-7qVjH15rtdrDYydiqHVyDCEFJ/FYsOteBh5d3+CiY3IEgVAuBnLwMOKugD/GJ3n6zpBvawB4cfKBFDhr/+JQ0Q==" + "version": "7.15.5", + "resolved": "https://registry.npmjs.org/@primer/primitives/-/primitives-7.15.5.tgz", + "integrity": "sha512-tiJEMxy5hDi9a3YxgrBeJScLPUQSLuWsKDNuoXXiX7zLzejnYdxXXG3qOaNHzNyyn8TkSQkzmKx0ioaSLR2zNw==" } } } diff --git a/package.json b/package.json index 2dde56ed..0fd03928 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,6 @@ "name": "github-nvim-theme", "private": true, "dependencies": { - "@primer/primitives": "^7.13.1" + "@primer/primitives": "^7.15.5" } } diff --git a/test/github-theme/queries_spec.lua b/test/github-theme/queries_spec.lua new file mode 100644 index 00000000..224c951f --- /dev/null +++ b/test/github-theme/queries_spec.lua @@ -0,0 +1,101 @@ +local assert = require('luassert') +local ts = vim.treesitter +local queries_dir = './queries' + +local function has_parser(lang) + local inspect = (ts.language or {}).inspect or ts.inspect + return pcall(inspect, lang) +end + +---@type string[] paths +local local_queries = vim.tbl_map(function(path) + return path:gsub([[\]], '/'):gsub('^%./', '') +end, vim.fn.glob(queries_dir .. '/**/*.[Ss][Cc][Mm]', true, true, true)) + +describe('./queries directory', function() + it('should have the correct structure', function() + assert.is.equal( + 'dir', + vim.fn.getftype(queries_dir), + ('`%s` does not exist or is not a directory'):format(queries_dir) + ) + + local langs = vim.fn.readdir(queries_dir) + + assert( + #langs > 0, + ('the queries directory `%s` appears to be empty'):format(queries_dir) + ) + + for _, lang in ipairs(langs) do + local path = ('%s/%s'):format(queries_dir, lang) + + assert.is.equal( + 'dir', + vim.fn.getftype(path), + ('`%s` is not a directory'):format(path) + ) + + for _, file in ipairs(vim.fn.readdir(path)) do + path = ('%s/%s'):format(path, file) + + assert.is.equal( + 'file', + vim.fn.getftype(path), + ('`%s` is not a file'):format(path) + ) + + assert( + file:lower():find('%.scm$'), + ('query file `%s` does not end with `.scm` extension'):format(path) + ) + end + end + end) +end) + +describe('queries', function() + if vim.fn.has('nvim-0.9.0') == 1 then + it('should parse cleanly (no syntax errors, no undefined nodes/symbols)', function() + local found_query = false + + for _, path in ipairs(local_queries) do + local lang = path:match('^queries/([^/]+)/[^/]+%.[Ss][Cc][Mm]$') + + if lang then + found_query = true + + local query + + do + local f = assert(io.open(path, 'r')) + query = f:read('*a') + f:close() + end + + if has_parser(lang) == false then + print( + ([[::warning title=Test skipped::skipped query parsing test because the treesitter parser for `%s` is missing]]):format( + lang + ) + ) + else + local parsed + + assert.does_not_error(function() + -- This function should error if the query is syntactically invalid + -- or refers to any nodes not defined by `lang`. Unsure if it also + -- checks used directives and predicates? + parsed = ts.query.parse(lang, query) + end) + + assert.is.truthy(parsed) + assert.is_not.boolean(parsed) + end + end + end + + assert(found_query, "didn't find any queries") + end) + end +end) diff --git a/test/github-theme/smoketest/startup_spec.lua b/test/github-theme/smoketest/startup_spec.lua new file mode 100644 index 00000000..601d30d5 --- /dev/null +++ b/test/github-theme/smoketest/startup_spec.lua @@ -0,0 +1,33 @@ +local assert = require('luassert') +local t_util = require('github-theme._test.util') + +describe('(smoke test)', function() + describe('setting colorscheme during startup', function() + it('should not error', function() + assert.does_not_error(function() + vim.cmd('colorscheme github_dark_dimmed') + end) + + assert.is.equal('', vim.v.errmsg or '') + end) + end) + + describe('setting/switching colorscheme post-startup', function() + it('should not error', function() + t_util.await_VimEnter() + + for _, cs in ipairs({ + 'default', + 'github_dark_dimmed', + 'github_dark_dimmed', + 'github_light', + }) do + assert.does_not_error(function() + vim.cmd('colorscheme ' .. cs) + end) + + assert.is.equal('', vim.v.errmsg or '') + end + end) + end) +end)