LuaLS / LuaLS/lua-language-server

Documentation export is missing information

オープン
#2,322 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Lua
スター
4.4k
フォーク
442
PR マージ指標
30日以内にマージされた PR はありません

説明

How are you using the lua-language-server?

Command Line

Which OS are you using?

Windows

What is the issue affecting?

Other

Expected Behaviour

After generating documentation with --doc, I expected to have access to the all of the information available in the annotations that is presented or used by the language server.

Actual Behaviour

There were a few things that are missing or strange:

  • @see annotations are absent.
  • Access levels (@protected, @private, @package) are absent.
  • Aliases that extend other aliases include the documentation of the alias that they extend, which makes it difficult to tell which documentation belongs to only the extended alias.
  • The start and finish fields seem odd; they're very large numbers (e.g., 5490009, 5490021) that clearly don't refer to character ranges within the files. What are these numbers?

For the purpose of generating documentation, the first two problems seem significant—it would be difficult to filter out private fields and methods, for example.

Reproduction steps
  1. Create a Lua file that uses access modifiers, @see, and an alias that extends another alias. I've provided a minimal example of such a file below.
  2. Observe the missing data and oddities.
Additional Notes

Example for reproduction:

---@class C
---@field private z integer
local C = {}

---Base alias doc comment.
---@alias Base
---| 'A'
---| 'B'

---Extended alias doc comment.
---@alias Derived
---| Base
---| 'C'

---@protected
function C.x()
end

---@see C.x
function C.y()
end
Log File

No response

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、issue の Lua 再現例に対して --doc エクスポートを実行し、その出力が @see、アクセス修飾子、継承されたエイリアスのドキュメント、start/finish をどのように表現しているかを確認します。ドキュメントエクスポートのエントリポイントを追跡し、その出力を language server が使用するアノテーション情報と比較します。エクスポートされたデータが要求されたアノテーションの詳細を保持し、範囲の値を説明または修正できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
lua
領域
documentation, tooling
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。