diff options
author | unknown <sumnekosun@intranet.123u.com> | 2019-04-02 14:07:16 +0800 |
---|---|---|
committer | unknown <sumnekosun@intranet.123u.com> | 2019-04-02 14:07:16 +0800 |
commit | 76aba06eb3e0056961558698ec088e5edab58998 (patch) | |
tree | 4b8802bc16363895e3c924208c31e14d71d56b1c /server | |
parent | 2016f3a968d6e37ac839f334ac02d6548a8457b9 (diff) | |
download | lua-language-server-76aba06eb3e0056961558698ec088e5edab58998.zip |
支持additionalTextEdits
Diffstat (limited to 'server')
-rw-r--r-- | server/src/method/textDocument/completion.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/server/src/method/textDocument/completion.lua b/server/src/method/textDocument/completion.lua index fd5d1ed6..8419036a 100644 --- a/server/src/method/textDocument/completion.lua +++ b/server/src/method/textDocument/completion.lua @@ -96,6 +96,13 @@ return function (lsp, params) item.textEdit.start = nil item.textEdit.finish = nil end + if item.additionalTextEdits then + for _, textEdit in ipairs(item.additionalTextEdits) do + textEdit.range = posToRange(lines, textEdit.start, textEdit.finish) + textEdit.start = nil + textEdit.finish = nil + end + end end local response = { |