From d98986006bdfd908b03ce2b4ba2bbd4fac103b72 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Wed, 30 Oct 2024 00:10:48 -0500 Subject: [PATCH] feat(nvim): add wrap & spell status in winbar --- .../nvim/lua/plugins/configs/heirline.lua | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/users/price/dots/.config/nvim/lua/plugins/configs/heirline.lua b/users/price/dots/.config/nvim/lua/plugins/configs/heirline.lua index ed49746f..9a1358ac 100644 --- a/users/price/dots/.config/nvim/lua/plugins/configs/heirline.lua +++ b/users/price/dots/.config/nvim/lua/plugins/configs/heirline.lua @@ -542,6 +542,102 @@ return { { provider = "%=", }, + { + { + provider = seps.full.left, + hl = function() + return { fg = colors.sumiInk4, bg = utils.get_highlight("WinBar").bg } + end, + }, + { + provider = function() + return "spell " + end, + hl = { + fg = colors.fujiWhite, + bg = colors.sumiInk4, + }, + }, + { + { + provider = seps.full.left, + hl = function() + return { + fg = vim.opt_local.spell:get() and colors.springGreen or colors.peachRed, + bg = colors.sumiInk4, + } + end, + }, + { + provider = function() + return vim.opt_local.spell:get() and " " or " " + end, + hl = function() + return { + fg = colors.sumiInk0, + bg = vim.opt_local.spell:get() and colors.springGreen or colors.peachRed, + } + end, + }, + { + provider = seps.full.right .. " ", + hl = function() + return { + fg = vim.opt_local.spell:get() and colors.springGreen or colors.peachRed, + bg = utils.get_highlight("WinBar").bg, + } + end, + }, + }, + }, + { + { + provider = seps.full.left, + hl = function() + return { fg = colors.sumiInk4, bg = utils.get_highlight("WinBar").bg } + end, + }, + { + provider = function() + return "wrap " + end, + hl = { + fg = colors.fujiWhite, + bg = colors.sumiInk4, + }, + }, + { + { + provider = seps.full.left, + hl = function() + return { + fg = vim.opt_local.wrap:get() and colors.springGreen or colors.peachRed, + bg = colors.sumiInk4, + } + end, + }, + { + provider = function() + return vim.opt_local.wrap:get() and " " or " " + end, + hl = function() + return { + fg = colors.sumiInk0, + bg = vim.opt_local.wrap:get() and colors.springGreen or colors.peachRed, + } + end, + }, + { + provider = seps.full.right .. " ", + hl = function() + return { + fg = vim.opt_local.wrap:get() and colors.springGreen or colors.peachRed, + bg = utils.get_highlight("WinBar").bg, + } + end, + }, + }, + }, { update = { "BufAdd",