Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to add code formatter? #193

Open
tuoyitian opened this issue Apr 21, 2023 · 1 comment
Open

Is it possible to add code formatter? #193

tuoyitian opened this issue Apr 21, 2023 · 1 comment

Comments

@tuoyitian
Copy link

I think just use the JavaScript code formatter will do the job since the syntaxes are similar.

@YellowAfterlife
Copy link
Owner

YellowAfterlife commented Apr 21, 2023

A long time ago, there was an attempt but it couldn't handle a lot of things so it was eventually removed.

gml_fmt was good at the time, though it's not up to date with 2.3+ syntax and there are already >4000 lines of Rust in it.

JavaScript code formatters tend to panic as soon as they see something that doesn't happen in JS, like constructor syntax or GML-specific keywords. But if you can find one that doesn't act weirdly, you can totally make a plugin that wraps it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants