Prismatic line decorations for the adventurous vim user
{
"mvllow/modes.nvim",
tag = "v0.2.1",
config = function()
require("modes").setup()
end
}- Neovim 0.11 or later
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" }
})| 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 |
Pull requests are welcome and appreciated!
Run make docs or inside of Neovim, with mini.doc in your runtimepath:
:luafile scripts/minidoc.lua- Some Which Key presets conflict with this plugin. For example,
dandyoperators will not apply highlights if there aredandyprefixes hooked by Which Key because Which Key takes priority
Workaround:
require("which-key").setup({
triggers_blacklist = {
n = { "d", "y" }
}
})- "Press ENTER" prompt shows when entering vim
Workaround:
require("modes").setup()
-- Set cmdheight AFTER modes setup
vim.o.cmdheight = 0