Is code formating working in rescript-vscode?

I installed rescript-vcode@1.0.4.
Syntax highlighting and error alerts are working, but the code formatting is not working.
How can I fix this?

In this sample snippet, I am expecting 3rd line to start from the beginning after the file is saved in vscode. But it is not happening.
Screenshot 2021-01-08 at 12.07.17 PM

Hi @akiran

I’m not sure why it’s not working for you, but I have 1.0.4 installed and it seems to be OK for me. I can adjust this code and it always formats back to this:


Also, for me, the semicolons are also being automatically removed

Do you see the ReScript language mode in the bottom right corner?


silly question: did you npm install your project dependencies?

Yes, I did.

rescript & react app demo I am building is working fine, but the formatting is not working in vscode.

Yes, I see Rescript language mode in the bottom right corner.

I found out that the issue is in my vscode settings
I had this in my settings which is causing the problem.

"editor.defaultFormatter": "esbenp.prettier-vscode"

I removed it and rescript formatting is working fine.

Thanks for the help.