-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to sort ns reference forms
The option results in cljfmt sorting the libspecs inside :require, :require-macros, :use, and :import forms. Whitespace and newlines are preserved for most cases, in particular whether the first libspec element follows :require (or one of the others) or moves to the next line. Comments above and behind a libspec are considered part of that libspec, and they'll move to the new position of the libspec. This means libspecs commented out won't sorted, e.g. [c] #_[b] [a] will sort to #_[b] [a] [c] and similar with ; comments, because it is treated as a comment for [a]. This probably is acceptable, as it is an edge case, and there shouldn't be an expectation that the comment is treated as a libspec.
- Loading branch information
Showing
4 changed files
with
261 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters