kenkangxgwe / lsp-wl

A Wolfram Language Server
MIT License
212 stars 22 forks source link

how to format MMA code? #21

Open asukaminato0721 opened 4 years ago

asukaminato0721 commented 4 years ago

As far as I know. MMA doesn't have a commonly used code formater.

I searched on mse, find this https://github.com/lshifr/CodeFormatter . But it seems a bit hard to use.

So where can I find the code formater?(Since there are only 3 mma-about plugins in VS Code plugin market)

Meanwhile, format it by hand is not pleased.

kenkangxgwe commented 4 years ago

People have different appetites for formating, e.g., indentation, dangling parenthesis, whitespaces and even semicolon;. I will try to work on workspace/configuration so users can specify their own style. Otherwise, they may get angry when they find their code being auto-formatted to an unfavorite style. I have thought a bunch of possible formatting styles but it should not be enough. Just opened another issue #23 for collecting possible formatting styles. Please feel free to share your ideas on that issue.