LuaLS / LuaLS/lua-language-server

neovim补全项对比vscode下有缺漏

Open
#2,579 1 comment 0 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?

NeoVim

Which OS are you using?

Windows WSL

What is the issue affecting?

Completion

Expected Behaviour

想使用自动require配置类,发现nvim不会提供补全,vscode可以
图片
配置类都形如

--- @class TradeFesLevelConfigData
--- @field _id string
--- @field exp integer
--- @field storage integer
--- @field extraToken number

--- @class TradeFesLevelConfig
local TradeFesLevelConfig = {}
TradeFesLevelConfig.NAME="TradeFesLevel"

--- @return TradeFesLevelConfigData
function TradeFesLevelConfig.getConfig(id)
	 return ConfigUtil.getConfig(TradeFesLevelConfig.NAME, tostring(id))
end

--- @retrun {[string]: TradeFesLevelConfigData}
function TradeFesLevelConfig.getAllConfig()
	 return ConfigUtil.getAllConfig(TradeFesLevelConfig.NAME)
end

--- @return TradeFesLevelConfigData[]
function TradeFesLevelConfig.getArrayConfig()
	 return ConfigUtil.getConfArr(TradeFesLevelConfig.NAME)
end


return TradeFesLevelConfig
Actual Behaviour

但是neovim环境下没有这些选项图片

Reproduction steps
  1. Go to '...'
  2. Click '...'
  3. See error '...'
Additional Notes

NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1702233742

配置为lazyvim

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 completion behavior in NeoVim with the provided Lua class, return annotations, and lazyvim configuration, then compare it with the reported VSCode behavior. Check whether completion exposes the returned configuration fields and methods; done means the same relevant options appear in NeoVim, with a focused reproduction or test documenting the result.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, neovim
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.