LuaLS / LuaLS/lua-language-server
Support specifying globals inside Lua files
オープン
まだ誰も着手していません。
enhancement
- 主要言語
- Lua
- スター
- 4.4k
- フォーク
- 442
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Currently, when using this language server, you get warnings for global variables:
if someGlobalVariable then -- Undefined global `someGlobalVariable `. Lua Diagnostics.(undefined-global)
print("wow!")
end
The way to squelch them is to add the globals to the VSCode settings. But this is too much of a sledgehammer, as we might only want the globals to be enabled in this specific file. Thus, we should also add a feature so that end-users can specify the globals in-line:
-- We specify a list of globals at the top of the file.
-- @global someGlobalVariable
someCode()
if someGlobalVariable then -- No warning.
print("wow!")
end
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、language server における未定義グローバルの診断処理と、既存の VSCode グローバル変数設定の場所を特定します。Lua コメントがどのように解析されるかを追跡し、指定したグローバルがプロジェクト全体の設定を変更せず、そのファイル内でのみ受け入れられるように、インラインの @global 構文を定義してテストします。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- lua
- 領域
- devtools
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100