-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement multiline delimiter catpures #837
Conversation
|
||
if self.multi_line_nodes.contains(&parent_id) { | ||
log::debug!( | ||
parent_id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this does tracing style key/value logging hence the activation of the kv
feature flag in log
, happy to remove. Made debug logs a bit cleaner for me.
","? @do_nothing | ||
. | ||
")" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an idempotence check failure here that's likely clashing with the @append_spaced_softline
after the comma:
topiary/topiary-queries/queries/rust.scm
Lines 108 to 116 in 53eeec8
; Append softlines, unless followed by comments. | |
( | |
[ | |
"," | |
";" | |
] @append_spaced_softline | |
. | |
[(block_comment) (line_comment)]* @do_nothing | |
) |
Logically, the precedence should be to handle the append delimiter before handling the sofline.
/// | ||
/// A boolean indicating whether a given node has a a parent labelled as multi-line. | ||
/// If the provided node has no parent, the function returns `false`. | ||
fn in_multiline_context(&self, node: &Node) -> bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there seems to be a lot of variance between referring to multilines, would help to normalize for consistency:
multiline
multi-line
multi_line
Thank you for taking this on, but before you continue, please see my comment on #835. In particular, the |
Closed due to being obsolete: |
Implement multiline delimiter catpures
Issue: #835
Description
Implemented missing features for
@append_multiline_delimiter
and@prepend_multiline_delimiter
documented in the project READMEChecklist
Checklist before merging: