Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Format ranges #333

Closed
nrc opened this issue May 29, 2017 · 2 comments
Closed

Format ranges #333

nrc opened this issue May 29, 2017 · 2 comments

Comments

@nrc
Copy link
Member

nrc commented May 29, 2017

We currently only format a whole file. We should also try to format a range. Rustfmt has partial support for this (rust-lang/rustfmt#1159) I think it is good enough, that we should implement in the RLS (as an unstable feature) and then let Rustfmt catch up.

@kogai
Copy link
Contributor

kogai commented Jun 10, 2017

I want to challenge this.
Probably, I start from reading ActionHandler.reformat.

@nrc
Copy link
Member Author

nrc commented Jun 10, 2017

@kogai yes, it should look pretty similar to reformat. In Rustfmt, you'll want to look at the "file-lines" feature which lets you pass the range to Rustfmt.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants