Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Integrate with dfmt to provide reformat command #126

Open
zhaopuming opened this issue Jan 29, 2016 · 2 comments
Open

Enhancement: Integrate with dfmt to provide reformat command #126

zhaopuming opened this issue Jan 29, 2016 · 2 comments
Milestone

Comments

@zhaopuming
Copy link

dfmt is a good tool to keep source code format clean and will become an official tool soon.

I noticed that currently dlangide lacks support for reformat code. So instead of reinventing this functionality I suggest just integrate with dfmt, in the same manner that you used dcd for autocompletion.

@buggins
Copy link
Owner

buggins commented Jan 29, 2016

Do you know if it's possible to invoke DFMT to format only range of text (e.g. lines A .. B)?

@zhaopuming
Copy link
Author

Looking at dfmt's code, you can just use dfmt as a library and call this function: https://github.com/Hackerpilot/dfmt/blob/master/src/dfmt/formatter.d#L17 with appropriate formatter config. It reads in a ubyte[] buffer.
I've not tried myself though.

@buggins buggins added this to the 1.0 milestone Sep 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants