This repository has been archived on 2022-08-21. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/home/.config/nvim/lua/util.lua

14 lines
445 B
Lua

local M = {}
function M.highlight(group, guifg, guibg, attr, guisp)
local fg = guifg ~= '' and 'guifg=' .. guifg or 'guifg=NONE'
local bg = guibg ~= '' and 'guibg=' .. guibg or 'guibg=NONE'
local style = attr ~= '' and 'gui=' .. attr or 'gui=NONE'
local sp = guisp ~= '' and 'guisp=' .. guisp or ''
local hl = 'hi ' .. group .. ' ' .. fg .. ' ' .. bg .. ' ' .. style .. ' ' .. sp
vim.api.nvim_command(hl)
end
return M