Open baelter opened 3 years ago
Hi @baelter,
Formatting is working fine without the language server, so could you add an option to disable it in the language server
The easiest way would be to add a config. option but it would need to be handled by the editor plugin I think. I could also add a specific cli flag to turn it off but I would rather fix the issue if possible 😉.
When I enable this in vscode with format on save enabled the formatter runs forever with 100% cpu.
I have a hard time reproducing this issue on my computer. Out of curiosity, does crystal tool format
output an error or take a long time to run? If possible, could you also look at the crystalline logs and check if there is something unusual there? (cmd+shift+P > type "logs" and pick "Developer: Show Logs…" > select any source > choose "Crystal Language" in the logs dropdown)
I just released 📦 v0.2.1
that might fix the issue, could you try upgrading your crystalline version?
Sweet, will do. Just have to reproduce and check those logs first!
Getting some error output which does not make sense:
[Warn - 8:51:11 AM] In src/client/client.cr:317:43
317 | close_connection(frame, 504_u16, "CHANNEL_ERROR - Channel #{frame.channel} not open")
^
Error: unexpected token: CHANNEL_ERROR
[Warn - 8:51:49 AM] In src/client/client.cr:316:74
316 | @log.error { "Channel #{frame.channel} not open when handling #{frame.class.name}" }
^
Error: unexpected token: }
There are no issues with the code.
crystal tool format src/client/client.cr
does not error.
Same with v0.2.1
.
Not sure if it's related to the hanging formatting, that seems kinda random.
This can take up to a minute. No output in the logs. Running latest version now.
This can take up to a minute. No output in the logs. Running latest version now.
This is weird, saving should only call the built-in crystal formatter (same as crystal tool format).
Unfortunately a bug in the Crystal compiler prevents me from compiling and running crystalline since the last release (0.36.1). I'm waiting for the Crystal team to fix this before I'll be able to investigate more. (see https://github.com/crystal-lang/crystal/issues/10359)
When I enable this in vscode with format on save enabled the formatter runs forever with 100% cpu. Formatting is working fine without the language server, so could you add an option to disable it in the language server?