Git Product home page Git Product logo

Comments (4)

yixiang avatar yixiang commented on June 4, 2024

Just verified the behavior. However, this is a problem of the clang-format command, not a problem with the XCode-Clang-Format plugin. Please file a bug with clang-format. Find info here http://clang.llvm.org/OpenProjects.html

As a work around, you can just manually separate the string as below, the plugin won't mess up the formatting in that case. Please

@"山东省龙口市的肌肤上看见的疯狂世界东方时"
@"的疯狂送点福利时间到付款送来的风";

刚刚确证了你描述的行为。只不过这是一个clang-format命令的问题,不是这个插件的问题。插件只是通过调用clang-format命令来实现格式化。请报bug给clang-format。详情请见:

作为一个临时解决方案,你可以手动将字符串分段如下。

@"山东省龙口市的肌肤上看见的疯狂世界东方时"
@"的疯狂送点福利时间到付款送来的风";

请关闭这个问题。

from clangformat-xcode.

zb737472783 avatar zb737472783 commented on June 4, 2024

是需要调整那个参数,能说一下吗?

from clangformat-xcode.

zb737472783 avatar zb737472783 commented on June 4, 2024

BasedOnStyle: LLVM
BreakBeforeBraces: Linux
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
ObjCBlockIndentWidth: 4
TabWidth: 4
UseTab: Always
Language: Cpp
IndentWidth: 4
AlignTrailingComments: true
SpacesInParentheses: true
SpacesInContainerLiterals: true
SpacesInAngles: true
SpacesBeforeTrailingComments: 1
SpaceInEmptyParentheses: true
PenaltyExcessCharacter: 1
MaxEmptyLinesToKeep: 1
IndentCaseLabels: true
CommentPragmas: ''
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
AccessModifierOffset: 0
AlignEscapedNewlinesLeft: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortFunctionsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
BinPackParameters: false
BreakBeforeBinaryOperators: false
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 0
ContinuationIndentWidth: 0
Cpp11BracedListStyle: false
DerivePointerBinding: false
IndentFunctionDeclarationAfterType: false
NamespaceIndentation: All
PenaltyBreakBeforeFirstCallParameter: 100
PenaltyBreakComment: 100
PenaltyBreakFirstLessLess: 0
PenaltyBreakString: 100
PenaltyReturnTypeOnItsOwnLine: 20
SpacesInCStyleCastParentheses: true
SpacesInContainerLiterals: true

from clangformat-xcode.

yixiang avatar yixiang commented on June 4, 2024

不是调参数。是手动格式化成这样:

self.reserveOrderAddress =
    @"山东省龙口市的肌肤上看见的疯狂世界东方时"
    @"的疯狂送点福利时间到付款送来的风";

这样你下次自动格式化文件时候你的格式就不会被错误格式化了。

from clangformat-xcode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.