Skip to content

Repository files navigation

github-nvim-theme

Notices

Subscribe to this discussion or :h github-theme-changelog to receive updates on breaking changes and deprecations.

  • 2022-08-03: Terminal and other themes have been moved to github-theme-contrib git repository and related code have been removed from this repository.

Requirements

  • Neovim >= 0.5.0

Installation

Install the theme with your preferred package manager:

Install with vim-plug:

Plug 'projekt0n/github-nvim-theme'

Or with dein:

calldein#add('projekt0n/github-nvim-theme')

Or with minpac:

callminpac#add('projekt0n/github-nvim-theme')

Or with Vundle:

Place this in your .vimrc or init.vim,

Plugin'projekt0n/github-nvim-theme'

Or with Packer.nvim:

Add this in your init.lua or plugins.lua

-- Install without configurationuse ({ 'projekt0n/github-nvim-theme' })
-- Or with configurationuse({
'projekt0n/github-nvim-theme',
config=function()
require('github-theme').setup({
-- ...
})
end
})

Usage

Enable the colorscheme:

" Vim Scriptcolorscheme github_*
-- Luarequire('github-theme').setup()

Configuration

OptionDefaultDescription
colors{}You can override specific color groups to use other groups or a hex color
comment_styleitalicHighlight style for comments (check :help highlight-args for options)
dark_floatfalseFloat windows like the lsp diagnostics windows get a darker background.
dark_sidebartrueSidebar like windows like NvimTree get a darker background
devfalseDeveloper Mode.
function_styleNONEHighlight style for functions (check :help highlight-args for options)
hide_end_of_buffertrueEnabling this option, will hide filler lines (~) after the end of the buffer
hide_inactive_statuslinetrueEnabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard StatusLine.
keyword_styleitalicHighlight style for keywords (check :help highlight-args for options)
msg_area_styleNONEHighlight style for messages and cmdline (check :help highlight-args for options)
overridesfunctionOverride specific highlight groups. The function accpet colors as argument. You can also add a non-exists highlight by enabling the dev mode.
sidebars{}Set a darker background on sidebar-like windows. For example: {"qf", "vista_kind", "terminal", "packer"}
theme_styledarkSet theme variant (options: dark/dimmed/dark_default/dark_colorblind/light/light_default/light_colorblind)
transparentfalseEnable this to disable setting the background color
variable_styleNONEHighlight style for variables and identifiers (check :help highlight-args for options)

Using vim

" Example config in VimScript" NOTE: Configuration needs to be set BEFORE loading the color scheme with `colorscheme` commandletg:github_function_style="italic"letg:github_sidebars= ["qf", "vista_kind", "terminal", "packer"]
" Change the "hint" color to the "orange" color, and make the "error" color bright redletg:github_colors= {
\ 'hint': 'orange',
\ 'error': '#ff0000'\ }
" Load the colorschemecolorscheme github_dark

Using lua

-- Example config in Luarequire("github-theme").setup({
theme_style="dark",
function_style="italic",
sidebars= {"qf", "vista_kind", "terminal", "packer"},
-- Change the "hint" color to the "orange" color, and make the "error" color bright redcolors= {hint="orange", error="#ff0000"},
-- Overwrite the highlight groupsoverrides=function(c)
return {
htmlTag= {fg=c.red, bg="#282c34", sp=c.hint, style="underline"},
DiagnosticHint= {link="LspDiagnosticsDefaultHint"},
-- this will remove the highlight groupsTSField= {},
}
end
})

Features

Lualine Support

Installation docs and screenshots at LUALINE.md.

Terminal Themes

Moved to projekt0n/github-theme-contrib git repository

Making undercurls work properly in Tmux

To have undercurls show up and in color, add the following to your Tmux config file:

# Undercurlset -g default-terminal "${TERM}"set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'# undercurl supportset -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'# underscore colours - needs tmux-3.0

Screenshots

Theme Styles

Dark

" VimScriptcolorscheme github_dark
-- Luarequire("github-theme").setup({
theme_style="dark",
-- other config
})

github_dark

Dimmed

" VimScriptcolorscheme github_dimmed
-- Luarequire("github-theme").setup({
theme_style="dimmed",
-- other config
})

github_dimmed

Dark Default

" VimScriptcolorscheme github_dark_default
-- Luarequire("github-theme").setup({
theme_style="dark_default",
-- other config
})

github_dark_default

Dark Colorblind (Beta)

" VimScriptcolorscheme github_dark_colorblind
-- Luarequire("github-theme").setup({
theme_style="dark_colorblind",
-- other config
})

github_dark_colorblind

Light

" VimScriptcolorscheme github_light
-- Luarequire("github-theme").setup({
theme_style="light",
-- other config
})

github_light

Light Default

" VimScriptcolorscheme github_light_default
-- Luarequire("github-theme").setup({
theme_style="light_default",
-- other config
})

github_light_default

Light Colorblind (Beta)

" VimScriptcolorscheme github_light_colorblind
-- Luarequire("github-theme").setup({
theme_style="light_colorblind",
-- other config
})

github_light_colorblind

Syntax Styles

Default

github_default_syntax

Normal

" VimScriptletg:github_comment_style="NONE"letg:github_keyword_style="NONE"letg:github_function_style="NONE"letg:github_variable_style="NONE"
-- Luarequire("github-theme").setup({
comment_style="NONE",
keyword_style="NONE",
function_style="NONE",
variable_style="NONE"-- other config
})

github_normal_syntax

Italic

" VimScriptletg:github_comment_style="italic"letg:github_keyword_style="italic"letg:github_function_style="italic"letg:github_variable_style="italic"
-- Luarequire("github-theme").setup({
comment_style="italic",
keyword_style="italic",
function_style="italic",
variable_style="italic"-- other config
})

github_italic_syntax

Minimal config

" VimScriptletg:github_dark_sidebar=0
-- Luarequire("github-theme").setup({
dark_sidebar=false,
-- other config
})

github_minimal

Telescope

github_telescope

Contributing

See CONTRIBUTING.md

Copying

This project is released under the terms of the MIT license. See LICENCE for more information or see opensource.org

About

Github's Neovim themes

Resources

Code of conduct

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages