diff options
-rw-r--r-- | changelog.md | 1 | ||||
-rw-r--r-- | script/provider/completion.lua | 2 | ||||
-rw-r--r-- | test/type_inference/init.lua | 15 |
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 +--]] |