diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-02-20 14:43:49 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-02-20 14:43:49 +0800 |
commit | 56fc049c519e2e0bddd9c9192027e04198122fb3 (patch) | |
tree | 09d0418ad6471d5b413461ed9a1adcb19dff5680 /script | |
parent | 636d43243a8ac23f785a434194d81c33ae3b35e9 (diff) | |
download | lua-language-server-56fc049c519e2e0bddd9c9192027e04198122fb3.zip |
fix #397 should keep value after resolve
Diffstat (limited to 'script')
-rw-r--r-- | script/provider/provider.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua index 5eab68fb..04d1b4e6 100644 --- a/script/provider/provider.lua +++ b/script/provider/provider.lua @@ -530,11 +530,11 @@ proto.on('completionItem/resolve', function (item) if not resolved then return nil end - item.detail = resolved.detail + item.detail = resolved.detail or item.detail item.documentation = resolved.description and { value = resolved.description, kind = 'markdown', - } + } or item.documentation item.additionalTextEdits = resolved.additionalTextEdits and (function () local t = {} for j, edit in ipairs(resolved.additionalTextEdits) do @@ -548,7 +548,7 @@ proto.on('completionItem/resolve', function (item) } end return t - end)() + end)() or item.additionalTextEdits return item end) |