lua-language-server icon indicating copy to clipboard operation
lua-language-server copied to clipboard

can not complete param for "overload" functions

Open ZSaberLv0 opened this issue 4 months ago • 1 comments

How are you using the lua-language-server?

NeoVim

Which OS are you using?

MacOS

What is the issue affecting?

Completion

Expected Behaviour

complete param for all overload functions

Actual Behaviour

can only complete params whose param count exactly matches

Reproduction steps

  1. create a lib.lua

    ---@meta test_lib
    
    ---@param p0 string|'aa'|'bb'
    function test(p0) end
    ---@param p0 string|'cc'|'dd'
    ---@param p1 number
    function test(p0, p1) end
    
  2. create a test.lua (| is the cursor position)

    test(|)
    
  3. input ' (single quote) to complete, and only the first function's p0 can be completed

    Image

  4. if the input is test(|, 0), then the second function's p0 can be completed

    Image

Additional Notes

No response

Log File

No response

ZSaberLv0 avatar Jun 19 '25 15:06 ZSaberLv0