Awesome
<div align="center"> <h1>๐ฆ night-owl.nvim ๐</h1> <a href="#contributors"> <img src="https://img.shields.io/github/all-contributors/oxfist/night-owl.nvim?color=ee8449&style=flat-square" alt="All Contributors"></img> </a> </div> <div align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/oxfist/night-owl.nvim/main/img/light_logo.png" alt="Illustration of an owl"> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/oxfist/night-owl.nvim/main/img/dark_logo.png" alt="Illustration of an owl"> <img src="img/light_logo.png" height="300" alt="Illustration of an owl" /> </picture> <img src="img/calculator.png" /> </div>The best implementation of Sarah Drasner's Night Owl VSCode theme for Neovim with support for Tree-sitter and semantic tokens.
๐ฆ Install In Zero Time
packer.nvim
use("oxfist/night-owl.nvim")
lazy.nvim
require("lazy").setup({
"oxfist/night-owl.nvim",
lazy = false, -- make sure we load this during startup if it is your main colorscheme
priority = 1000, -- make sure to load this before all the other start plugins
config = function()
-- load the colorscheme here
require("night-owl").setup()
vim.cmd.colorscheme("night-owl")
end,
})
vim-plug
Plug 'oxfist/night-owl.nvim'
๐ Start Using With A Single Line
<!-- prettier-ignore-start --><!-- prettier-ignore-end -->[!NOTE] You can skip this step if you followed the
lazy.nvim
setup (that already sets the colorscheme).
Add the following to your Lua configuration files, e.g.
~/.config/nvim/init.lua
(your actual path might be different):
require("night-owl").setup()
vim.cmd.colorscheme("night-owl")
To enable night-owl
for lualine.nvim
, simply set the theme like this in your
settings ๐:
-- This Lualine config should be somewhere in your config files
require('lualine').setup {
options = {
-- ... other configs
theme = 'night-owl'
-- ... other configs
}
}
โ๏ธ Configuration
The styling of the theme can be customized by calling setup()
:
local night_owl = require("night-owl")
-- ๐ Add your own personal settings here
--@param options Config|nil
night_owl.setup({
-- These are the default settings
bold = true,
italics = true,
underline = true,
undercurl = true,
transparent_background = false,
})
๐ฅ๏ธ Requirements
TODO
๐ Comparison
How does this port compare to the original VSCode theme? Check it out!
Original Night Owl for VSCode | This Theme ๐คฉ |
---|---|
<img src="./img/vscode.png" alt="Screenshot of VSCode theme" width="1062" /> | <img src="./img/neovim.png" alt="Screenshot of this theme" width="1078" /> |
โจ Why Should You Pick This Version of Night Owl?
This implementation of Night Owl solves several syntax highlight issues and discrepancies similar ports have when comparing to the original VSCode theme.
The following features allow making the programming experience as close to the original VSCode theme as possible:
- Extended highlight groups: through additional Treesitter queries. See
after/queries
for implementation details. - Different background color when Neovim is inactive: through autocommands.
See
after/plugin/autocmds.lua
for implementation details.
With Treesitter installed you can see the overall look and feel is significantly different:
- Different colors for several keywords like
let
,const
,async
,function
, etc. Same happens for class namesEditFishForm
andSale
. - Italics not applied anywhere except for comments.
- Italics incorrectly applied to JSDoc keywords
@param
and@returns
. <br />
haishanh/night-owl.vim | This Theme |
---|---|
<img src="./img/haishanh.png" alt="Screenshot of haishanh theme" width="900" /> | <img src="./img/neovim.png" alt="Screenshot of this theme" width="1014" /> |
Language Support ๐
<table class="languages-table"> <tr> <td style="vertical-align: middle"><img src="https://upload.wikimedia.org/wikipedia/commons/6/6a/JavaScript-logo.png" title="JavaScript" alt="JavaScript" width="50" /></td> <td style="vertical-align: middle"><img src="https://upload.wikimedia.org/wikipedia/commons/4/4c/Typescript_logo_2020.svg" title="TypeScript" alt="Typescript" width="50" /></td> <td style="vertical-align: middle"><img src="https://upload.wikimedia.org/wikipedia/commons/c/c9/JSON_vector_logo.svg" title="JSON" alt="JSON" width="50" /></td> <td style="vertical-align: middle"> <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/41/1280px_Markdown_with_White_Background.png/320px-1280px_Markdown_with_White_Background.png" title="Markdown" alt="Markdown" width="50" /> </td> <td style="vertical-align: middle"><img src="https://upload.wikimedia.org/wikipedia/commons/c/cf/Lua-Logo.svg" title="Lua" alt="Lua" width="50" /></td> </tr> <tr> <td style="vertical-align: middle"><img src="https://upload.wikimedia.org/wikipedia/commons/9/9f/Vimlogo.svg" alt="Vimscript" width="50" /></td> <td style="vertical-align: middle"><img src="https://upload.wikimedia.org/wikipedia/commons/1/1b/R_logo.svg" alt="R" width="50" /></td> <td style="vertical-align: middle"><img src="https://upload.wikimedia.org/wikipedia/commons/c/c3/Python-logo-notext.svg" alt="Python" width="50" /></td> <td style="vertical-align: middle"><img src="https://upload.wikimedia.org/wikipedia/commons/8/82/Gnu-bash-logo.svg" alt="Bash" width="50" /></td> <!-- <td><img src="https://upload.wikimedia.org/wikipedia/commons/d/d5/Rust_programming_language_black_logo.svg" alt="Rust" width="50" style="filter: grayscale(100%) blur(2px)"/></td> --> <!-- <td><img src="https://upload.wikimedia.org/wikipedia/commons/7/73/Ruby_logo.svg" alt="Ruby" width="50" style="filter: grayscale(100%) blur(2px)"/></td> --> </tr> </table> <!-- prettier-ignore-start --><!-- prettier-ignore-end -->[!NOTE] I've personally optimized the colorscheme styling and robustness for these languages extensively enough to confidently say they look acceptable to me. If you happen to build software with them, then I invite you to try out this theme! ๐
Coming Soon:
- Lua โ
- Vimscript โ
- R โ
- Python โ
- Bash โ
- TSX, Rust, Ruby, and many more!
๐งฉ Plugins Supported
- nvim-treesitter
- nvim-tree
- lualine.nvim
- indent-blankline.nvim
v2
andv3
- toggleterm.nvim
- gitsigns.nvim
๐ Credits
- Sarah Drasner first and foremost, for creating such a beautiful and artistic color scheme that has made, for me personally, so much more pleasurable the exhilirating act of building software.
- https://www.monolisa.dev/ for one of the sweetest programming fonts out there.
- Christian Chiarulli for creating
colorgen-nvim
, an essential tool that helped me get started with this implementation.