LuaLS / LuaLS/lua-language-server

Additional blank lines are added to parameter descriptions in type annotations

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

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

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

説明

How are you using the lua-language-server?

NeoVim

Which OS are you using?

MacOS

What is the issue affecting?

Hover

Expected Behaviour

For multiline descriptions in @param annotations to be displayed as if they were in a single line.

Actual Behaviour

When the description in a @param annotation spans multiple lines, a linebreak in inserted in the Markdown response, which breaks syntax highlighting:
image

Even after removing the preceding whitespace in the example above, formatting is still off:
image

Reproduction steps
  1. Create a lua file with the following content:
---@param bar any This is the description
---           for bar.
local function foo(bar) end
  1. Hover over foo.
  2. Notice the broken highlighting/formatting in the description of bar.
Additional Notes

Although VS Code doesn't have additional syntax highlighting, do note how the font style in explanation above) changes, which suggests that the issue is reproducible outside Neovim:
image

Log File

No response

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

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

はじめの一歩

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

調査の方向性

提供された Lua の例を使い、NeoVim または VS Code で foo にカーソルを合わせて問題を再現します。hover のレスポンスと複数行の @param の説明に対するフォーマット処理の経路から調査を始めます。両方の報告された環境で、Markdown の構文ハイライトを壊さずに説明が 1 行として表示されれば完了です。

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

評価

技術スタック
lua
領域
tooling
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
45/100

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

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