Skip to content

Commit

Permalink
fix #550
Browse files Browse the repository at this point in the history
  • Loading branch information
sumneko committed Jun 24, 2021
1 parent ed32c90 commit 3f300fc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 0 additions & 3 deletions script/core/completion.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions test/completion/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2463,6 +2463,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
Expand Down

0 comments on commit 3f300fc

Please sign in to comment.