elzii / vim-moonfly-colors

A dark color scheme for Vim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

moonfly

moonfly is a dark color scheme for Vim and Neovim that has taken inspiration from:

Be aware, the moonfly color scheme does incrementally change from time to time, primarily with regard to language and plugin theming.

👉 I maintain another dark Vim theme named nightfly which may be of interest.

Color Palette

palette

Screenshots

Ruby

ruby

JavaScript

javascript

The font in use is Iosevka.

Languages explicitly styled

  • 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

Plugins explicity styled

Installation

Use your favoured plugin manager to install bluz71/vim-moonfly-colors then set the colorscheme in your vimrc file.

If using vim-plug do the following:

  1. Add Plug 'bluz71/vim-moonfly-colors' to your vimrc
  2. Run :PlugInstall
  3. Add colorscheme moonfly to your vimrc, make sure this line appears after the Plug declaration.

Status line

The moonfly color scheme supports lightline.vim. To enable the moonfly lightline colorscheme, after the lightline.vim plugin has been installed, please add the following to your vimrc:

let g:lightline = { 'colorscheme': 'moonfly' }

The moonfly color scheme also supports vim-airline. With modern versions of vim-airline the moonfly theme will be automatically loaded.

Alternatively, vim-moonfly-statusline, is available for those that just want a simple yet informative moonfly themed status line.

Options

The g:moonflyCursorColor 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 vimrc:

let g:moonflyCursorColor = 1

The g:moonflyTerminalColors option specifies whether to use the moonfly color palette in :terminal windows when termguicolors is set. By default this option is enabled. If you prefer not to use the moonfly color palette for the first 16 terminal colors then add the following to your vimrc:

let g:moonflyTerminalColors = 0

The g:moonflyUnderlineMatchParen 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 vimrc:

let g:moonflyUnderlineMatchParen = 1

The g:moonflyUndercurls 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 vimrc:

let g:moonflyUndercurls = 0

The g:moonflyItalics 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 vimrc:

let g:moonflyItalics = 0

The g:moonflyTransparent 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 vimrc:

let g:moonflyTransparent = 1

True Color Terminals

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 moonfly color scheme will not require any terminal configuration to emit the correct theme colors.

For the true color moonfly 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 vimrc:

let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"

Terminal Themes

A collection of moonfly-flavoured terminal themes are provided for those using moonfly with termguicolors (cterm users should refer to the next section and not use these terminal themes):

  • iTerm2 users on macOS can import this color scheme.

  • Gnome Terminal users can run this script to create a Moonfly profile. Before executing the script, please install the dconf-cli command line utility for modern versions of Gnome (3.28 and later), for example sudo apt install dconf-cli. After executing the script, please set the cursor and selection colors by hand, with the appropriate color values listed above, in Preferences / Moonfly / Colors.

  • Alacritty users can copy this theme into their alacritty.yml configuration.

  • kitty users can use this theme.

256 Color Terminals

The moonfly color scheme, when used absent termguicolors, requires the host terminal be configured with a specific color palette. In that case the legacy moonfly cterm 256 color terminal theme will be used.

🔔 Nowadays it is strongly recommened to use a true color terminal with a modern version of Vim or Neovim with termguicolors set.

If that is not possible, then the terminal emulator must be configured for 256 colors, which usually means setting the terminal's type to xterm-256color, or screen-256color when used inside tmux.

The terminal should then be configured with the following moonfly colors:

Type Category Value Color
Background Background #080808 background
Foreground Foreground #b2b2b2 background
Bold Bold #eeeeee background
Cursor Cursor #9e9e9e background
Cursor Text Cursor Text #080808 background
Selection Selection #b2ceee background
Selection Text Selection Text #080808 background
Color 1 Black (normal) #373c40 background
Color 2 Red (normal) #ff5454 background
Color 3 Green (normal) #8cc85f background
Color 4 Yellow (normal) #e3c78a background
Color 5 Blue (normal) #80a0ff background
Color 6 Purple (normal) #d183e8 background
Color 7 Cyan (normal) #79dac8 background
Color 8 White (normal) #de935f background
Color 9 Black (bright) #f09479 background
Color 10 Red (bright) #ff5189 background
Color 11 Green (bright) #36c692 background
Color 12 Yellow (bright) #bfbf97 background
Color 13 Blue (bright) #78c2ff background
Color 14 Purple (bright) #ae81ff background
Color 15 Cyan (bright) #85dc85 background
Color 16 White (bright) #e2637f background

License

MIT

About

A dark color scheme for Vim


Languages

Language:Vim Script 90.9%Language:Shell 9.1%