LuaLS / LuaLS/lua-language-server
completion not work after a line comment at tail
Open
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?
MacOS
What is the issue affecting?
Completion
Expected Behaviour
obj
:test() -- some comment
:test()
the second test() should complete as expected
Actual Behaviour
the second test() can not complete
Reproduction steps
the test lua code:
---@meta test
---@class Test
---@overload fun():Test
Test = {}
---@return Test
function Test:test() end
local obj = Test()
obj
:test()
:test() -- comment
:test()
Additional Notes
No response
Log File
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the completion failure in NeoVim using the Lua code in the issue, especially the chained calls with a trailing line comment. Trace the completion path for the second call after the commented line and compare it with the expected behavior. Done means completion works for that call while preserving the existing comment handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, neovim
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100