如何为Swift iOS编程配置Uncrustify for Allman风格?

如何为Swift iOS编程配置Uncrustify for Allman风格?,第1张

概述我正在尝试使用Allman Style获得可与 Swift配合使用的UncrustifyX配置.我在Xcode中使用BBUncrustifyPlugin.这是我到目前为止所拥有的: # indent using tabsinput_tab_size = 8output_tab_size = 4 我正在尝试使用Allman Style获得可与 Swift配合使用的UncrustifyX配置.我在Xcode中使用BBUncrustifyPlugin.这是我到目前为止所拥有的:

# indent using tabsinput_tab_size                           = 8output_tab_size                          = 4indent_columns                           = output_tab_sizeindent_with_tabs                         = 1# indent caseindent_switch_case                       = indent_columnsindent_case_brace                        = 0# indent class bodyindent_class                             = True# newlinesnl_after_semicolon                       = true# spaces# add in generalsp_before_sparen                         = add# but remove forsp_version_paren                         = removesp_catch_paren                           = removesp_scope_paren                           = removesp_func_call_user_paren                  = remove# Allman style for curly bracesnl_assign_brace                          = addnl_enum_brace                            = addnl_union_brace                           = addnl_struct_brace                          = addnl_class_brace                           = addnl_do_brace                              = addnl_if_brace                              = addnl_for_brace                             = addnl_else_brace                            = addnl_while_brace                           = addnl_switch_brace                          = addnl_fcall_brace                           = addnl_fdef_brace                            = addnl_brace_else                            = addnl_brace_while                           = removenl_case_colon_brace                      = addnl_after_brace_open                      = true# one linersnl_func_leave_one_liners                 = truenl_enum_leave_one_liners                 = truenl_create_if_one_liner                   = truenl_create_for_one_liner                  = truenl_create_while_one_liner                = true@H_419_12@  

它使大部分支撑正确,但拉开感叹号和问号,并有一些其他问题.我不知道我能做些什么才能让它正常工作.

我做了一个要点here:

解决方法 首先我要说:我无法帮助你解决unrustify的问题.

但也许我可以为您提供另一种解决方案:您应该看看开源命令行工具swiftformat.除此之外,它也支持allman- aka东海岸风格.

https://github.com/nicklockwood/SwiftFormat

总结

以上是内存溢出为你收集整理的如何为Swift iOS编程配置Uncrustify for Allman风格?全部内容,希望文章能够帮你解决如何为Swift iOS编程配置Uncrustify for Allman风格?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1014549.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-22
下一篇 2022-05-22

发表评论

登录后才能评论

评论列表(0条)

保存