diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-08-28 16:55:18 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-08-28 16:55:18 +0800 |
commit | 39f95770e98f5b081da340bd3b6071f210feb0a8 (patch) | |
tree | 5e6e649c1b7b7a8e786ec11f0e8d7be7c95605ed | |
parent | 2220abed24856f8f6265b6126de128540c429dea (diff) | |
download | lua-language-server-39f95770e98f5b081da340bd3b6071f210feb0a8.zip |
过测试
-rw-r--r-- | server/src/core/completion.lua | 2 | ||||
-rw-r--r-- | server/test/completion/init.lua | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/server/src/core/completion.lua b/server/src/core/completion.lua index 5b30a57c..678ad591 100644 --- a/server/src/core/completion.lua +++ b/server/src/core/completion.lua @@ -399,7 +399,6 @@ local function searchKeyWords(vm, source, word, callback) if snippet.key[key] then for _, data in ipairs(snippet.key[key]) do callback(data.label, nil, CompletionItemKind.Snippet, { - insertTextFormat = 2, insertText = data.text, }) end @@ -464,7 +463,6 @@ local function searchAsLocal(vm, source, word, callback) -- TODO 需要有更优美的实现方式 local data = snippet.key['function'][1] callback(data.label, nil, CompletionItemKind.Snippet, { - insertTextFormat = 2, insertText = data.text, }) end diff --git a/server/test/completion/init.lua b/server/test/completion/init.lua index dd17b463..20436845 100644 --- a/server/test/completion/init.lua +++ b/server/test/completion/init.lua @@ -252,7 +252,6 @@ loc$ label = 'local function', kind = CompletionItemKind.Snippet, insertText = EXISTS, - insertTextFormat = 2, } } @@ -420,6 +419,11 @@ print(fff) kind = CompletionItemKind.Keyword, }, { + label = 'function name()', + kind = CompletionItemKind.Snippet, + insertText = EXISTS, + }, + { label = 'ff2', kind = CompletionItemKind.Text, }, @@ -854,7 +858,6 @@ else$ label = 'elseif .. then', kind = CompletionItemKind.Snippet, insertText = EXISTS, - insertTextFormat = 2, } } @@ -1195,7 +1198,6 @@ end { label = 'elseif .. then', kind = CompletionItemKind.Snippet, - insertTextFormat = 2, insertText = EXISTS, }, } |