Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Commit

Permalink
Support completionItem/resolve for additional text edits
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Poulton committed Jan 29, 2021
1 parent fc9b2fd commit bd4f21f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lua/completion.lua
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,15 @@ local function applyAddtionalTextEdits(completed_item)
item.additionalTextEdits
)
vim.lsp.util.apply_text_edits(edits, bufnr)
else
vim.lsp.buf_request(bufnr, "completionItem/resolve", item, function(err, _, result)
if err or not result then
return
end
if result.additionalTextEdits then
vim.lsp.util.apply_text_edits(result.additionalTextEdits, bufnr)
end
end)
end
end
end
Expand Down

0 comments on commit bd4f21f

Please sign in to comment.