Thanks to visit codestin.com
Credit goes to github.com

Skip to content

jpwol/thorn.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Thorn

Previews

Dark Warm
Dark Cold
Light Warm
Light Cold

Features

If you want support for a plugin, please ask for it and it WILL be added!

Installation

lazy.nvim

{
    "jpwol/thorn.nvim",
    lazy = false,
    priority = 1000,
    opts = {}
}

packer.nvim

use {
    "jpwol/thorn.nvim",
    config = function()
        require("thorn").setup({})
    end,
}

vim-plug

Plug 'jpwol/thorn.nvim', { 'branch': 'main' }

Usage

-- after plugin is loaded by your manager
vim.cmd([[colorscheme thorn]])

For LuaLine

require("lualine").setup({
    options = {
        theme = "thorn" -- "auto" also detects theme automatically
    }
})

Configuration

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'

        styles = {
            keywords = { italics = true, bold = false },
            comments = { italics = true, bold = false },
            strings  = { italics = 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, },
            },
        },

        transparent = false, -- transparent background

        on_highlights = function(hl, palette) end, -- apply your own highlights
    },
}

Where on_highlights will be a function, and you can edit any highlight group using hl.<Highlight Group>.<attribute> = <option>. An example of this would be:

on_highlight = function(hl, palette)
    hl.String.bold = true
    hl.Function.fg = "#ffffff"
end