From 3e79e043dfdc31b320d61432eae2eefc26478965 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 13 Sep 2022 16:44:55 +0200 Subject: [PATCH] style: fixed some sumneko diagnostics error --- lua/tokyonight/theme.lua | 2 +- lua/tokyonight/util.lua | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lua/tokyonight/theme.lua b/lua/tokyonight/theme.lua index 433caa6..31d24b0 100644 --- a/lua/tokyonight/theme.lua +++ b/lua/tokyonight/theme.lua @@ -7,7 +7,7 @@ local M = {} ---@field fg string|nil ---@field bg string|nil ---@field sp string|nil ----@field style string|nil +---@field style string|nil|Highlight ---@alias Highlights table diff --git a/lua/tokyonight/util.lua b/lua/tokyonight/util.lua index 5afcd23..ce8f5cc 100644 --- a/lua/tokyonight/util.lua +++ b/lua/tokyonight/util.lua @@ -12,12 +12,12 @@ local function hexToRgb(c) return { tonumber(c:sub(2, 3), 16), tonumber(c:sub(4, 5), 16), tonumber(c:sub(6, 7), 16) } end ----@param fg string foreground color ----@param bg string background color +---@param foreground string foreground color +---@param background string background color ---@param alpha number number between 0 and 1. 0 results in bg, 1 results in fg -function M.blend(fg, bg, alpha) - bg = hexToRgb(bg) - fg = hexToRgb(fg) +function M.blend(foreground, background, alpha) + local bg = hexToRgb(background) + local fg = hexToRgb(foreground) local blendChannel = function(i) local ret = (alpha * fg[i] + ((1 - alpha) * bg[i]))