summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-02-24 16:40:51 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-02-24 16:40:51 +0800
commit73877202eca3f7e54d21cd04fa7bcc2daed3377d (patch)
tree722d80fedaa8174388a71972cdb915c98719210e
parent6e6581b506990d46c5df8e0a6125df90fed2925f (diff)
downloadlua-language-server-73877202eca3f7e54d21cd04fa7bcc2daed3377d.zip
#419 remove trigger char `\n` for now, see #401
-rw-r--r--changelog.md1
-rw-r--r--script/provider/completion.lua2
-rw-r--r--test/type_inference/init.lua15
3 files changed, 17 insertions, 1 deletions
diff --git a/changelog.md b/changelog.md
index f319874a..1b7dbfc3 100644
--- a/changelog.md
+++ b/changelog.md
@@ -6,6 +6,7 @@
* `CHG` completion: improve field and table
* `CHG` improve infer cross `ipairs`
* `CHG` cache globals when loading
+* `CHG` completion: remove trigger character `\n` for now, see [#401](https://github.com/sumneko/lua-language-server/issues/401)
* `FIX` diagnositc: may open file with wrong uri case
* `FIX` [#406](https://github.com/sumneko/lua-language-server/issues/406)
diff --git a/script/provider/completion.lua b/script/provider/completion.lua
index 2dc92569..69a5af51 100644
--- a/script/provider/completion.lua
+++ b/script/provider/completion.lua
@@ -4,7 +4,7 @@ local isEnable = false
local function allWords()
local str = [[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.:('"[,#*@|=-{ ]]
- local list = {'\n', '\t'}
+ local list = {'\t'}
for c in str:gmatch '.' do
list[#list+1] = c
end
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index 8b792826..9182731b 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -390,3 +390,18 @@ TEST 'integer' [[
for <?i?> in ipairs() do
end
]]
+
+-- TODO
+--TEST 'string' [[
+-----@type table<string, boolean>
+--local t
+--for <?k?>, v in ipairs(t) do
+--end
+--]]
+--
+--TEST 'boolean' [[
+-----@type table<string, boolean>
+--local t
+--for k, <?v?> in ipairs(t) do
+--end
+--]]