Note
This is a maintained hard fork of drewtempelmeyer/palenight.vim.
Dark palenight colorscheme written in Fennel with full support for:
- Tree-sitter
- LSP (including semantic highlighting)
- True-color, 256 and 16 color palette terminals
- And lots of plugins!
Neovim >=0.8 and the following option set:
vim.opt.background = "dark"
Important
If you are using an old version of nvim-treesitter (the one which uses an old capture naming scheme), pin palenight.nvim to old-naming-scheme
tag.
Lazy
{ "alexmozaidze/palenight.nvim" }
Packer
use "alexmozaidze/palenight.nvim"
vim.cmd.colorscheme "palenight"
Note
Setup is completely optional, you only need it to set options. Plugin loads by itself when you set colorscheme.
Here are the default options:
{
-- Some terminals don't display italics very well,
-- thus, they're disabled by default.
italic = false,
-- Fallback color palette for non-truecolor terminals,
-- such as tty or some really old terminal.
--
-- Available options:
-- "auto" => 16 color palette if in linux tty, 256 otherwise.
-- 256 => 256 color palette.
-- 16 => 16 color palette.
cterm_palette = "auto",
}
Many plugins are supported, the most important ones being:
- lualine.nvim
- rainbow-delimiters.nvim
- gitsigns.nvim
- indent-blankline.nvim
- hlargs.nvim
- nvim-hlslens
- modicator.nvim
- marks.nvim
- nvim-cmp
For full list of supported plugins, see groups.fnl.
If you have a plugin that isn't supported, feel free to file an issue or make a pull request!
Neovim already has an easy way of overriding colors of a colorscheme. Here's an example!
local colors = require "palenight/colors/truecolor"
local hl = vim.api.nvim_set_hl
local autocmd = vim.api.nvim_create_autocmd
autocmd("ColorScheme", {
pattern = "palenight",
callback = function()
-- Directly setting a color
hl(0, "Operator", { fg = colors.purple })
-- Linking to another highlight group
hl(0, "Operator", { link = "Macro" })
end,
})
For list of available colors check out colors/truecolor.fnl.
Also check out :help nvim_set_hl()
and :help nvim_create_autocmd()
.
If you want to change the internal color/group table - you can, but I don't know why you'd want this. Here's an example using Lazy:
{
"alexmozaidze/palenight.nvim",
init = function()
-- Changing internal colors
local colors = require "palenight/colors/truecolor"
colors.comment = "#ff00ff"
-- Changing internal group table
local groups = require "palenight/groups"
groups["@function"].fg = "#ff0000"
end,
}
Important
The order in which you require these modules is important. Require colors before requiring groups.
It's not recommended you modify the internals, but you can, and no one can stop you.
Hop over on discussions and ask away!