add option for overriding highlights (#596)
This commit is contained in:
parent
c5fe1f711e
commit
fd668e559e
4 changed files with 37 additions and 22 deletions
|
@ -42,6 +42,7 @@ M.options = {
|
|||
|
||||
-- ui configs
|
||||
M.ui = {
|
||||
hl_override = "", -- path of your file which contains highlight stuffs
|
||||
italic_comments = false,
|
||||
-- theme to be used, check available themes with `<leader> + t + h`
|
||||
theme = "onedark",
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
local M = {}
|
||||
|
||||
local cmd = vim.cmd
|
||||
M.close_buffer = function(bufexpr, force)
|
||||
-- This is a modification of a NeoVim plugin from
|
||||
-- Author: ojroques - Olivier Roques
|
||||
|
@ -330,4 +331,29 @@ M.packer_lazy_load = function(plugin, timer)
|
|||
end
|
||||
end
|
||||
|
||||
-- Highlights functions
|
||||
|
||||
-- Define bg color
|
||||
-- @param group Group
|
||||
-- @param color Color
|
||||
|
||||
M.bg = function(group, col)
|
||||
cmd("hi " .. group .. " guibg=" .. col)
|
||||
end
|
||||
|
||||
-- Define fg color
|
||||
-- @param group Group
|
||||
-- @param color Color
|
||||
M.fg = function(group, col)
|
||||
cmd("hi " .. group .. " guifg=" .. col)
|
||||
end
|
||||
|
||||
-- Define bg and fg color
|
||||
-- @param group Group
|
||||
-- @param fgcol Fg Color
|
||||
-- @param bgcol Bg Color
|
||||
M.fg_bg = function(group, fgcol, bgcol)
|
||||
cmd("hi " .. group .. " guifg=" .. fgcol .. " guibg=" .. bgcol)
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue