facebookarchive / nuclide

An open IDE for web and native mobile development, built on top of Atom
https://nuclide.io
Other
7.79k stars 682 forks source link

Run clang-format on selection #1031

Open viveksjain opened 7 years ago

viveksjain commented 7 years ago

Issue and Steps to Reproduce

It seems nuclide's support for clang-format applies to the entire file. It would be nice if you have something selected to apply clang-format just to that selection.

Versions

Additional Details

viveksjain commented 7 years ago

Actually it seems to run properly on the selection in certain cases, but not in others…not sure what the exact logic is under the hood. But in a class declaration, it seems to be reformatting everything inside the section (e.g. all functions under public or private), even if I only have one function selected.