Closed
Description
How are you using the lua-language-server?
NeoVim
Which OS are you using?
Linux
What is the issue affecting?
Formatting
Expected Behaviour
f you enter a buffer and do some modifications and execute vim.lsp.buf.format
while lua_ls is loading the workspace, all your modifications should not be lost and the buffer should be formatted.
Actual Behaviour
If you enter a buffer and do some modifications and execute vim.lsp.buf.format
while lua_ls is loading the workspace, all your modifications will be lost but the buffer is formatted correctly.
Reproduction steps
- Add any texts in file and save it.
- Add any texts again.
- Request
textDocument/formatting
while lua_ls is loading the workspace. - The text in the document will be restored to its previously saved state.
Additional Notes
Related issue: neovim/neovim#22254
Log File
No response