Skip to content

Commit

Permalink
edits
Browse files Browse the repository at this point in the history
  • Loading branch information
mwsmws22 committed Oct 24, 2024
1 parent f2cc3cf commit e2ccb34
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ public class QCodeStyleSettings extends CustomCodeStyleSettings {
public boolean PARENTHESES_SPACE_BEFORE_SEMICOLON = false;

// Assignment
public boolean SPACE_AROUND_ASSIGNMENT_OPERATORS = false;
public boolean SPACE_AROUND_ASSIGNMENT_OPERATORS = true;

// Operators
public boolean SPACE_AFTER_OPERATOR_COMMA = false;
public boolean SPACE_AFTER_OPERATOR_COMMA = true;
public boolean SPACE_AROUND_OPERATOR_CUT = false;
public boolean SPACE_AROUND_OPERATOR_ORDER = false;
public boolean SPACE_AROUND_OPERATOR_WEIGHT = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,12 @@ public QSpacingStrategy(@NotNull CodeStyleSettings codeStyleSettings) {
}

// Operators
builder.around(VAR_ASSIGNMENT_TYPE).spaceIf(custom.SPACE_AROUND_ASSIGNMENT_OPERATORS);
builder.around(VAR_ACCUMULATOR_TYPE).spaceIf(custom.SPACE_AROUND_ASSIGNMENT_OPERATORS);
builder.around(COLUMN_ASSIGNMENT_TYPE).spaceIf(custom.SPACE_AROUND_ASSIGNMENT_OPERATORS);
builder.before(VAR_ASSIGNMENT_TYPE).spaces(0);
builder.before(VAR_ACCUMULATOR_TYPE).spaces(0);
builder.before(COLUMN_ASSIGNMENT_TYPE).spaces(0);
builder.after(VAR_ASSIGNMENT_TYPE).spaceIf(custom.SPACE_AROUND_ASSIGNMENT_OPERATORS);
builder.after(VAR_ACCUMULATOR_TYPE).spaceIf(custom.SPACE_AROUND_ASSIGNMENT_OPERATORS);
builder.after(COLUMN_ASSIGNMENT_TYPE).spaceIf(custom.SPACE_AROUND_ASSIGNMENT_OPERATORS);

// Special case - cut can't go between a var
builder.between(VAR_REFERENCE, OPERATOR_CUT).spaces(1);
Expand Down

0 comments on commit e2ccb34

Please sign in to comment.