LuaLS / LuaLS/lua-language-server
Go to Definition not working for class symbols inside inline function parameter types
まだ誰も着手していません。
- 主要言語
- Lua
- スター
- 4.4k
- フォーク
- 442
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
### 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?
Hover
### Expected Behaviour
Clicking on MyData inside the function(data: MyData) parameter list should navigate to the ---@class MyData definition, similar to how it works in a standard ---@type MyData
### Actual Behaviour
Hovering over MyData correctly displays the class documentation.
"Go to Definition" (F12) does not trigger any action.
No error is reported in the logs, it simply feels like the text is not "linkified".
### Reproduction steps
```lua
---@class MyData
---@field id number
---@param callback fun(data: MyData)
function Execute(callback)
end
-- Try to "Go to Definition" on `MyData` in the line below:
Execute(function(data)
-- The hover shows "(class) MyData", but F12 does nothing.
end)
```
### Additional Notes
When a function parameter is annotated as a fun(arg: ClassName), the ClassName symbol in the hover tooltip shows the correct class information, but "Go to Definition" (F12 or Ctrl+Click) fails to navigate to the class definition.
Behaviors are normal in EmmyLua.
### Log File
_No response_
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
提供された Lua の例を使って Visual Studio Code Extension で問題を再現し、その後、アノテーション fun(data: MyData) 内の MyData に対する F12 または Ctrl+Click の定義へ移動するエントリーポイントから開始します。動作しているホバーの挙動および標準的な ---@type MyData のケースと比較します。クラスシンボルが ---@class MyData の定義へ移動できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- lua
- 領域
- devtools
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 64/100