From a8c6db5da7bd382094606340eed015d14fbb5654 Mon Sep 17 00:00:00 2001 From: Salomon Popp Date: Mon, 24 Feb 2025 07:20:35 +0100 Subject: [PATCH] style(types): add optional return value for `LazyKeysSpec` rhs (#1924) ## Description when `expr=true` the rhs function should return a string. example ```lua { keys = { { 'j', function() return require('dial.map').inc_normal() end, expr = true, desc = 'Increment value', } } } ``` ## Related Issue(s) ## Screenshots --- lua/lazy/core/handler/keys.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazy/core/handler/keys.lua b/lua/lazy/core/handler/keys.lua index 57fbc18..5b5f173 100644 --- a/lua/lazy/core/handler/keys.lua +++ b/lua/lazy/core/handler/keys.lua @@ -11,7 +11,7 @@ local Util = require("lazy.core.util") ---@class LazyKeysSpec: LazyKeysBase ---@field [1] string lhs ----@field [2]? string|fun()|false rhs +---@field [2]? string|fun():string?|false rhs ---@field mode? string|string[] ---@class LazyKeys: LazyKeysBase