Open imraan-go opened 7 months ago
Also happen for 'large' Python file.
Here to echo - I am hitting this same error when trying to format a large Python file with the black
external formatter.
To me it seems like the solution is just to make the formatting timeout configurable in settings.json? Not sure if I should open a separate issue for that
The same thing happens to me with large python files using black. In my case I actually call the following script as external editor. This works fine for small python files but times out on large files. If we could configure the timeout that would be very helpful. "Large" in my case is anything above ~1500 lines.
#!/bin/bash
# run isort then black on stdin and write to stdout
# for use with zed external formatter
isort - | black -
Same thing happened to me too by using djlint
as an external formatter. I think timeout should just be able to be set as a setting
Same exact issue...
2024-07-26T12:41:37.800467792+02:00 [WARN] timed out waiting for formatting
I get this in the log when I try to format large document and it does not format it. Is super annoying.
Running into this as well. This is pretty important since I use my text editor all the time to format large JSON files and I cannot do so in Zed since the formatter always times out.
Can we please at least have a timeout configuration option in settings? It's very frustrating, especially since some files format ok, while others just do nothing, not even indicating an error. It took me a while to figure out to check the log file for errors
Running into this as well. My JSON file is ~2MB, which after formatting is 28K lines. With the default formatter, Zed took like a minute to try to format it and failed because of timeout. But Rustrover happily formatted it in ~3 seconds.
The performance gap is unbelievable. I'd really like to contribute on this issue, but I need a pointer into the code.
Check for existing issues
Describe the bug / provide steps to reproduce it
timed out waiting for formatting
0facf541-2f9b-4cdb-b5c5-8fd4e35eb7a2.1.json
Environment
Zed: v0.128.3 (Zed) OS: macOS 14.4.1 Memory: 32 GiB Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your
~/Library/Logs/Zed/Zed.log
file to this issue.2024-04-03T06:42:37-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:42:37-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:42:44-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:42:48-07:00 [WARN] timed out waiting for formatting 2024-04-03T06:42:49-07:00 [WARN] failed to deserialize LSP message: {"jsonrpc":"2.0","error":{"code":-32600,"message":"error during message '{\"jsonrpc\":\"2.0\",\"method\":\"$/cancelRequest\",\"params\":{\"id\":9}}' handling: Error: Message id is undefined: {\"jsonrpc\":\"2.0\",\"method\":\"$/cancelRequest\",\"params\":{\"id\":9}}"}} 2024-04-03T06:43:01-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:43:01-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:43:01-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:45:26-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:45:30-07:00 [WARN] timed out waiting for formatting 2024-04-03T06:45:31-07:00 [WARN] failed to deserialize LSP message: {"jsonrpc":"2.0","error":{"code":-32600,"message":"error during message '{\"jsonrpc\":\"2.0\",\"method\":\"$/cancelRequest\",\"params\":{\"id\":10}}' handling: Error: Message id is undefined: {\"jsonrpc\":\"2.0\",\"method\":\"$/cancelRequest\",\"params\":{\"id\":10}}"}} 2024-04-03T06:46:13-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:13-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:13-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:13-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:13-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:13-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:13-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:13-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:13-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:13-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:13-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:13-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:13-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:14-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:14-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:14-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:14-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:14-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:14-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:14-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:14-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:14-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:14-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:14-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-03T06:46:16-07:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition