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/settings.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/settings.lua')
-rw-r--r-- | lua/no-clown-fiesta/settings.lua | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/lua/no-clown-fiesta/settings.lua b/lua/no-clown-fiesta/settings.lua index e41380c..78f78ad 100644 --- a/lua/no-clown-fiesta/settings.lua +++ b/lua/no-clown-fiesta/settings.lua @@ -1,17 +1,22 @@ local M = {} -local palette = require "no-clown-fiesta.palette" -local default = { - transparent_background = palette.bg, - comments = "NONE", - keywords = "NONE", - functions = "NONE", - variables = "NONE", - type = "NONE", +local DEFAULT = { + transparent = false, + styles = { + comments = {}, + keywords = {}, + functions = {}, + variables = {}, + type = { bold = true }, + }, } -function M.set(opts) - return vim.tbl_extend("force", default, opts) +M.options = {} + +function M.set(options) + M.options = vim.tbl_deep_extend("force", DEFAULT, options or {}) end +M.set() + return M |