From 23e6bd5dd72dc348f03aac0d6f14eba58904ee84 Mon Sep 17 00:00:00 2001 From: John Sun Date: Thu, 8 Apr 2021 17:52:57 +1000 Subject: [PATCH] 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 --- lua/lualine/init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/lualine/init.lua b/lua/lualine/init.lua index c975612..bf62dbf 100644 --- a/lua/lualine/init.lua +++ b/lua/lualine/init.lua @@ -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([[