All Projects → Iron-E → nvim-highlite

Iron-E / nvim-highlite

Licence: other
A colorscheme template that is "lite" on logic for the developer.

Programming Languages

lua
6591 projects
shell
77523 projects

Projects that are alternatives of or similar to nvim-highlite

code runner.nvim
Neovim plugin.The best code runner you could have, it is like the one in vscode but with super powers, it manages projects like in intellij but without being slow
Stars: ✭ 234 (+43.56%)
Mutual labels:  luajit, nvim, neovim-plugin, nvim-plugin
substitute.nvim
Neovim plugin introducing a new operators motions to quickly replace and exchange text.
Stars: ✭ 82 (-49.69%)
Mutual labels:  nvim, neovim-plugin, nvim-plugin
lspcontainers.nvim
Neovim plugin for lspcontainers.
Stars: ✭ 157 (-3.68%)
Mutual labels:  nvim, neovim-plugin, nvim-plugin
qf helper.nvim
A collection of improvements for the quickfix buffer
Stars: ✭ 70 (-57.06%)
Mutual labels:  nvim, neovim-plugin, nvim-plugin
cutlass.nvim
Plugin that adds a 'cut' operation separate from 'delete'
Stars: ✭ 78 (-52.15%)
Mutual labels:  nvim, neovim-plugin, nvim-plugin
aerial.nvim
Neovim plugin for a code outline window
Stars: ✭ 485 (+197.55%)
Mutual labels:  nvim, neovim-plugin, nvim-plugin
nvim-ghost.nvim
👻 GhostText plugin for Neovim with zero dependencies 🎉 Supports neovim running inside WSL too! 🥳 Windows/Linux/macOS supported out-of-the-box! 😄 (Other OSes need python3.6+ installed)
Stars: ✭ 32 (-80.37%)
Mutual labels:  nvim, neovim-plugin, nvim-plugin
Comment.nvim
🧠 💪 // Smart and powerful comment plugin for neovim. Supports treesitter, dot repeat, left-right/up-down motions, hooks, and more
Stars: ✭ 796 (+388.34%)
Mutual labels:  nvim, neovim-plugin, treesitter
aurora
24-bit dark theme for (Neo)vim. Optimized for treesitter, LSP.
Stars: ✭ 141 (-13.5%)
Mutual labels:  colorscheme, neovim-plugin, treesitter
awesome-neovim
Awesome Configurations for C/C++,Zig,Web and Lua development in NeoVim
Stars: ✭ 54 (-66.87%)
Mutual labels:  nvim, neovim-plugin, treesitter
nightfox.nvim
🦊A highly customizable theme for vim and neovim with support for lsp, treesitter and a variety of plugins.
Stars: ✭ 1,489 (+813.5%)
Mutual labels:  colorscheme, nvim, treesitter
vscode.nvim
Neovim/Vim color scheme inspired by Dark+ and Light+ theme in Visual Studio Code
Stars: ✭ 362 (+122.09%)
Mutual labels:  colorscheme, nvim, treesitter
navigator.lua
Source code analysis & navigation plugin for Neovim. Navigate codes like a breeze🎐. Exploring LSP and 🌲Treesitter symbols a piece of 🍰. Take control like a boss 🦍.
Stars: ✭ 781 (+379.14%)
Mutual labels:  neovim-plugin, nvim-plugin, treesitter
vim-lighthaus
A Lighthaus theme for (n)vim, vim-airline and lightline
Stars: ✭ 33 (-79.75%)
Mutual labels:  colorscheme, nvim, treesitter
nvim
🍨 Soothing pastel theme for NeoVim
Stars: ✭ 659 (+304.29%)
Mutual labels:  colorscheme, nvim, neovim-plugin
boo-colorscheme-nvim
Boo is a colorscheme for Neovim with handcrafted support for LSP, Treesitter.
Stars: ✭ 62 (-61.96%)
Mutual labels:  colorscheme, neovim-plugin, treesitter
Purify
🌈 Clean & vibrant color schemes for Vim, Terminals...
Stars: ✭ 142 (-12.88%)
Mutual labels:  colorscheme, colors, nvim
nvim-config
My neovim config
Stars: ✭ 63 (-61.35%)
Mutual labels:  nvim, neovim-plugin
modes.nvim
Prismatic line decorations for the adventurous vim user
Stars: ✭ 299 (+83.44%)
Mutual labels:  nvim, neovim-plugin
cmp-tmux
Tmux completion source for nvim-cmp and nvim-compe
Stars: ✭ 98 (-39.88%)
Mutual labels:  neovim-plugin, nvim-plugin

nvim-highlite

Default Settings Preview

lua preview

Introduction

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

This template's defaults focus on:

  1. Compatibility 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.

Installation

The only prerequisite is Neovim 0.7+

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/highlite.vim.
    • If you are on a Unix system, use the setup script like so:
    chmod +x ./setup.sh
    ./setup.sh highlite <colorscheme>
    Where <colorscheme> is the name of your desired colorscheme.
    • If you are on Windows, rename the files manually.

Whenever you want to update from then on, you can run the update script. This will load the latest upstream changes to the core highlighting library.

Just The Defaults

  1. Install a plugin manager such as packer.nvim:
    -- packer.nvim example
    local install_path = vim.fn.stdpath('data')..'/site/pack/packer/opt/packer.nvim'
    
    if not vim.loop.fs_stat(vim.fn.glob(install_path)) then
    	os.execute('git clone https://github.com/wbthomason/packer.nvim '..install_path)
    end
    
    vim.api.nvim_command 'packadd packer.nvim'
    
    return require('packer').startup {function(use)
    	use {'wbthomason/packer.nvim', opt = true}
    	use 'Iron-E/nvim-highlite'
    end}
  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 highlite
    Or using init.lua:
    vim.opt.termguicolors = true
    vim.api.nvim_command 'colorscheme highlite'

Usage

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

As Dependency

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

  • See :h highlite-usage for more.
-- Import nvim-highlite
local highlite = require('highlite')

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

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

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

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

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

As Template

Below is an example of how to use nvim-highlite 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

How can I override the highlighting of one specific highlight group in my init.vim?

When using this plugin, it is important to know that you can't just run :hi on a highlight group and expect that its changes will be retained. You must attach them to the ColorScheme autocmd event, as shown below:

packadd nvim-highlite
set termguicolors "optional

" WRONG! Don't do this.
hi! Error guifg=#000000 guibg=#FFFFFF

" Do this instead.
augroup Highlite
	" You can also use `highlite.highlight()` instead of `:hi!`
	autocmd ColorScheme highlite hi! Error guifg=#000000 guibg=#FFFFFF
augroup end

colorscheme highlite

Of course, substitute highlite with the name of your colorscheme.

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, vim-polyglot, or some of the following:

Language Syntax Plugin
ALGOL sterpe/vim-algol68
C++ bfrg/vim-cpp-modern
Coq whonore/Coqtail
Dart dart-lang/dart-vim-plugin
DTrace vim-scripts/dtrace-syntax-file
F# ionide/Ionide-vim
Gas Shirk/vim-gas
Git tpope/vim-git
Go fatih/vim-go
GraphViz liuchengxu/graphviz
HTML5 othree/html5
i3conf mboughaba/i3config
Java Iron-E/java-syntax
JavaScript pangloss/vim-javascript
JSON elzr/vim-json
Julia JuliaEditorSupport/julia-vim
Kotlin udalov/kotlin-vim
LESS groenewege/vim-less
LLVM rhysd/vim-llvm
Lua tbastos/vim-lua
Markdown plasticboy/vim-markdown
MIPS vim-scripts/mips
Moonscript leafo/moonscript-vim
PlantUML aklt/plantuml-syntax
Prettier prettier/vim-prettier
Python vim-python/python-syntax
Razor jlcrochet/vim-razor
RST marshallward/vim-restructuredtext
Ruby vim-ruby/vim-ruby
Rust Iron-E/rust.vim
SCSS cakebaker/scss-syntax
Shell arzg/vim-sh
SQL shmup/vim-sql-syntax
Stylus wavded/vim-stylus
SystemD wgwoods/vim-systemd-syntax
SystemTap nickhutchinson/vim-systemtap
TeX lervag/vimtex
TOML Iron-E/vim-toml
Ungrammar Iron-E/vim-ungrammar
VB.NET vim-scripts/vbnet
Vim Logs MTDL9/vim-log-highlighting
XML amadeus/vim-xml
YAML Iron-E/vim-yaml
YATS HerringtonDarkholme/yats

Contribution

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

  • More default support for plugins, languages, etc.
  • Setup scripts for Windows.

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].