A Lua port of the everforest colour scheme.
Dark | Light | |
---|---|---|
Hard | ||
Medium (default) | ||
Soft |
All screenshots taken from my personal config
Using lazy.nvim:
require("lazy").setup({
"neanias/everforest-nvim",
version = false,
lazy = false,
priority = 1000, -- make sure to load this before all the other start plugins
-- Optional; default configuration will be used if setup isn't called.
config = function()
require("everforest").setup({
-- Your config here
})
end,
})
Using packer.nvim:
use({
"neanias/everforest-nvim",
-- Optional; default configuration will be used if setup isn't called.
config = function()
require("everforest").setup()
end,
})
Using vim-plug:
Plug 'neanias/everforest-nvim', { 'branch': 'main' }
" In VimL
" This has both light & dark modes to match your background setting.
colorscheme everforest
-- In Lua
vim.cmd([[colorscheme everforest]])
-- Alternatively
require("everforest").load()
To enable the everforest theme for LuaLine, you can specify it as such:
require("lualine").setup({
options = {
-- ... other configuration
theme = "everforest", -- Can also be "auto" to detect automatically.
}
})
Please note that LspSaga uses Diagnostic{Warning,Error,Info,Hint}
highlight
groups to define its borders for diagnostic pop-ups, especially in
diagnostic_jump_{next,prev}
. As discussed in the Sonokai
repo, this is not a good idea
and there is no plan to change core highlights for one plugin.
To prevent the problem of squiggly lines in LspSaga diagnostic windows,
please set the diagnostic.border_follow
configuration option to false
.
Configuration options aren't as comprehensive as the original everforest theme yet.
This colour scheme has a light and a dark mode which are configured using the
vim background setting: :set background=light
or vim.o.background=dark
as
appropriate.
To find all possible palette colours, please see colours.lua
.
For example, you could override the Diagnostic group of highlights to remove the undercurl:
require("everforest").setup({
on_highlights = function(hl, palette)
hl.DiagnosticError = { fg = palette.none, bg = palette.none, sp = palette.red }
hl.DiagnosticWarn = { fg = palette.none, bg = palette.none, sp = palette.yellow }
hl.DiagnosticInfo = { fg = palette.none, bg = palette.none, sp = palette.blue }
hl.DiagnosticHint = { fg = palette.none, bg = palette.none, sp = palette.green }
end,
})
If you want to tweak or amend an existing highlight group you need to add the
colours that aren't changing as well as your new styles. This is because the
highlights defined in the on_highlights
method will override the default
highlights.
Here's an example of adding a bold styling to the TSBoolean
highlight group:
require("everforest").setup({
on_highlights = function(hl, palette)
-- The default highlights for TSBoolean is linked to `Purple` which is fg
-- purple and bg none. If we want to just add a bold style to the existing,
-- we need to have the existing *and* the bold style. (We could link to
-- `PurpleBold` here otherwise.)
hl.TSBoolean = { fg = palette.purple, bg = palette.none, bold = true }
end,
})
To clear any highlight groups, simply set them to {}
:
require("everforest").setup({
on_highlights = function(hl, palette)
hl.TSDanger = {}
end,
})
To find the existing palette colours, please see colours.lua
.
For instance, if you use a dark background and want to use a darker hue for red, you could use the following configuration:
require("everforest").setup({
colours_override = function (palette)
palette.red = "#b86466"
end
})
See the wiki for the full list of plugins that have highlights.
background
transparent_background
dim_inactive_windows
disable_italic_comments
enable_italic
— this is italic
in everforest-nvimcursor
~sign_column_background
spell_foreground
ui_contrast
show_eob
current_word
diagnostic_text_highlight
diagnostic_line_highlight
diagnostic_virtual_text
disable_terminal_colours
colours_override