nightfly is a dark GUI color scheme for Vim and Neovim heavily inspired by Sarah Drasner's Night Owl theme mixed with a dash of my own moonfly theme.
Be aware, the nightfly color scheme does incrementally change from time to time, primarily with regard to language and plugin theming.
nightfly is a GUI-only Vim color scheme.
A GUI client, such as gvim, or a modern terminal version of Vim/Neovim with
termguicolors
enabled in a true-color terminal, will be required. Details
about true-color terminals are listed below.
nightfly explicitly does not support the 256 color cterm
version of Vim
due to the number of custom colors required. 256 color terminals only allow 16
custom colors. I encourage terminal users to use a true-color terminal, such as:
iTerm2, GNOME
Terminal or
Alacritty, and enable the
termguicolors
option.
The font in use is Iosevka.
- All Neovim Treesitter highlighted-languages
- C/C++
- Clojure
- CoffeeScript
- Crystal
- Elixir
- Elm
- Dart
- Go
- Haskell
- Java
- JavaScript
- Lua
- Markdown
- PHP
- PureScript
- Python
- Ruby
- Rust
- Scala
- Shell
- TypeScript
- ALE
- barbar.nvim
- BufExplorer
- clever-f
- CtrlP
- fern.vim
- fzf.vim
- GitGutter
- gitsigns.nvim
- indentLine (please set
let g:indentLine_setColors = 0
in your initialization file) - Neomake
- NERDTree
- Signify
- Tagbar
- vimfiler
Use your favoured plugin manager to install bluz71/vim-nightfly-guicolors then set the colorscheme in your initialization file.
If using vim-plug do the following:
- Add
Plug 'bluz71/vim-nightfly-guicolors'
to your initialization file - Run
:PlugInstall
- Add
colorscheme nightfly
to your initialization file, make sure this line appears after the Plug declaration.
The nightfly color scheme supports lightline.vim. To enable the nightfly lightline colorscheme, after the lightline.vim plugin has been installed, please add the following to your initialization file:
let g:lightline = { 'colorscheme': 'nightfly' }
The nightfly color scheme also supports vim-airline. With modern versions of vim-airline the nightfly theme will be automatically loaded.
Alternatively, vim-moonfly-statusline is available for those that want a simple yet informative status line. After the vim-moonfly_statusline plugin has been installed, please add the following to your initialization file:
let g:moonflyIgnoreDefaultColors = 1
This option will tell moonfly-statusline to not use the default
moonfly colors of that plugin,
but instead use the specified statusline
colors defined by this nightfly
color scheme.
The g:nightflyCursorColor
option specifies whether to color the cursor or not.
By default the cursor will NOT be colored. If you prefer a colored cursor
then add the following to your initialization file:
let g:nightflyCursorColor = 1
The g:nightflyTerminalColors
option specifies whether to use the nightfly
color palette in :terminal
windows when termguicolors
is set. By default
this option is enabled. If you prefer not to use the nightfly color palette
for the first 16 terminal colors then add the following to your initialization
file:
let g:nightflyTerminalColors = 0
The g:nightflyUnderlineMatchParen
option specifies whether to underline
matching parentheses. By default this option is disabled. If you want to
underline matching parentheses then add the following to your initialization
file:
let g:nightflyUnderlineMatchParen = 1
The g:nightflyUndercurls
option specifies whether to use undercurls for
spelling and linting errors in GUI versions of Vim, including terminal Vim with
termguicolors
set. By default this option is enabled. If you do not like
the appearance of undercurls then add the following to your initialization file:
let g:nightflyUndercurls = 0
The g:nightflyItalics
option specifies whether to use italics for comments and
certain HTML elements in GUI versions of Vim. By default this option is
enabled. If you do not like the appearance of italics then add the following
to your initialization file:
let g:nightflyItalics = 0
The g:nightflyTransparent
option specifies whether to use an opaque or
transparent background in GUI versions of Vim. By default this option is
disabled. If you would like a transparent background then add the following
to your initialization file:
let g:nightflyTransparent = 1
The g:nightflyNormalFloat
option specifies whether to use nightfly background
and foreground colors in Neovim floating windows. By default this options is
disabled, hence, Neovim floating windows will usually be styled with popup
menu colors. If you would like to use nightfly colors instead then add the
following to your configuration:
let g:nightflyNormalFloat = 1
๐ก If the above option is set then it is highly recommended to enable floating window borders to distinguish between the edit and floating windows in Neovim's LSP client, for example:
vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(
vim.lsp.handlers.hover, {
border = 'single'
}
)
vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(
vim.lsp.handlers.signatureHelp, {
border = 'single'
}
)
Many modern terminals support 24-bit true
colors. Current versions of Vim and
Neovim on such terminals support true colors when set termguicolors
is
enabled.
A list of popular terminals that support true colors:
On terminals that support true colors, and when termguicolors
is set, the
nightfly color scheme will emit the correct theme colors.
For the nightfly color scheme to display correctly inside tmux the following setting will usually be required in ~/.tmux.conf:
set -ga terminal-overrides ',xterm-256color:Tc'
Vim, as against Neovim, inside tmux, will also require the following setting be added to initialization file:
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
A collection of nightfly-flavoured terminal themes are provided:
-
iTerm2 users on macOS can import this color scheme
-
GNOME Terminal users can run this script to create a Nightfly profile. Before executing the script, please install the
dconf-cli
command line utility for modern versions of Gnome (3.28 and later), for examplesudo apt install dconf-cli
. After executing the script, please set the cursor and selection colors by hand, with the appropriate color values listed below, inPreferences
/Nightfly
/Colors
. -
Alacritty users can copy this theme into their
alacritty.yml
configuration.
For other terminals please configure appropriately with the following colors: