fix: Restore support for dictionary-typed theme setup parameter (#162)

* support passing in dictionary as theme definition

Allows setting up lualine with a theme dictionary like:
```lua
setup{
  theme = { normal = {...}; insert = { ... }; }
}
```
this was the original behaviour before 37a3b8cc.

* comment
This commit is contained in:
John Sun 2021-04-08 17:52:57 +10:00 committed by GitHub
parent 37dfbe787c
commit 23e6bd5dd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -279,6 +279,9 @@ local function setup_theme()
}, true, {})
theme = require 'lualine.themes.gruvbox'
end
else
-- use the provided theme as-is, assuming it's a dictionary
theme = config.options.theme
end
highlight.create_highlight_groups(theme)
vim.api.nvim_exec([[