LuaLS / LuaLS/lua-language-server
Exact Classes Do Not Autocomplete Methods
オープン
まだ誰も着手していません。
- 主要言語
- 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?
Linux
What is the issue affecting?
Completion
Expected Behaviour
Autocomplete should complete methods on instances of (exact) classes.
Expected completion for a normal class:
Actual Behaviour
Methods are not completed.
Reproduction steps
VSCode project with v3.11.0 plugin.
All defaults, no .luarc.json.
Ctrl-space at last line.
---@class (exact) Point
--@class Point
---@field x number
---@field y number
local Point = {}
function Point:new(o)
o = o or {}
setmetatable(o, self)
self.__index = self ---@diagnostic disable-line: inject-field
return o
end
---@param i integer
function Point:add(i)
self.x = self.x + i
end
---@type Point
local point = Point:new({ x = 1, y = 2 })
point:
Additional Notes
Many thanks for all the fantastic work - luals makes me so much more productive!
Log File
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
提供された Point クラスを使用し、最終行で Ctrl-space を実行して、v3.11.0 プラグインを含む Visual Studio Code プロジェクトで問題を再現します。正確なクラスに対する補完を通常のクラス例と比較します。Point インスタンスで add メソッドが補完候補として提示されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- lua
- 領域
- devtools
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100