Comment.nvim icon indicating copy to clipboard operation
Comment.nvim copied to clipboard

Feature request: Option to start comment before indentation

Open simonomi opened this issue 11 months ago • 0 comments

I would love the option to start linewise comments before indentation, like so:

fn main() {
	let x = 5;
//	let y = 7;
}

I prefer this method of commenting because it keeps the lines of code at the same level of indentation as opposed to the current method, which offsets them like so:

fn main() {
	let x = 5;
	// let y = 7;
}

Note that this would still allow nesting comments, like so:

fn main() {
	let x = 5;
	// if x == 5 {
	// 	// println!("x is 5!");
	// 	do_something_using(x);
	// }
}
fn main() {
	let x = 5;
// 	if x == 5 {
// // 		println!("x is 5!");
// 		do_something_using(x);
// 	}
}

simonomi avatar Mar 24 '24 20:03 simonomi