Home

Awesome

Default Settings Preview

lua preview

Introduction

nvim-deus is a colorscheme template repository for Neovim 0.5+.

This is the config I modify from vim-deus, inspired by @theniceboy

This template's defaults focus on:

  1. Compatability with semantic highlighting.
    • I was using colorschemes that often did not provide enough highlight groups to provide distinction between tokens.
  2. Visibility in any range of blue-light.
    • I use redshift often, and many colorschemes did not allow for me to see when I had lower color temperatures.

This template's design focuses on:

  1. Ease of use and rapid development.
    • New features may simply be integrated with current configurations, rather than rewritten over them.
    • Merging with the upstream repository is simplified by GitHub, allowing you to select what new defaults to add.
    • It provides a large supply of defaults for plugins and programming languages.
      • Define a smaller set of "categorical" highlights (see Neovim's group-name help page) and many more will link automatically.
  2. Inversion of Control
    • Changes made to the highlighting algorithm won't affect how you write your colorscheme.
    • New highlight group attributes which are unaccounted for in older versions will simply be ignored without errors due to Lua's tables.

Prerequisites

  1. Neovim 0.5+

Installation

Creating Your Own

  1. Fork this repository, or clone it with git clone https://github.com/Iron-E/nvim-highlite.
  2. Follow the instructions in colors/deus.vim.
    • If you are on a Unix system, use the setup script like so:
    chmod +x ./setup.sh
    ./setup.sh deus <colorscheme>
    
    Where <colorscheme> is the name of your desired colorscheme.
    • If you are on Windows, rename the files manually.

Just The Defaults

  1. Install a plugin manager such as vim-plug and use it to "plug" this repository.
    " vim-plug example
    Plug "tandy1229/nvim-deus"
    
  2. Specify this colorscheme as your default colorscheme in the init.vim:
    " Enable 24-bit color output. Only do this IF your environment supports it.
    " This plugin is fully compatible with 8-bit, 16-bit, and 24-bit colors.
    set termguicolors
    " Use the colorscheme
    colorscheme deus
    

Usage

Examples

This repository in itself is an example of how to use nvim-deus. Aside from this, the following colorschemes are built using nvim-deus:

As Dependency

Below is an example of how to use nvim-deus as a dependency.

-- Import nvim-deus
local deus = require('deus')

-- First, define some colors
local red = {'#FF0000', 1, 'red'}
local black = {'#000000', 0, 'black'}
local white = {'#FFFFFF', 255, 'white'}

-- Highlight 'Identifier'
deus.highlight('Identifier', {bg=red, fg=black, style='bold'})

-- Highlight 'Function' conditionally according to background color.
deus.highlight('Function', {bg=black, fg=red, light={bg=white}})

-- Link 'Example' to 'Identifier'
deus.highlight('Example', 'Identifier')

-- You can also reference specific attributes of another highlight group.
deus.highlight('AnotherExample', {bg=deus.group'SpellBad'.bg, fg=white})

As Template

Below is an example of how to use nvim-deus as a template.

-- First, define some colors
local red = {'#FF0000', 1, 'red'}
local black = {'#000000', 0, 'black'}
local white = {'#FFFFFF', 255, 'white'}

-- Next define some highlight groups.
local highlight_groups = {
	-- Any field which can be set to "NONE" doesn't need to be set, it will be automatically assumed to be "NONE".
	Identifier = {bg=red, fg=black, style='bold'},
	-- If your colorscheme should respond to multiple background settings, you can do that too:
	Function = {bg=black, fg=red, light={bg=white}},
	--[[ Note that light/dark differentiation is completely optional. ]]

	-- You can also reference specific attributes of another highlight group.
	SomethingElse = function(self) return {fg=self.Identifier.fg, bg=self.Function.bg} end,
}

-- The rest is mostly handled by the template.

FAQ

Why am I receiving E5108: Error executing lua [string ":lua"]:1: module '<colorscheme>' not found?

Ensure your colorscheme's base folder is in Neovim's rtp before sourcing.

What syntax files should I use for X language?

You can either use nvim-treesitter, nvim-polyglot, or one of the following:

LanguageSyntax Plugin
ALGOLsterpe/vim-algol68
C++bfrg/vim-cpp-modern
Coqwhonore/Coqtail
Dartdart-lang/dart-vim-plugin
DTracevim-scripts/dtrace-syntax-file
F#ionide/Ionide-vim
GasShirk/vim-gas
Gittpope/vim-git
Gofatih/vim-go
GraphVizliuchengxu/graphviz
HTML5othree/html5
i3confmboughaba/i3config
JSONelzr/vim-json
Javauiiaoo/java-syntax
JavaScriptpangloss/vim-javascript
JuliaJuliaEditorSupport/julia-vim
Kotlinudalov/kotlin-vim
LESSgroenewege/vim-less
LLVMrhysd/vim-llvm
Luatbastos/vim-lua
Markdownplasticboy/vim-markdown
MIPSvim-scripts/mips
Moonscriptleafo/moonscript-vim
PlantUMLaklt/plantuml-syntax
Prettierprettier/vim-prettier
Pythonvim-python/python-syntax
Razoradamclerk/vim-razor
RSTmarshallward/vim-restructuredtext
Rubyvim-ruby/vim-ruby
SCSScakebaker/scss-syntax
SQLshmup/vim-sql-syntax
Shellarzg/vim-sh
Styluswavded/vim-stylus
SystemDwgwoods/vim-systemd-syntax
SystemTapnickhutchinson/vim-systemtap
TOMLcespare/vim-toml
TeXlervag/vimtex
UngrammarIron-E/vim-ungrammar
VB.NETvim-scripts/vbnet
Vim LogsMTDL9/vim-log-highlighting
XMLamadeus/vim-xml
YAMLstephpy/vim-yaml
YATSHerringtonDarkholme/yats

Contribution

This repository is looking for contributions! The following things are appreciated:

If you would like to contribute something, and you aren't sure how, open a ticket! I'd love to help you help me.