Thorn is a rich, green theme made to solve two issues with many themes:
Many themes have a vast amount of highlights, creating a sort of abstract painting when looking at code. Thorn aims to cut down on the amount of different colors with a small palette, making code much more traversable at a glance.
A lot of dark themes are only dark in the sense of their backgrounds. For those with sensitive eyes, high contrast highlights can be straining after awhile. Thorn mitigates this by using soft, low-contrast highlights that are still easily readable, making a long session much more sustainable on the eyes.
- Written in 100% Lua
- Dark and Light themes available, each with a warm and cold background
- See Configuration for details
- Plugin support
- Comes with added themes for other applications (see extras)!
Note
If you want support for a plugin, open an issue and it WILL be added!
{
"jpwol/thorn.nvim",
lazy = false,
priority = 1000,
opts = {}
}use {
"jpwol/thorn.nvim",
config = function()
require("thorn").setup({})
end,
}Plug 'jpwol/thorn.nvim', { 'branch': 'main' }-- after plugin is loaded by your manager
vim.cmd([[colorscheme thorn]])For LuaLine
require("lualine").setup({
options = {
theme = "thorn" -- "auto" also detects theme automatically
}
})thorn provides a good amount of customization options, as well as a way to change the color/style of any highlight group of your choosing.
In your plugin setup (lazy.nvim plugin structure used as reference),
return {
"jpwol/thorn.nvim",
lazy = false,
priority = 1000,
opts = {
theme = nil, -- 'light' or 'dark' - defaults to vim.o.background if unset
background = "warm", -- options are 'warm' and 'cold'
transparent = false, -- transparent background
terminal = true, -- terminal colors
styles = {
keywords = { italic = true, bold = false },
comments = { italic = true, bold = false },
strings = { italic = true, bold = false },
diagnostic = {
underline = true, -- if true, flat underlines will be used. Otherwise, undercurls will be used
-- true will apply the bg highlight, false applies the fg highlight
error = { highlight = true, },
hint = { highlight = false, },
info = { highlight = false, },
warn = { highlight = false, },
},
},
on_highlights = function(hl, palette) end, -- apply your own highlights
},
}Where on_highlights will be a function, and you can edit any highlight group as follows
on_highlights = function(hl, palette)
-- setting options by member preserves other options for that group
hl.String.bold = true
hl.Function.fg = "#D9ADD4"
-- setting options by table will CLEAR any other options for that group
hl.Keyword = { fg = "#F9ADA0", italic = true } -- would clear bold and bg if they were set
-- you can also use the theme's palette
hl.String.fg = palette.lightgreen
endTo install additional themes from extras, follow these steps
If installing thorn with a neovim package manager, locate the install location. For lazy, it should be ~/.local/share/nvim/lazy/thorn.nvim, but paths may vary depending on distrobution and configuration.
Otherwise, clone this repository with git clone https://github.com/jpwol/thorn.nvim.
Each application (Ghostty/Kitty/Alacritty/Btop) relies on a themes folder within the ~/.config/<application> directory. If you haven't created that folder within the relevant directory, you can simply copy the themes folder directly. Otherwise, copy the contents of the relevant themes folder to your ~/.config/<application>/themes folder.
# assuming you're in the thorn.nvim directory
# copying the contents of the themes folder
cp extras/ghostty/themes/* ~/.config/ghostty/themes/
# OR copying the folder directly
cp -r extras/ghostty/themes ~/.config/ghostty/
# Additionally, you can create a symbolic link (linux)
cp -s extras/ghostty/themes/* ~/.config/ghostty/themes/After this, the theme will be available for whichever application you choose, and you can apply it like you normally would.
For ghostty, you can use ghostty +list-themes to preview the themes, and set them in your config file with theme = Thorn <Style> <Background>.
For kitty, you can simply use kitten themes to preview and apply the theme.
For btop, the theme should appear in the settings menu for selection.
For alacritty, you would use
import = [
# thorn_style_background.toml being one of the 4 provided themes
"~/.config/alacritty/themes/thorn_style_background.toml"
]in your alacritty.toml config file.