-
Notifications
You must be signed in to change notification settings - Fork 50
refilling single-line (Rust) comments #524
Copy link
Copy link
Open
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels