Skip to content
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

Feature request: Option to start comment before indentation #449

Open
simonomi opened this issue Mar 24, 2024 · 0 comments
Open

Feature request: Option to start comment before indentation #449

simonomi opened this issue Mar 24, 2024 · 0 comments

Comments

@simonomi
Copy link

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);
// 	}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant