Skip to content

Commit

Permalink
chore: Re-implemented *_default colorschemes
Browse files Browse the repository at this point in the history
related to #298
  • Loading branch information
ful1e5 committed Dec 2, 2023
1 parent 22aa067 commit 82fe04d
Show file tree
Hide file tree
Showing 22 changed files with 879 additions and 430 deletions.
509 changes: 255 additions & 254 deletions CHANGELOG.md

Large diffs are not rendered by default.

146 changes: 82 additions & 64 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
92 changes: 47 additions & 45 deletions Usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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:

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion autoload/airline/themes/github_dark_default.vim
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lua require('github-theme.util.airline')('github_dark_high_contrast')
lua require('github-theme.util.airline')('github_dark_default')
1 change: 1 addition & 0 deletions autoload/airline/themes/github_light_default.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lua require('github-theme.util.airline')('github_light_default')
19 changes: 5 additions & 14 deletions colors/github_dark_default.vim
Original file line number Diff line number Diff line change
@@ -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
19 changes: 5 additions & 14 deletions colors/github_light_default.vim
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions doc/github-nvim-theme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
Loading

0 comments on commit 82fe04d

Please sign in to comment.