Fix #191
This commit is contained in:
@@ -292,11 +292,6 @@ core.confirm = function(e, option, callback)
|
|||||||
local suspending = core.suspend()
|
local suspending = core.suspend()
|
||||||
local ctx = core.get_context()
|
local ctx = core.get_context()
|
||||||
|
|
||||||
-- Try to resolve for only 100ms.
|
|
||||||
async.sync(function(done)
|
|
||||||
e:resolve(done)
|
|
||||||
end, 100)
|
|
||||||
|
|
||||||
-- Simulate `<C-y>` behavior.
|
-- Simulate `<C-y>` behavior.
|
||||||
local confirm = {}
|
local confirm = {}
|
||||||
table.insert(confirm, keymap.t(string.rep('<C-g>U<Left><Del>', ctx.cursor.character - misc.to_utfindex(e.context.cursor_before_line, e:get_offset()))))
|
table.insert(confirm, keymap.t(string.rep('<C-g>U<Left><Del>', ctx.cursor.character - misc.to_utfindex(e.context.cursor_before_line, e:get_offset()))))
|
||||||
|
|||||||
@@ -309,10 +309,16 @@ end
|
|||||||
---Get resolved completion item if possible.
|
---Get resolved completion item if possible.
|
||||||
---@return lsp.CompletionItem
|
---@return lsp.CompletionItem
|
||||||
entry.get_completion_item = function(self)
|
entry.get_completion_item = function(self)
|
||||||
if self.resolved_completion_item then
|
return self.cache:ensure({ 'get_completion_item', (self.resolved_completion_item and 1 or 0) }, function()
|
||||||
return self.resolved_completion_item
|
if self.resolved_completion_item then
|
||||||
end
|
local completion_item = misc.copy(self.completion_item)
|
||||||
return self.completion_item
|
completion_item.detail = self.resolved_completion_item.detail or completion_item.detail
|
||||||
|
completion_item.documentation = self.resolved_completion_item.documentation or completion_item.documentation
|
||||||
|
completion_item.additionalTextEdits = self.resolved_completion_item.additionalTextEdits or completion_item.additionalTextEdits
|
||||||
|
return completion_item
|
||||||
|
end
|
||||||
|
return self.completion_item
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
---Create documentation
|
---Create documentation
|
||||||
|
|||||||
Reference in New Issue
Block a user