https://github.com/bluz71/vim-moonfly-colors
A dark charcoal theme for modern Neovim & classic Vim
https://github.com/bluz71/vim-moonfly-colors
alacritty-theme iterm2-theme kitty-themes neovim neovim-colorscheme neovim-theme nvim vim vim-colorscheme vim-theme
Last synced: 9 months ago
JSON representation
A dark charcoal theme for modern Neovim & classic Vim
- Host: GitHub
- URL: https://github.com/bluz71/vim-moonfly-colors
- Owner: bluz71
- License: mit
- Created: 2017-05-10T05:48:59.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2025-05-04T08:15:02.000Z (9 months ago)
- Last Synced: 2025-05-04T09:23:34.027Z (9 months ago)
- Topics: alacritty-theme, iterm2-theme, kitty-themes, neovim, neovim-colorscheme, neovim-theme, nvim, vim, vim-colorscheme, vim-theme
- Language: Lua
- Homepage:
- Size: 811 KB
- Stars: 1,085
- Watchers: 10
- Forks: 70
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-neovim-sorted - bluz71/vim-moonfly-colors
- awesome-neovim - bluz71/vim-moonfly-colors - **_`[TS][LSP][Lua]`_** A dark charcoal colorscheme with Tree-sitter support. (Colorscheme / Assembly)
README

