diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-19 16:21:50 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-19 16:21:50 +0800 |
commit | 712b8bfd2946e15d4550fbe662746acaad46a53a (patch) | |
tree | 1c0b3b40d7d1fd3b4d4b68cf856a28548c6bba58 /server/src/method/textDocument | |
parent | 1f4ed24c48c9c48ffa4f2bddf64ef169839fc538 (diff) | |
download | lua-language-server-712b8bfd2946e15d4550fbe662746acaad46a53a.zip |
支持看表里的数据
Diffstat (limited to 'server/src/method/textDocument')
-rw-r--r-- | server/src/method/textDocument/completion.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/server/src/method/textDocument/completion.lua b/server/src/method/textDocument/completion.lua index 2ecc06a5..9ed4e09a 100644 --- a/server/src/method/textDocument/completion.lua +++ b/server/src/method/textDocument/completion.lua @@ -12,9 +12,15 @@ return function (lsp, params) if not items then return nil end + if #items == 0 then + return nil + end for i, item in ipairs(items) do item.sortText = ('%04d'):format(i) end + if items[5] then + items[5].preselect = true + end local response = { isIncomplete = false, items = items, |