LuaLS / LuaLS/lua-language-server

Neovim: using the builtin formatter erases virtual lines

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

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

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

説明

How are you using the lua-language-server?

NeoVim

Which OS are you using?

Linux

What is the issue affecting?

Formatting

Expected Behaviour

Virtual lines should be preserved. Here is an example (by @whynothugo) with using StyLua as a formatter instead.

Actual Behaviour

Virtual lines get erased. The diagnostics are still there, though. Here is an example of how it looks.

Reproduction steps
  1. Setup the nvim-lspconfig and lsp_lines plugins
  2. Make sure you see the virtual lines, then format the code
  3. Are the virtual lines still there?
Additional Notes

Both examples are demonstrated by using @WhyNotHugo's lsp_lines Neovim plugin. There is a downstream issue.

Log File

No response

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

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

はじめの一歩

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

調査の方向性

nvim-lspconfig と lsp_lines プラグインを使用して、一覧にあるフォーマット手順に従い、フォーマット前後の仮想行を比較して問題を再現します。Language Server のフォーマット応答と統合の動作を調査します。フォーマット後も仮想行が保持され、診断が表示されたままになれば完了です。

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

評価

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

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

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