Yuescript icon indicating copy to clipboard operation
Yuescript copied to clipboard

[Feature Request] yuescript prettify tool

Open TurtleP opened this issue 3 years ago • 2 comments

Hi,

I've been using yuescript for a bit in place of MoonScript and it's really nice. However, something that both of these languages are missing are tools which could prettify the code. It's not something that it needs, but would be a nice to have. I'm not familiar with how languages like python or nim are written to handle it, but it could be worth looking into if other people would also find i useful.

TurtleP avatar Jan 02 '22 19:01 TurtleP

Can you show an example about how we can prettify the Yuescript code? Since Yuescript is a whitespace significant language, I'm afraid there might not be too much room to do the prettifying work.

pigpigyyy avatar Jan 04 '22 01:01 pigpigyyy

Honestly, I didn't have anything in mind for specifics. I don't mean to have made this issue just for the sake of it either, though. I think maybe this would be something that the Yuescript community could come together for and possibly set a formatting standard which could even be configured, like how C++ projects have clang format. I think there's also code prettify tools for Lua itself too.

In the sense of it Yuescript being white space significant, though, python is also strict about spaces and they've even managed something out of it.

That all said, though, I do think that if this were considered to be doable, the community would have to pitch in about several things which is a good way to handle it, in my opinion at least.

TurtleP avatar Jan 04 '22 17:01 TurtleP