You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's assume that relevant nl_before_* options are 0 since I'm not sure how that interacts. With the options nl_after_func[_class]_proto[_group] set to 0 for group and at least 2 for non-group, subsequent lines with comments or preprocessor directives always break the group, so newlines get added after them. Example attached with relevant slice of my config file, correct behaviour would be to keep the code unchanged.
While it could be useful sometimes, I'd rather be able to comment out or if-out prototypes without having newlines added automatically, so that I could choose logical groups of prototypes by adding newlines manually.
The behaviour of cmt/pp in this case could be chosen by the user - either treat them as nothing, so that newlines after a group-ending cmt/pp would be added, or treat them as existing newlines and only add more if needed. The former is more relevant and should be simpler since it only deals with the "inside group" situation.
A similar situation happens with nl_after_func_body[_class]. In particular, I'd like to add newlines before #ifdef followed immediately by a function definition, and after #endif preceded by a function definition, whether it's a class method or separate function; currently it's putting the newlines between pp and function and not outside pp. This is not a priority and could be a separate option, though the concept is the same.
The text was updated successfully, but these errors were encountered:
I'm at version 0.77.1-1.
Let's assume that relevant
nl_before_*
options are 0 since I'm not sure how that interacts. With the optionsnl_after_func[_class]_proto[_group]
set to 0 for group and at least 2 for non-group, subsequent lines with comments or preprocessor directives always break the group, so newlines get added after them. Example attached with relevant slice of my config file, correct behaviour would be to keep the code unchanged.While it could be useful sometimes, I'd rather be able to comment out or if-out prototypes without having newlines added automatically, so that I could choose logical groups of prototypes by adding newlines manually.
The behaviour of cmt/pp in this case could be chosen by the user - either treat them as nothing, so that newlines after a group-ending cmt/pp would be added, or treat them as existing newlines and only add more if needed. The former is more relevant and should be simpler since it only deals with the "inside group" situation.
A similar situation happens with
nl_after_func_body[_class]
. In particular, I'd like to add newlines before#ifdef
followed immediately by a function definition, and after#endif
preceded by a function definition, whether it's a class method or separate function; currently it's putting the newlines between pp and function and not outside pp. This is not a priority and could be a separate option, though the concept is the same.The text was updated successfully, but these errors were encountered: