LuaLS / LuaLS/lua-language-server

Neovim: using the builtin formatter erases virtual lines

未關閉
#1,471 11 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

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. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

使用 nvim-lspconfig 和 lsp_lines 外掛重現此問題,按照列出的格式化步驟操作,並比較格式化前後的虛擬行。調查語言伺服器的格式化回應和整合行為;當格式化能保留虛擬行,同時診斷資訊仍然可見時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
lua
領域
developer-experience, tooling
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。