diff options
-rw-r--r-- | changelog.md | 3 | ||||
-rw-r--r-- | script/core/completion.lua | 3 | ||||
-rw-r--r-- | test/completion/init.lua | 11 |
3 files changed, 14 insertions, 3 deletions
diff --git a/changelog.md b/changelog.md index 119050e3..7b74d910 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,8 @@ # changelog +## 2.0.4 +* `FIX` [#550](https://github.com/sumneko/lua-language-server/issues/550) + ## 2.0.3 `2021-6-24` * `CHG` improve memory usage diff --git a/script/core/completion.lua b/script/core/completion.lua index 5e98aa15..2975634c 100644 --- a/script/core/completion.lua +++ b/script/core/completion.lua @@ -1389,9 +1389,6 @@ local function checkTableLiteralFieldByCall(ast, text, offset, call, defs, index and (not source.parent or source.parent.type ~= 'table') then return end - if call.node and call.node.type == 'getmethod' then - index = index + 1 - end local mark = {} local fields = {} local tbl = source diff --git a/test/completion/init.lua b/test/completion/init.lua index dde4b559..80a4aae5 100644 --- a/test/completion/init.lua +++ b/test/completion/init.lua @@ -2464,6 +2464,17 @@ api({$}) (EXISTS) TEST [[ +---@class A +---@field a '"hello"'|'"world"' + +---@param t A +function m:api(t) end + +m:api({$}) +]] +(EXISTS) + +TEST [[ ---@class AAA.BBB ---@type AAA.$ |