<div dir="ltr">It would be awesome if Xcode exposed per-file or per-project formatting settings, and could enforce them in the editor. I hope someone from the dev tools group will be able to comment (and help guide the implementation of this) if there are plans for such a feature.<div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div>Jacob<br></div></div></div></div>
<br><div class="gmail_quote">On Tue, May 17, 2016 at 7:17 PM, Shawn Erickson via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I would love to see flexible formatting styles be more easily available like this.<div><br></div><div>-Shawn</div></div><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote"><div dir="ltr">On Tue, May 17, 2016 at 10:33 AM Daniel Martín &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">As Swift is getting traction in more and more platforms outside of<br>
Apple, we can expect that many coding styles different from what Apple<br>
imposes with SourceKit&#39;s indenting rules will emerge. According to<br>
<a href="https://bugs.swift.org/browse/SR-146" rel="noreferrer" target="_blank">https://bugs.swift.org/browse/SR-146</a>, we now have decoupled indenting<br>
logic from SourceKit into its own library, and a &quot;swift-format&quot; tool is<br>
in the making.<br>
<br>
I am working on adding support for different coding styles to libIDE.<br>
For example, with my changes you could decide how a case label should be<br>
indented with respect to its parent switch context, among other things.<br>
The current, hard coded indenting decisions in libIDE could be named the<br>
&quot;Apple&quot; style, just like Clang supports Google, LLVM, Mozilla, coding<br>
styles for C++. Also, this is something that can be supported by<br>
external tools like Xcode quite easily.<br>
<br>
Do you think this is a good feature to have?<br>
<br>
--<br>
Daniel Martín<br>
_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
</blockquote></div>
</div></div><br>_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
<br></blockquote></div><br></div></div>