As discussed here: helix-editor/helix#2128 (comment)
To support refilling single-line Rust comments (as desired in this helix issue), the most flexible proposal I've seen is to provide a list of know prefixes, e.g. ["//", "///", "//!"], and then if one of these prefixes is identified on a single line input text, propagate initial_indent to subsequent_indent.
FWIW I created this branch that does the indent propagation without any public function signature changes. All tests pass, but I figured there might be some cases where this isn't flexible enough. I'd love to get some feedback on cases where this solution would be insufficient.
As discussed here: helix-editor/helix#2128 (comment)
To support
refilling single-line Rust comments (as desired in this helix issue), the most flexible proposal I've seen is to provide a list of know prefixes, e.g.["//", "///", "//!"], and then if one of these prefixes is identified on a single line input text, propagateinitial_indenttosubsequent_indent.FWIW I created this branch that does the indent propagation without any public function signature changes. All tests pass, but I figured there might be some cases where this isn't flexible enough. I'd love to get some feedback on cases where this solution would be insufficient.