diff options
author | aktersnurra <gustaf.rydholm@gmail.com> | 2022-10-29 18:19:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-29 18:19:38 +0200 |
commit | 2951af7bbd839ebef25e33f8bd01bd5c501f76c8 (patch) | |
tree | f1829cc7af1fc0c5900b23055d12bb0446962cfb /lua/no-clown-fiesta/util.lua | |
parent | 3234b296d7f70cc78ac37a51fc3cff28e7871812 (diff) |
Update how options and colorscheme is set (#12)
* Update loading of colorscheme
* Fix typo
* Fix setting of style
* Fix highlighting
* Unpack style
* Add empty table if props are nil
* Fix concat of tables
* Fix typo
* Update settings
* Add call set in settings
* Add deep extend
* Remove style field
* Update README
BREAKING CHANGE: updates how the colorscheme is set and the structure of the options table
Diffstat (limited to 'lua/no-clown-fiesta/util.lua')
-rw-r--r-- | lua/no-clown-fiesta/util.lua | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/lua/no-clown-fiesta/util.lua b/lua/no-clown-fiesta/util.lua index 1591a63..46e66d3 100644 --- a/lua/no-clown-fiesta/util.lua +++ b/lua/no-clown-fiesta/util.lua @@ -1,23 +1,7 @@ local M = {} local function highlight(group, properties) - local bg = properties.bg == nil and "" or "guibg=" .. properties.bg - local fg = properties.fg == nil and "" or "guifg=" .. properties.fg - local sp = properties.sp == nil and "" or "guisp=" .. properties.sp - local style = properties.style == nil and "" or "gui=" .. properties.style - local link = properties.link == nil and "" or "link=" .. properties.link - - local cmd = table.concat({ - "highlight", - group, - bg, - fg, - sp, - style, - link, - }, " ") - - vim.api.nvim_command(cmd) + vim.api.nvim_set_hl(0, group, properties) end function M.initialise(skeleton) |