LuaLS / LuaLS/lua-language-server

editor.codeActionsOnSave with extension slows down file saving in VS Code

未關閉
#2,297 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
Lua
星號
4.4k
分支
442
PR 合併指標
30 天內沒有已合併 PR

描述

How are you using the lua-language-server?

Visual Studio Code Extension (sumneko.lua)

Which OS are you using?

Windows 11 Pro 22H2 22621.2134

What is the issue affecting?

Other

Expected Behaviour

I have a huge lua file with a ~3k lines in a big workspace folder with ~1k lua files.
I expect that the file is saved instantly, as it was before when I used Windows 10.

Actual Behaviour

But a week ago I switched to Windows 11 and now I noticed that saving the file takes about 2 seconds.
When the lua-language-server extension is disabled in VS Code, the file is saved instantly.
I tried to set Workspace Event - None and disable Diagnostics but it didn't help

Reproduction steps
  1. Change large lua file
  2. Press Ctrl+S
  3. Wait 2 seconds before the extension allows VS Code to save the file to disk
Additional Notes

I found a stall message
изображение

File saving "sv_player.lua": Getting the code action from "'Lua'"
([configure] (command:workbench.action.openSettings?%5B%22editor.codeActionsOnSave%22%5D)).
Log File

No response

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

未指定來源檔案或測試。使用所描述的大型 Lua 檔案和 workspace 在 Visual Studio Code 中重現延遲,然後追蹤擴充功能對 editor.codeActionsOnSave 的處理,以及卡在 "Getting the code action" 的情況。完成的標準是:啟用擴充功能後儲存不再產生報告中的延遲,並且該情境有回歸測試涵蓋。

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

評估

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

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

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