vscode-reasonml
vscode-reasonml copied to clipboard
auto-reformatting
Is there a good way of getting the plug in to run ocp-indent more incrementally? Right now, I have to hit some keys to force a reformat, instead of having reformatting happening on every new line when I hit enter. My emacs config does the expected thing, and I think the deprecated OCaml plugin does as well. This is the major usability problem I'm running into with the vscode plugin, and it really makes it harder to recommend to newbies.
There is a part of the language server protocol for specifying a "formatting on typing" capability in the server. I believe the intention is that when certain character strings are entered into the buffer it will automatically trigger a formatting action. I haven't implemented it yet since I was under the impression it would require redesigning some existing components. But looking at it again just now makes it seem more straightforward than I remember. I'll try to take a look at it soon.
Sounds good. Thanks!
On Wed, Apr 4, 2018 at 9:49 PM, Darin Morrison [email protected] wrote:
There is a part of the language server protocol for specifying a "formatting on typing" capability in the server. I believe the intention is that when certain characters are entered into the buffer it will automatically trigger a formatting action. I haven't implemented it yet since I was under the impression it would require redesigning some existing components. But looking at it again just now makes it seem more straightforward than I remember. I'll try to take a look at it soon.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/reasonml-editor/vscode-reasonml/issues/194#issuecomment-378797162, or mute the thread https://github.com/notifications/unsubscribe-auth/AArqJuKpAuKeO8ptYMhUKEFIN1qChVX3ks5tlXglgaJpZM4THtdY .