Skip to content

srcery-colors/srcery-vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

514 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Website

An occult color scheme for (n)vim. Perform your dark magick using clearly defined contrasting colors with a pinch of earthly tint for that lived-in feel.

Introduction

Created using colors that logically adheres to the 16 color base palette of a given terminal, while trying to retain its own identity. The colors are designed to be easy on the eyes yet contrast well with the background for long sessions using an editor or terminal emulator.

Screenshots

C Rust Python Typescript Popup
Diagnostic Diff View Markdown Terminal

Requirements

Most modern terminal supports 24bit color, and srcery works best with that, but 8bit color is also supported as a fallback.

Tip

We maintain a repository of terminal configurations if you also want to set your terminal color scheme to match vim.

Installation

Manually

Use colors/srcery.vim however you want, or use your favorite plugin manager to install. For some plugin themes to work you need to clone the entire project, and put it on your runtimepath.

Vim 8

Vim 8 has native support for loading plugins by using packages. All you need to do to, is to clone this repository into ~/.vim/pack/themes/opt.

git clone https://github.com/srcery-colors/srcery-vim ~/.vim/pack/themes/opt/srcery-vim

And then set your .vimrc accordingly.

packadd! srcery-vim
colorscheme srcery

The same works for Neovim, but you have to clone it into a path where Neovim can find it.

git clone https://github.com/srcery-colors/srcery-vim $XDG_CONFIG_HOME/nvim/pack/themes/opt
dein.vim

github.com/Shougo/dein.vim

call dein#add('srcery-colors/srcery-vim')
vim-pathogen

github.com/tpope/vim-pathogen

cd ~/.vim/bundle
git clone https://github.com/srcery-colors/srcery-vim
vim-plug

github.com/junegunn/vim-plug

Plug 'srcery-colors/srcery-vim'
packer

github.com/wbthomason/packer.nvim

use {'srcery-colors/srcery-vim', as = 'srcery'}
lazy.nvim

github.com/folke/lazy.nvim

{
    "srcery-colors/srcery-vim",
    lazy = false,
    priority = 1000,
}
vim.pack

Neovim Manual page

vim.pack.add({
  { src = 'https://github.com/srcery-colors/srcery-vim' },
})

Usage

:colorscheme srcery

Add this to your config to make it permanent:

Lua:

vim.cmd.colorscheme('srcery')

vimrc:

colorscheme srcery

Configuration

Srcery includes a few configuration options to customize your experience. To change any of these you’d put something like this in your .vimrc or init.lua:

" vimrc:
let g:srcery_normal_float = 1
-- init.lua:
vim.g.srcery_normal_float = 1

Make sure that you set these variables before assigning colorscheme.

Options

var description default
g:srcery_bold Enables bold text 1 (enabled)
g:srcery_italic Enables italic text 1 (enabled)
g:srcery_underline Enables underlined text 1 (enabled)
g:srcery_undercurl Enables undercurled text 1 (enabled)
g:srcery_strikethrough Enables strikethrough text 1 (enabled)
g:srcery_inverse Enables inverse highlighting for visual selection, search, etc 1 (enabled)
g:srcery_guisp_fallback Use alternate highlighting where colored underline/undercurl is unsupported. Set to either 'fg' or 'bg' 'NONE' (Disabled)
g:srcery_normal_float Use srcery colors for floating window background and border 0 (disabled)

Colors

You can customize each of Srcery's colors, to customize say the red color:

vimrc:

let g:srcery_red = '#FF0000'

lua:

vim.g.srcery_red = '#FF0000'

You can also separately set a different background color g:srcery_background, instead of the default g:srcery_black

Tip

Setting this variable to 'NONE' will make the background inside vim transparent

Expand for a list of all color variables
Variable Default Swatch
g:srcery_black #121110 black
g:srcery_red #EF2F27 red
g:srcery_green #519F50 green
g:srcery_yellow #FBB829 yellow
g:srcery_blue #2C78BF blue
g:srcery_magenta #E02C6D magenta
g:srcery_cyan #0AAEB3 cyan
g:srcery_white #C5B088 white
g:srcery_bright_black #917E6B bright_black
g:srcery_bright_red #F75341 bright_red
g:srcery_bright_green #98BC37 bright_green
g:srcery_bright_yellow #FED06E bright_yellow
g:srcery_bright_blue #68A8E4 bright_blue
g:srcery_bright_magenta #FF5C8F bright_magenta
g:srcery_bright_cyan #2BE4D0 bright_cyan
g:srcery_bright_white #FCE8C3 bright_white
g:srcery_dark_green #294229 dark_green
g:srcery_dark_red #4F2321 dark_red
g:srcery_dark_blue #1E5181 dark_blue
g:srcery_dim_green #2E5C2E dim_green
g:srcery_orange #FF5F00 orange
g:srcery_bright_orange #FF8700 bright_orange
g:srcery_teal #008080 teal
g:srcery_gray1 #1C1B19 gray1
g:srcery_gray2 #262522 gray2
g:srcery_gray3 #312F2C gray3
g:srcery_gray4 #3B3935 gray4
g:srcery_gray5 #45433E gray5
g:srcery_gray6 #504D47 gray6

Statusline

Srcery supports several statuslines, they all follow the same coloring scheme with some minor differences.

statusline preview

  • Lualine loads automatically.
  • Airline loads automatically.
  • Lightline. To use it, include srcery value in your lightline configuration:
    let g:lightline = { 'colorscheme': 'srcery' }
    vim.g.lightline = { colorscheme = 'srcery' }

Attribution

This project started as essentially a palette swap of Gruvbox. Srcery has since taken a life of its own, but the DNA of Gruvbox is still present. Big thank you to morhetz and other contributors.

Aside from Gruvbox, these themes have also been an inspiration, and often been an example on how to write (n)vim color schemes.

License

Copyright (c) 2018 for portions of Srcery are held by morhetz as part of Gruvbox.

All other Copyright (c) 2021 for Srcery are held by Daniel Berg and contributors of Srcery.

MIT License

About

An occult color scheme for (n)vim. Perform your dark magick using clearly defined contrasting colors with a pinch of earthly tint for that lived-in feel.

Topics

Resources

License

Stars

Watchers

Forks

Contributors