Skip to content

nosvagor/vagari.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

41 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

β˜„οΈ vagari.nvim πŸ‘¨β€πŸ’»

Β  Β  Β 



  → a port of the vagari color scheme for neovim, written in lua, and heavily influenced by treesitter.


Basic Usage

Note requires treesitter 0.8+

Install using packer

use "nosvagor/vagari.nvim",

-- then inside init.lua
vim.cmd(colorscheme vagari)

Install using lazy

require("lazy").setup({
    {
        "nosvagor/vagari.nvim",
        priority = 1000,
        config = function()
            vim.cmd.colorscheme("vagari")
        end,
    },
    -- ...

Relevant treesitter setups:

require("nvim-treesitter.configs").setup({
    -- simmply install all parsers
    ensure_installed = "all",
    -- ...

    -- or at least install some essential ones:
    ensure_installed = { "c", "lua", "vim", "help", "query", "comment" },
    -- https://github.com/nvim-treesitter/nvim-treesitter/blob/master/lua/nvim-treesitter/parsers.lua

    -- ...

Configuration

Customized settings for vagari are not supported, yet. The color scheme needs to mature before premature abstraction limits backwards compatibility. For now, a strong default is being explored and developed.

In the meantime, I suggest forking the color scheme and editing settings you'd prefer to change. Consider a pull request after you're done editing, perhaps your idea is a better for the default settings!

  • Extend or modify the palette here: palette.lua
  • thalamus.lua is an attempt to route all color assignments to a standardized location, instead of links.

    The goal is to bring clarity to the semantic mappings behind color choices, and make the colors scheme more adaptable across contexts, plugins, and eventually applications.

  • Direct changes to groups can be done here: highlights.lua

    Changes to particular file types can be done under treesitter_queries.
    Changes to plugins are also found in this file; treesitter playground is highly recommended.

In the future, the ability to simply override options will be supplied, once various integrations mature.


Integrations

lualine.nvim
require('lualine').setup {
    options = {
        theme = "vagari"
        -- ... the rest of your lualine config
    }
}

Or import edit the theme table directly (lua/lualine/themes/vagari.lua):

local p = require("vagari.palette")

local custom_vagari = {
	normal = {
		a = { bg = p.blu_2, fg = p.drk_0 },
		b = { fg = p.blu_2, bg = p.glc_1 },
		c = { fg = p.glc_4, bg = p.drk_0 },
	},
	insert = {
		a = { bg = p.grn_2, fg = p.drk_0 },
		b = { fg = p.grn_2, bg = p.glc_1 },
	},
	command = {
		a = { bg = p.orn_2, fg = p.drk_0 },
		b = { fg = p.orn_3, bg = p.glc_1 },
	},
	visual = {
		a = { bg = p.prp_2, fg = p.drk_0 },
		b = { fg = p.prp_2, bg = p.glc_1 },
	},
	replace = {
		a = { bg = p.emr_2, fg = p.drk_0 },
		b = { fg = p.emr_2, bg = p.glc_1 },
	},
	-- inactive = { -- TODO: (inactive color config not tested)
	-- 	a = {},
	-- 	b = {},
	-- 	c = {},
	-- },
}

require('lualine').setup {
    options = {
        theme = custom_vagari
        -- ... the rest of your lualine config
    }
}

Or, if you have custom modules, e.g.:

local p = require("vagari.palette")

local filename = {
    "filename",
    file_status = true,
    path = 0,
    icon = "",
    symbols = {
        modified = "🞊",
        readonly = "ο€£",
        unnamed = "名前?",
    },
    color = function()
        local mode_color = {
            n = p.blu_4,
            i = p.grn_4,
            v = p.prp_4,
            V = p.prp_4,
            c = p.orn_4,
            R = p.emr_4,
            s = p.cyn_4,
            S = p.cyn_4,
            ["οΏ½"] = p.prp_4,
        }
        return { fg = mode_color[vim.fn.mode()] }
    end,
}

require('lualine').setup {
    -- ...
	sections = {
		lualine_a = { mode }, -- mode is customized in this example
		lualine_b = { branch, filename }, -- so is branch
    -- ...
}

🌈 Inspiration

  πŸ₯‡ Catppuccin πŸ₯‡
Tokyo NightΒ πŸ₯ˆΒ  πŸ₯‰ Gruvbox

worthy mentions: Onedark, Iceberg, Nord, Solarized

  

About

🎨 an implementation of the vagari colorscheme for neovim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages