LuaLS / LuaLS/lua-language-server

部分情况下缺失字段的代码提示

Open
#2,425 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
4.4k
Forks
442
PR merge metrics
No merged PRs in 30d

Description

How are you using the lua-language-server?

Visual Studio Code Extension (sumneko.lua)

Which OS are you using?

Windows

What is the issue affecting?

Completion

Expected Behaviour

"testClass"修改成"self",并不能像如图那样拥有"intField"字段的代码提示,希望更换成"self"也可以拥有一样的代码提示

80ca504149e2d23e52b6d694b8b5f76

Actual Behaviour

使用"self"并没有访问二级字段"intField"的代码提示

6fbae855fa3fcfc628d1e6a3a6823de

Reproduction steps

使用"self"的情况下,在同一函数内定义字段没有问题,多级字段在不同函数内定义会出现没有代码提示的错误
不过使用"testClass"替换"self"可以完美解决,希望"self"也支持同样的代码提示
image

Additional Notes

No response

Log File

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the missing nested-field completion in the Visual Studio Code extension on Windows, following the reported self versus testClass steps. Then trace the completion handling for self and multi-level fields; done means self offers intField completion in the same case where testClass does.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.