LuaLS / LuaLS/lua-language-server
editor.codeActionsOnSave with extension slows down file saving in VS Code
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 4.4k
- Forks
- 442
- PR merge metrics
- No merged PRs in 30d
Description
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
- Change large lua file
- Press Ctrl+S
- 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Reproduce the delay in Visual Studio Code with the large Lua file and workspace described, then trace the extension's editor.codeActionsOnSave handling and the "Getting the code action" stall. Done means saving no longer incurs the reported delay with the extension enabled, with regression coverage for the scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, vscode
- Domain
- devtools, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100