mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 17:36:29 +00:00
refactor: enable formatting for ternaries
This requires removing the "Inner expression should be aligned" rule from clint as it prevents essentially any formatting regarding ternary operators.
This commit is contained in:
@@ -1268,8 +1268,8 @@ static bool viml_pexpr_handle_bop(const ParserState *const pstate, ExprASTStack
|
||||
const ExprOpAssociativity bop_node_ass = (
|
||||
(bop_node->type == kExprNodeCall
|
||||
|| bop_node->type == kExprNodeSubscript)
|
||||
? kEOpAssLeft
|
||||
: node_ass(*bop_node));
|
||||
? kEOpAssLeft
|
||||
: node_ass(*bop_node));
|
||||
#endif
|
||||
do {
|
||||
ExprASTNode **new_top_node_p = kv_last(*ast_stack);
|
||||
@@ -2202,8 +2202,8 @@ viml_pexpr_parse_process_token:
|
||||
cur_node->data.opt.ident_len = 0;
|
||||
cur_node->data.opt.scope = (
|
||||
cur_token.len == 3
|
||||
? (ExprOptScope)pline.data[cur_token.start.col + 1]
|
||||
: kExprOptScopeUnspecified);
|
||||
? (ExprOptScope)pline.data[cur_token.start.col + 1]
|
||||
: kExprOptScopeUnspecified);
|
||||
} else {
|
||||
cur_node->data.opt.ident = cur_token.data.opt.name;
|
||||
cur_node->data.opt.ident_len = cur_token.data.opt.len;
|
||||
|
Reference in New Issue
Block a user