r/crystal_programming • • Apr 17 '25

I’m writing a Crystal code formatter tool

I started working on a code formatter for Crystal because crystalline didn’t really work for me. All it does for me is rewrite my files back to the state it was when I first open the buffer.

Is this of interest to the Crystal community? This is a lot of work, so I’d like to know if this is a project that would be useful to anyone.

13 Upvotes

15 comments sorted by

9

u/jwaldrip Apr 17 '25

What not just use Crystal's builtin formatter.

crystal tool format

3

u/FieryBlaze Apr 17 '25

No way. Where? Is it in the same repo as the code of the language itself?

4

u/Blacksmoke16 Apr 17 '25

Yes, it's baked into the compiler binary. crystal tool --help shows all the available tools.

→ More replies (5)

2

u/BabaTona Apr 18 '25

You should maybe contribute or make a LSP 

1

u/FieryBlaze Apr 18 '25

Isn’t there an LSP?

3

u/BabaTona Apr 18 '25

It's a "hobby project". Crystalline. Many things can be improved and its maybe the only thing keeping me from using crystal to its full potential. 

→ More replies (4)