diff options
-rw-r--r-- | changelog.md | 3 | ||||
-rw-r--r-- | script/parser/newparser.lua | 2 | ||||
-rw-r--r-- | test/crossfile/completion.lua | 13 |
3 files changed, 17 insertions, 1 deletions
diff --git a/changelog.md b/changelog.md index 533dd3df..1a6ecd97 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,8 @@ # changelog +## 2.4.3 +* `FIX` [#713](https://github.com/sumneko/lua-language-server/issues/713) + ## 2.4.2 `2021-10-8` * `FIX` [#702](https://github.com/sumneko/lua-language-server/issues/702) diff --git a/script/parser/newparser.lua b/script/parser/newparser.lua index 001650fd..c49d2291 100644 --- a/script/parser/newparser.lua +++ b/script/parser/newparser.lua @@ -1956,7 +1956,7 @@ local function resolveName(node) else local ospeicals = State.options.special if ospeicals and ospeicals[name] then - addSpecial(name, node) + addSpecial(ospeicals[name], node) end end return node diff --git a/test/crossfile/completion.lua b/test/crossfile/completion.lua index ae843d3b..455f0600 100644 --- a/test/crossfile/completion.lua +++ b/test/crossfile/completion.lua @@ -850,3 +850,16 @@ TEST { }, completion = EXISTS } + +config.prop('Lua.runtime.special', 'import', 'require') +TEST { + { path = 'abcde.lua', content = '' }, + { + path = 'main.lua', + main = true, + content = [[ + import 'ab<??>' + ]] + }, + completion = EXISTS +} |