==========
_moonfly_ is a dark charcoal theme for modern Neovim and classic Vim.
Note, all _moonfly_ highlights in Neovim are implemented in Lua, whilst
highlights in Vim are implemented in legacy Vimscript.
:point_right: I maintain another dark theme named
[nightfly](https://github.com/bluz71/vim-nightfly-colors) which may be of
interest.
Screenshot
----------

Styled Features & Plugins
-------------------------
Neovim-only:
- [Neovim Tree-sitter](https://github.com/nvim-treesitter/nvim-treesitter)
- [Neovim Diagnostic](https://neovim.io/doc/user/diagnostic.html)
- [Neovim LSP Semantic Highlights](https://neovim.io/doc/user/lsp.html#lsp-semantic-highlight)
- [Barbar](https://github.com/romgrk/barbar.nvim)
- [blink.cmp](https://github.com/Saghen/blink.cmp)
- [Dashboard](https://github.com/glepnir/dashboard-nvim)
- [fzf.lua](https://github.com/ibhagwan/fzf-lua)
- [Gitsigns](https://github.com/lewis6991/gitsigns.nvim)
- [Hop](https://github.com/phaazon/hop.nvim)
- [Indent BlankLine](https://github.com/lukas-reineke/indent-blankline.nvim)
- [Lazy](https://github.com/folke/lazy.nvim)
- [lspsaga.nvim](https://github.com/glepnir/lspsaga.nvim)
- [Lualine](https://github.com/nvim-lualine/lualine.nvim)
- [mason.nvim](https://github.com/williamboman/mason.nvim)
- [Mini](https://github.com/echasnovski/mini.nvim)
- [Neo-tree](https://github.com/nvim-neo-tree/neo-tree.nvim)
- [Neogit](https://github.com/NeogitOrg/neogit)
- [Noice](https://github.com/folke/noice.nvim)
- [nvim-cmp](https://github.com/hrsh7th/nvim-cmp)
- [nvim-dap-ui](https://github.com/rcarriga/nvim-dap-ui)
- [nvim-navic](https://github.com/SmiteshP/nvim-navic)
- [nvim-notify](https://github.com/rcarriga/nvim-notify)
- [nvim-treesitter-context](https://github.com/nvim-treesitter/nvim-treesitter-context)
- [NvCheatsheet.nvim](https://github.com/smartinellimarco/nvcheatsheet.nvim)
- [NvimTree](https://github.com/kyazdani42/nvim-tree.lua)
- [Rainbow Delimiters](https://github.com/HiPhish/rainbow-delimiters.nvim)
- [snacks.nvim](https://github.com/folke/snacks.nvim)
- [Telescope](https://github.com/nvim-telescope/telescope.nvim)
Neovim & Vim compatible:
- [BufExplorer](https://github.com/jlanzarotta/bufexplorer)
- [clever-f](https://github.com/rhysd/clever-f.vim)
- [Coc.nvim](https://github.com/neoclide/coc.nvim)
- [CtrlP](https://github.com/ctrlpvim/ctrlp.vim)
- [Fern](https://github.com/lambdalisue/fern.vim)
- [fzf.vim](https://github.com/junegunn/fzf.vim) (works best with matching [fly16](https://github.com/bluz71/fly16-bat) `bat` theme)
- [lightline](https://github.com/itchyny/lightline.vim)
- [vim-airline](https://github.com/vim-airline/vim-airline)
Vim-only:
- [ALE](https://github.com/dense-analysis/ale)
- [GitGutter](https://github.com/airblade/vim-gitgutter)
- [indentLine](https://github.com/Yggdroot/indentLine)
- [NERDTree](https://github.com/preservim/nerdtree)
- [Signify](https://github.com/mhinz/vim-signify)
- [Tagbar](https://github.com/majutsushi/tagbar)
:zap: Requirements
------------------
_moonfly_ is a **true-color-only** colorscheme.
An up-to-date version of Vim or Neovim in a true-color terminal or a GUI client
(such as gVim ) is required. Details about true-color terminals are [listed
here](https://github.com/bluz71/vim-moonfly-colors#true-color-terminals).
Installation
------------
Install the **bluz71/vim-moonfly-colors** colorscheme with your preferred plugin
manager.
[lazy.nvim](https://github.com/folke/lazy.nvim):
```lua
{ "bluz71/vim-moonfly-colors", name = "moonfly", lazy = false, priority = 1000 },
```
[vim-plug](https://github.com/junegunn/vim-plug):
```vim
Plug 'bluz71/vim-moonfly-colors', { 'as': 'moonfly' }
```
Usage
-----
Enable the colorscheme after the plugin declaration.
```lua
-- Lua initialization file
vim.cmd [[colorscheme moonfly]]
```
```vim
" Vimscript initialization file
colorscheme moonfly
```
Statusline
----------
- The _moonfly_ theme supports
[lightline](https://github.com/itchyny/lightline.vim). To enable the _moonfly_
lightline theme please add the following to your initialization file:
```vim
let g:lightline = { 'colorscheme': 'moonfly' }
```
- The _moonfly_ theme supports
[vim-airline](https://github.com/vim-airline/vim-airline). The _moonfly_ theme
will load once vim-airline starts.
- The _moonfly_ theme supports
[lualine](https://github.com/nvim-lualine/lualine.nvim). The
_moonfly_ theme will load once Lualine starts.
- My [linefly](https://github.com/bluz71/nvim-linefly) `statusline` plugin
supports the _moonfly_ theme.
- Lastly, my legacy
[mistfly-statusline](https://github.com/bluz71/vim-mistfly-statusline) plugin
also supports the _moonfly_ theme.
:wrench: Options
----------------
| Option | Default State
|--------|--------------
| [moonflyCursorColor](https://github.com/bluz71/vim-moonfly-colors#moonflycursorcolor) | Disabled
| [moonflyItalics](https://github.com/bluz71/vim-moonfly-colors#moonflyitalics) | Enabled
| [moonflyNormalFloat](https://github.com/bluz71/vim-moonfly-colors#moonflynormalfloat) | Disabled
| [moonflyTerminalColors](https://github.com/bluz71/vim-moonfly-colors#moonflyterminalcolors) | Enabled
| [moonflyTransparent](https://github.com/bluz71/vim-moonfly-colors#moonflytransparent) | Disabled
| [moonflyUndercurls](https://github.com/bluz71/vim-moonfly-colors#moonflyundercurls) | Enabled
| [moonflyUnderlineMatchParen](https://github.com/bluz71/vim-moonfly-colors#moonflyunderlinematchparen) | Disabled
| [moonflyVirtualTextColor](https://github.com/bluz71/vim-moonfly-colors#moonflyvirtualtextcolor) | Disabled
| [moonflyWinSeparator](https://github.com/bluz71/vim-moonfly-colors#moonflywinseparator) | `1`
---
### moonflyCursorColor
The `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 initialization file:
```lua
-- Lua initialization file
vim.g.moonflyCursorColor = true
```
```vim
" Vimscript initialization file
let g:moonflyCursorColor = v:true
```
---
### moonflyItalics
The `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 initialization file:
```lua
-- Lua initialization file
vim.g.moonflyItalics = false
```
```vim
" Vimscript initialization file
let g:moonflyItalics = v:false
```
---
### moonflyNormalFloat
The `moonflyNormalFloat` option specifies whether to use moonfly background
and foreground colors in Neovim floating windows. By default this option is
**disabled**, hence, Neovim floating windows will usually be styled with popup
menu colors. If you would like to use moonfly colors instead then add the
following to your configuration:
```lua
-- Lua initialization file
vim.g.moonflyNormalFloat = true
```
```vim
" Vimscript initialization file
let g:moonflyNormalFloat = v:true
```
:bulb: 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:
```lua
vim.o.winborder = "single"
```
---
### moonflyTerminalColors
The `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 initialization file:
```lua
-- Lua initialization file
vim.g.moonflyTerminalColors = false
```
```vim
" Vimscript initialization file
let g:moonflyTerminalColors = v:false
```
---
### moonflyTransparent
The `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 initialization file:
```lua
-- Lua initialization file
vim.g.moonflyTransparent = true
```
```vim
" Vimscript initialization file
let g:moonflyTransparent = v:true
```
---
### moonflyUndercurls
The `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 initialization file
to use underlines instead:
```lua
-- Lua initialization file
vim.g.moonflyUndercurls = false
```
```vim
" Vimscript initialization file
let g:moonflyUndercurls = v:false
```
---
### moonflyUnderlineMatchParen
The `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 initialization
file:
```lua
-- Lua initialization file
vim.g.moonflyUnderlineMatchParen = true
```
```vim
" Vimscript initialization file
let g:moonflyUnderlineMatchParen = v:true
```
---
### moonflyVirtualTextColor
The `moonflyVirtualTextColor` option specifies whether to display diagnostic
virtual text in color. By default this option is **disabled**. If you want to
display diagnostic virtual text in color then add the following to your
initialization file:
```lua
-- Lua initialization file
vim.g.moonflyVirtualTextColor = true
```
```vim
" Vimscript initialization file
let g:moonflyVirtualTextColor = v:true
```
---
### moonflyWinSeparator
The `moonflyWinSeparator` option specifies the style of window separators:
- `0` will display no window separators
- `1` will display block separators; this is the default
- `2` will diplay line separators
For example, if line separators are desired then add the following to your
configuration:
```lua
-- Lua initialization file
vim.g.moonflyWinSeparator = 2
```
```vim
" Vimscript initialization file
let g:moonflyWinSeparator = 2
```
:gift: If using Neovim 0.7 (or later), the following configuration will improve
the look of line separators (if option `2` has been chosen) by selecting thicker
characters for the separators:
```lua
-- Lua initialization file
vim.opt.fillchars = { horiz = '━', horizup = '┻', horizdown = '┳', vert = '┃', vertleft = '┫', vertright = '┣', verthoriz = '╋', }
```
```vim
" Vimscript initialization file
set fillchars=horiz:━,horizup:┻,horizdown:┳,vert:┃,vertleft:┨,vertright:┣,verthoriz:╋
```
Overriding Highlights
---------------------
If a certain highlight of this theme does not suit then it is recommended to use
an `autocmd` to override that desired highlight.
For example, if one wishes to highlight functions in bold then simply add the
following to your initialization file prior to setting the colorscheme:
```lua
-- Lua initialization file
local custom_highlight = vim.api.nvim_create_augroup("CustomHighlight", {})
vim.api.nvim_create_autocmd("ColorScheme", {
pattern = "moonfly",
callback = function()
vim.api.nvim_set_hl(0, "Function", { fg = "#74b2ff", bold = true })
end,
group = custom_highlight,
})
```
```vim
" Vimscript initialization file
augroup CustomHighlight
autocmd!
autocmd ColorScheme moonfly highlight Function guifg=#74b2ff gui=bold
augroup END
```
Palette & Custom Colors (Neovim Only)
-------------------------------------
The `palette` field returns a table of internal theme colors; useful for
constructing custom statuslines and the like.
```lua
require("moonfly").palette
```
Meanwhile the `custom_colors` function allows customization of individual theme
colors. This needs to occur prior to invoking the colorscheme. The full list of
available colors is provided by the `palette` field.
```lua
require("moonfly").custom_colors({
bg = "#121212",
violet = "#ff74b8",
})
vim.cmd([[colorscheme moonfly]])
```
True Color Terminals
--------------------
Many modern terminals support [24-bit true
colors](https://gist.github.com/XVilka/8346728). Current versions of Vim &
Neovim, on such terminals, support true colors when the `termguicolors` option
is enabled.
On terminals that support true colors, and when `termguicolors` is set, the
_moonfly_ colorscheme will not require any terminal configuration to emit the
correct theme colors.
For the true color _moonfly_ colorscheme 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 settings
be added to the `~/.vimrc` file:
```vim
let &t_8f = "\[38;2;%lu;%lu;%lum"
let &t_8b = "\[48;2;%lu;%lu;%lum"
```
Extras
------
A collection of _moonfly_-flavoured extras for various terminals and tools:
| Program | Extra
|------------------------------------------------------------|----------------------------------------------------------------
| [Alacritty](https://github.com/alacritty/alacritty) | [extras/alacritty](extras/moonfly-alacritty.toml)
| [bat](https://github.com/sharkdp/bat) | [fly16](https://github.com/bluz71/fly16-bat)
| [Fish Shell](https://fishshell.com) | [extras/fish](extras/moonfly.fish)
| [fzf](https://junegunn.github.io/fzf) | [extras/fzf](extras/moonfly-fzf.sh)
| [Ghostty](https://mitchellh.com/ghostty) | [extras/ghostty](extras/moonfly-ghostty.conf)
| [iTerm2](https://iterm2.com) | [extras/iterm2](extras/moonfly.itermcolors)
| [kitty](https://sw.kovidgoyal.net/kitty) | [extras/kitty](extras/moonfly-kitty.conf)
| [Starship](https://starship.rs/) | [extras/starship](extras/moonfly-starship.toml)
| [tmux](https://github.com/tmux/tmux) | [extras/tmux](extras/moonfly.tmux)
| [WezTerm](https://wezfurlong.org/wezterm) | [extras/wezterm](extras/moonfly-wezterm.toml)
| [Windows Terminal](https://github.com/microsoft/terminal) | [extras/windows-terminal](extras/moonfly-windows-terminal.json)
| [Xresources](https://wiki.archlinux.org/title/X_resources) | [extras/Xresources](extras/moonfly.Xresources)
| [Yazi](https://yazi-rs.github.io) | [moonfly.yazi](https://github.com/tkapias/moonfly.yazi)
| [Zellij](https://zellij.dev) | [extras/zellij](extras/moonfly-zellij.kdl)
Terminal Colors
---------------
| Type | Category | Value | Color
|----------------|-----------------|-----------|------------------------------------------------------
| Background | Background | `#080808` | 
| Foreground | Foreground | `#bdbdbd` | 
| Bold | Bold | `#eeeeee` | 
| Cursor | Cursor | `#9e9e9e` | 
| Cursor Text | Cursor Text | `#080808` | 
| Selection | Selection | `#b2ceee` | 
| Selection Text | Selection Text | `#080808` | 
| Color 1 | Black (normal) | `#323437` | 
| Color 2 | Red (normal) | `#ff5d5d` | 
| Color 3 | Green (normal) | `#8cc85f` | 
| Color 4 | Yellow (normal) | `#e3c78a` | 
| Color 5 | Blue (normal) | `#80a0ff` | 
| Color 6 | Purple (normal) | `#cf87e8` | 
| Color 7 | Cyan (normal) | `#79dac8` | 
| Color 8 | White (normal) | `#c6c6c6` | 
| Color 9 | Black (bright) | `#949494` | 
| Color 10 | Red (bright) | `#ff5189` | 
| Color 11 | Green (bright) | `#36c692` | 
| Color 12 | Yellow (bright) | `#c6c684` | 
| Color 13 | Blue (bright) | `#74b2ff` | 
| Color 14 | Purple (bright) | `#ae81ff` | 
| Color 15 | Cyan (bright) | `#85dc85` | 
| Color 16 | White (bright) | `#e4e4e4` | 
Sponsor
-------
[](https://ko-fi.com/bluz71)
License
-------
[](https://opensource.org/licenses/MIT)