fix: bad highlight link call
authorTran Duc Binh <binhtran432k@gmail.com>
Mon, 22 Aug 2022 08:55:03 +0000 (15:55 +0700)
committerTran Duc Binh <binhtran432k@gmail.com>
Mon, 22 Aug 2022 08:59:04 +0000 (15:59 +0700)
lua/dracula/init.lua

index e633a6cbc3e08ac9cc780048f0d2f5ab74adc274..a10d3b9d1402f26b157ede2322956c3d6ae95f3c 100644 (file)
@@ -16,7 +16,7 @@ local DEFAULT_CONFIG = {
    show_end_of_buffer = g.dracula_show_end_of_buffer,
    lualine_bg_color = g.dracula_lualine_bg_color,
    colors = tbl_deep_extend("force", require("dracula.palette"),
-      g.dracula_colors or {}),
+      g.dracula_colors or {}) --[[@as Palette]] ,
 }
 
 local TRANSPARENTS = {
@@ -61,7 +61,7 @@ local function apply(configs)
       end
    end
 
-   local links = {} ---@type Highlight[]
+   local links = {} ---@type table<string, Highlight>
    -- run defined highlights
    for group, value in pairs(groups) do
       if type(value) == "table" then
@@ -74,7 +74,7 @@ local function apply(configs)
    end
 
    -- run highlights link commands
-   for group, command in ipairs(links) do
+   for group, command in pairs(links) do
       nvim_set_hl(0, group, command)
    end
 end
@@ -85,7 +85,7 @@ local local_configs = DEFAULT_CONFIG
 ---@param configs DefaultConfig?
 local function setup(configs)
    if type(configs) == "table" then
-      local_configs = tbl_deep_extend("force", DEFAULT_CONFIG, configs)
+      local_configs = tbl_deep_extend("force", DEFAULT_CONFIG, configs) --[[@as DefaultConfig]]
    end
 end