LuaLS / LuaLS/lua-language-server

Suggestion: Make `@param;@return` available as code action

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

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

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

説明

One really nice feature of the lua-lsp is that by typing `---` above a function, we get the `@param;@return` suggestions which auto-inserts function annotation.

Would it be possible to make this feature available via code action as well? Right now, it takes a bit of repetitive work to get the annotations inserted. When at the function head: `up`, `-`. `-`, `-`, `enter`. By using a code action, this could be reduced to one hotkey (and depending on your editor, maybe one extra `enter`).

Another benefit would be that making this available as code action would increase the discoverability of this feature. For a while, I didn't know that this very useful feature even existed. By being a code action, it would be far easier to discover for new users.

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

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

はじめの一歩

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

調査の方向性

まず、`@param` と `@return` のアノテーションを挿入する、`---` によってトリガーされる既存の候補を追跡し、次に言語サーバーでコードアクションが公開されている箇所を調べます。同じアノテーションの挿入がコードアクションから利用でき、関数ヘッドで引き続き見つけられれば完了です。

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

評価

技術スタック
lua
領域
devtools
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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