move icon indicating copy to clipboard operation
move copied to clipboard

[Feature Request] move-analyzer support the textDocument/formatting PSL protocol

Open yubing744 opened this issue 3 years ago • 3 comments
trafficstars

🚀 Feature Request

move-analyzer support the textDocument/formatting PSL protocol

Motivation

Users can format move code directly in VSCode.

Pitch

Describe the solution you'd like move-analyzer wraps the move-fmt command.

Are you willing to open a pull request? (See CONTRIBUTING) YES

Additional context

Someone needs to continue to maintain the move-fmt project

yubing744 avatar Jul 10 '22 14:07 yubing744

@awelc Do you think it makes sense to implement textDocument/formatting PSL by wrapping the move-fmt command?

yubing744 avatar Jul 10 '22 15:07 yubing744

Another solution: https://github.com/pontem-network/intellij-move/tree/master/src/main/kotlin/org/move/ide/formatter

yubing744 avatar Jul 10 '22 15:07 yubing744

fork rustfmt ?

uvd avatar Jul 10 '22 15:07 uvd

My apologies, this completely slipped off my radar. We had internal discussions about auto-formatting and none of the existing solutions is mature enough to be made an "official" one. The work on "official" auto-formatter is on-going as an external contribution (starting with necessary changes to the "official" Move parser) and we may be able to push some of this work within the core team as the number of contributors increases.

awelc avatar Oct 06 '22 21:10 awelc

@awelc I have some refactoring on move parser which includes the comments for a fidelity ast in https://github.com/move-language/move/pull/294. Currently this needs review from the core developer of move team.

zsluedem avatar Oct 07 '22 02:10 zsluedem