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

Commit bd4f21f

Browse files
author
Steve Poulton
committed
Support completionItem/resolve for additional text edits
1 parent fc9b2fd commit bd4f21f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lua/completion.lua

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,15 @@ local function applyAddtionalTextEdits(completed_item)
114114
item.additionalTextEdits
115115
)
116116
vim.lsp.util.apply_text_edits(edits, bufnr)
117+
else
118+
vim.lsp.buf_request(bufnr, "completionItem/resolve", item, function(err, _, result)
119+
if err or not result then
120+
return
121+
end
122+
if result.additionalTextEdits then
123+
vim.lsp.util.apply_text_edits(result.additionalTextEdits, bufnr)
124+
end
125+
end)
117126
end
118127
end
119128
end

0 commit comments

Comments
 (0)