We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b6bd999 commit af90f8fCopy full SHA for af90f8f
lua/orgmode/ui/input.lua
@@ -7,15 +7,17 @@ local OrgInput = {}
7
8
---@param prompt string
9
---@param default? string
10
----@param completion? fun(arg_lead: string): string[]
+---@param completion? string | fun(arg_lead: string): string[]
11
---@return OrgPromise<string>
12
function OrgInput.open(prompt, default, completion)
13
_G.orgmode.__input_completion = completion
14
local opts = {
15
prompt = prompt,
16
default = default or '',
17
}
18
- if completion then
+ if type(completion) == 'string' then
19
+ opts.completion = completion
20
+ elseif completion then
21
opts.completion = 'customlist,v:lua.orgmode.__input_completion'
22
end
23
0 commit comments