Rishabh-malhotraa / caucus

Realtime Collaborate Editor with Embedded Compiler
https://caucus.rishabhmalhotra.in/
MIT License
297 stars 70 forks source link

Add option to Format code like prettier does on VSCODE #9

Open Rishabh-malhotraa opened 3 years ago

Rishabh-malhotraa commented 3 years ago

I wish there could be a button on the toolbar, on which if you click it formats the document just like prettier does on vscode.

This needs further investigation as is it something which is even practical and should be pursued or no, because this can lead to some annoying bugs with cursors during collaboration D:

MarufSharifi commented 3 years ago

I wanna work on this issue, please assign it to me.

Rishabh-malhotraa commented 3 years ago

@rounit08, you can tell me your approach on how you plan to do this. I need to research how you even go ahead trying to implement a feature like this.

komal1503 commented 3 years ago

@Rishabh-malhotraa I want to give a try to this issue. Can I?

Rishabh-malhotraa commented 3 years ago

@komal1503 this is a difficult issue. Before working on this, mind doing some research on how you would try to implement this.

MarufSharifi commented 3 years ago

i Investigated a lot, Codmirror's maintainer says that it doesn't provide any formatting functionality itself, but we could format the code base of using language, like we could use from prettier for JavaScript codes

MarufSharifi commented 3 years ago

@Rishabh-malhotraa, @rounit08, @komal1503 what's your opinion?