/moonlight.nvim

A cool, dark colour scheme for Neovim, written in Lua. Inspired by vim-substrata.

Primary LanguageLua

🌝 Moonlight

A cold, dark color scheme for Neovim written in Lua ported from moonlight.nvim theme.

✨ Features

  • Supports the latest Neovim 0.6 features like TreeSitter and LSP
  • Terminal colors inside Neovim
  • Color themes for terminals:
    • alacritty

Plugin Support

⚡️ Requirements

  • Neovim >= 0.5.1

📦 Installation

Install the theme with your preferred package manager:

vim-plug

Plug 'astridlyre/moonlight.nvim'

packer

use 'astridlyre/moonlight.nvim'

🚀 Usage

Enable the colorscheme:

-- Lua
vim.cmd [[colorscheme moonlight]]
" Vim Script
colorscheme moonlight

⚙️ Configuration

Configuration needs to be set BEFORE loading the color scheme with colorscheme moonlight

Option Default Description
moonlight_italic_comments true Make comments italic
moonlight_italic_keywords false Make keywords italic
moonlight_italic_booleans false Make booleans italic
moonlight_italic_functions false Make functions italic
moonlight_italic_variables false Make variables italic
moonlight_transparent false Disable background color
moonlight_variant default Colorscheme variant
-- Example config in lua
vim.g.moonlight_italic_functions = true

-- Load the colorscheme
vim.cmd [[colorscheme moonlight]]
" Example config in Vim Script
let g:moonlight_italic_functions = 1

" Load the colorscheme
colorscheme moonlight

Preview

Terminal

01-gnome-terminal

Shell script

02-shell-script

Markdown

03-markdown

YAML

04-yaml

Rust

05-rust

HTML

06-html

CSS

07-css

JavaScript

08-js

☑️ Extras

  • Alacritty color theme: extras/alacritty/moonlight.yml

👍 Credits