Skip to content

Commit a8c6db5

Browse files
authored
style(types): add optional return value for LazyKeysSpec rhs (#1924)
## Description <!-- Describe the big picture of your changes to communicate to the maintainers why we should accept this pull request. --> when `expr=true` the rhs function should return a string. example ```lua { keys = { { '<leader>j', function() return require('dial.map').inc_normal() end, expr = true, desc = 'Increment value', } } } ``` ## Related Issue(s) <!-- If this PR fixes any issues, please link to the issue here. - Fixes #<issue_number> --> ## Screenshots <!-- Add screenshots of the changes if applicable. -->
1 parent e5e9bf4 commit a8c6db5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/lazy/core/handler/keys.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ local Util = require("lazy.core.util")
1111

1212
---@class LazyKeysSpec: LazyKeysBase
1313
---@field [1] string lhs
14-
---@field [2]? string|fun()|false rhs
14+
---@field [2]? string|fun():string?|false rhs
1515
---@field mode? string|string[]
1616

1717
---@class LazyKeys: LazyKeysBase

0 commit comments

Comments
 (0)