Skip to content

Commit 6f0fc86

Browse files
committed
fix: always return item in resolve
closes #211
1 parent a62b555 commit 6f0fc86

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lua/blink/cmp/sources/lib/init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ function sources.resolve(item)
152152
break
153153
end
154154
end
155-
if item_source == nil then return async.task.new(function(resolve) resolve() end) end
155+
if item_source == nil then return async.task.new(function(resolve) resolve(item) end) end
156156

157157
return item_source:resolve(item):catch(function(err) vim.print('failed to resolve item with error: ' .. err) end)
158158
end

lua/blink/cmp/sources/lib/provider/init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ function source:resolve(item)
118118
local tasks = self.resolve_tasks
119119
if tasks[item] == nil or tasks[item].status == async.STATUS.CANCELLED then
120120
tasks[item] = async.task.new(function(resolve)
121-
if self.module.resolve == nil then return resolve(nil) end
121+
if self.module.resolve == nil then return resolve(item) end
122122
return self.module:resolve(item, function(resolved_item)
123123
-- use the item's existing documentation and detail if the LSP didn't return it
124124
-- TODO: do we need this? this would be for java but never checked if it's needed

0 commit comments

Comments
 (0)