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: Folding regions for Rust #55648
Comments
(Experimental duplicate detection)
|
This works for me nicely if the #region and #endregion are indented all the way to the left. However if they are a bit indented it does not work. @aeschli is this expected? fn main() {
// The statements here will be executed when the compiled binary is called
#region
///my region
#endregion
// Print text to the console
println!("Hello World!");
} |
Sounds like a bug to me. |
@isidorn it does work if the code within the #region #endregion is also indented. Kind of forces you to indent your code within regions which I personally like. Not sure if this is by design though. |
The PR added only |
Verified. But the code in the region has to be indented for this to work. |
A few thoughts:
|
With my fix this should work also indented. When testing always use content with the same or smaller indent than the @bpasero What was your example? |
@isidorn the one from isidor |
@bpasero Ah, his example is missing the |
We do prefer a space after a comment, however, we use In general, Rust and it's tools do not have any 'significant' comments and when people have tried to use them there has usually been a negative reaction. So I don't think using |
Folding regions for Rust
The following languages currently have markers defined:
Can we please have this functionality for Rust code?
Rust: #region and #endregion would suffice
The text was updated successfully, but these errors were encountered: