Skip to content

Commit 1673317

Browse files
committed
v1.1
1 parent c33d2b7 commit 1673317

File tree

7 files changed

+25
-9
lines changed

7 files changed

+25
-9
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## 1.1
2+
3+
Released on May 19, 2020.
4+
5+
- Upgraded Clang to 10.0.0
6+
- Fixed configure script to work in directories that contain spaces
7+
- Added detection of source code type: clang-format can now apply different formatting to C/C++, Objective-C/C++, Java and JavaScript
8+
- Changed patch application to individual lines rather than replacing the whole buffer. This preserves selections and breakpoints much better. Note that they are still removed in situations, e.g. when the code around the breakpoint is changed.
9+
- Added command to format the entire file, rather than just the selection
10+
- Renamed the existing command to "Format Selection". **This means you'll have to change your shortcut definitions**
11+
12+
## 1.0
13+
14+
Released on Sep 13, 2016.
15+
16+
- Initial version

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
XcodeClangFormat copyright (c) 2016 Mapbox.
1+
XcodeClangFormat copyright (c) 2020 Mapbox.
22

33
Redistribution and use in source and binary forms, with or without modification,are permitted provided that the following conditions are met:
44

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
### [⚙ Download Latest Release](https://github.com/mapbox/XcodeClangFormat/releases/latest)
44

5-
This plugin written for Xcode 8's new plugin infrastructure uses Clang's `libclangFormat` library to format code according to a `.clang-format` file.
5+
This plugin is written for Xcode 8's new plugin infrastructure and compatible through at least Xcode 11.4 It uses Clang's `libclangFormat` library to format code according to a `.clang-format` file.
66

77
Open the app, select a predefined style, or open the `.clang-format` file from your project:
88

@@ -12,15 +12,15 @@ Then, use the <kbd>Format Source Code</kbd> command in Xcode's <kbd>Editor</kbd>
1212

1313
![](screenshot-format.png)
1414

15-
Due to macOS Sandboxing restrictions, this Plugin behaves slightly differently compared to the command line `clang-format` command: It always uses the style selected in the configuration app, and will not use the nearest `.clang-format` file on disk.
15+
Due to macOS sandboxing restrictions, this plugin behaves slightly differently compared to the command line `clang-format` command: It always uses the style selected in the configuration app, and will not use the nearest `.clang-format` file on disk.
1616

1717

1818
## Installing
1919

2020
Download the precompiled app or [build it yourself](#building), then open the app. You might have to right click on the app bundle, and choose <kbd>Open</kbd> to run non-codesigned applications. Then,
2121

2222
* On OS X 10.11, you'll need to run `sudo /usr/libexec/xpccachectl`, then **reboot** to enable app extensions.
23-
* On macOS Sierra, extensions should be loaded by default.
23+
* On macOS Sierra and later, extensions should be loaded by default.
2424

2525
Then, go to *System Preferences**Extensions*, and make sure that **clang-format** in the *Xcode Source Editor* section is checked:
2626

@@ -29,7 +29,7 @@ Then, go to *System Preferences* → *Extensions*, and make sure that **clang-fo
2929

3030
## Keyboard shortcut
3131

32-
To define a keyboard shortcut, open *System Preferences*, click on *Keyboard*, and switch to the *Shortcuts* tab. In the list on the left, select *App Shortcuts*, then hit the <kbd>+</kbd> button. Select Xcode, enter `Format Source Code`, and define a shortcut of your liking.
32+
To define a keyboard shortcut, open Xcode's preferences, and switch to the *Key Bindings* tab. Duplicate the default key binding set if you don't have your own set already. Search for `clang-format`, then add your preferred key bindings for `Format Selection` or `Format Entire File`.
3333

3434
![](screenshot-shortcut.png)
3535

XcodeClangFormat/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>1.0</string>
20+
<string>1.1</string>
2121
<key>CFBundleVersion</key>
2222
<string>1</string>
2323
<key>LSMinimumSystemVersion</key>
2424
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
2525
<key>NSHumanReadableCopyright</key>
26-
<string>Copyright © 2016 Mapbox. All rights reserved.</string>
26+
<string>Copyright © 2020 Mapbox. All rights reserved.</string>
2727
<key>NSMainNibFile</key>
2828
<string>MainMenu</string>
2929
<key>NSPrincipalClass</key>

clang-format/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundlePackageType</key>
1818
<string>XPC!</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>1.0</string>
20+
<string>1.1</string>
2121
<key>CFBundleVersion</key>
2222
<string>1</string>
2323
<key>LSMinimumSystemVersion</key>
@@ -52,6 +52,6 @@
5252
<string>com.apple.dt.Xcode.extension.source-editor</string>
5353
</dict>
5454
<key>NSHumanReadableCopyright</key>
55-
<string>Copyright © 2016 Mapbox. All rights reserved.</string>
55+
<string>Copyright © 2020 Mapbox. All rights reserved.</string>
5656
</dict>
5757
</plist>

screenshot-format.png

227 KB
Loading

screenshot-shortcut.png

45.2 KB
Loading

0 commit comments

Comments
 (0)