Skip to content

Latest commit

 

History

116 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

modes.nvim

Prismatic line decorations for the adventurous vim user

Usage

{
	"mvllow/modes.nvim",
	tag = "v0.2.1",
	config = function()
		require("modes").setup()
	end
}

modes.nvim

Requirements

  • Neovim 0.11 or later

Options

require('modes').setup({
	colors = {
		bg = "", -- Optional bg param, defaults to Normal hl group
		copy = "#f5c359",
		delete = "#c75c6a",
		change = "#c75c6a", -- Optional param, defaults to delete
		format = "#c79585",
		insert = "#78ccc5",
		replace = "#245361",
		select = "#9745be", -- Optional param, defaults to visual
		visual = "#9745be",
	},

	-- Set opacity for cursorline and number background
	line_opacity = 0.15,

	-- Enable cursor highlights
	set_cursor = true,

	-- Enable cursorline initially, and disable cursorline for inactive windows
	-- or ignored filetypes
	set_cursorline = true,

	-- Enable line number highlights to match cursorline
	set_number = true,

	-- Enable sign column highlights to match cursorline
	set_signcolumn = true,

	-- Disable modes highlights for specified filetypes
	-- or enable with prefix "!" if otherwise disabled (please PR common patterns)
	-- Can also be a function fun():boolean that disables modes highlights when true
	ignore = { "NvimTree", "TelescopePrompt", "!minifiles" }
})

Themes

Highlight group Default value
ModesCopy guibg=#f5c359
ModesDelete guibg=#c75c6a
ModesChange ModesDelete
ModesFormat guibg=#c79585
ModesInsert guibg=#78ccc5
ModesReplace guibg=#245361
ModesSelect ModesVisual
ModesVisual guibg=#9745be

Contributing

Pull requests are welcome and appreciated!

Generating documentation

Run make docs or inside of Neovim, with mini.doc in your runtimepath:

:luafile scripts/minidoc.lua

Known issues

  • Some Which Key presets conflict with this plugin. For example, d and y operators will not apply highlights if there are d and y prefixes hooked by Which Key because Which Key takes priority

Workaround:

require("which-key").setup({
        triggers_blacklist = {
                n = { "d", "y" }
        }
})

About

Prismatic line decorations for the adventurous vim user

Topics

Resources

Code of conduct

Contributing

Stars

946 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages