Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Incorrect folding range when a function with an inline comment follows an annotation

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

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

評価

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

調査の方向性

まず、issue の Lua スニペットで折りたたみの動作を再現し、インラインコメントを削除するか空行を追加したバリエーションと比較します。アノテーションの後に関数宣言が続く場合の folding-range の処理を追跡します。関数宣言の横に折りたたみ用のシェブロンが表示され、関数本体全体を折りたためれば完了です。

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

説明

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?

Formatting

Expected Behaviour

The folding chevron will be next to the function declaration and will fold the function.

Actual Behaviour

The folding chevron is next to the annotation and will only fold the one line of the function, leaving the rest of the function unfolded.

Image
Image

Reproduction steps

This code reproduces it:
---@param bar integer function foo(bar) -- comment local whee = bar + 3 return whee end

Additional Notes

Removing the inline comment fixes it.
Putting a blank line between the annotation and the function declaration line, even if it still has the inline comment, fixes it.

Image
Image

Log File

I couldn't get the thing to upload it, I'm sorry :(

主要言語
Lua
スター
4.4k
フォーク
442
平均マージ
8日 9時間
マージ済み PR(30日)
1

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

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

はじめの一歩

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

LuaLS/lua-language-server のほかの issue

LuaLS/lua-language-server の issue をすべて見る

似ている issue

Lua の issue をもっと見る

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

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