PistonDevelopers / VisualRust

Visual Studio extension for Rust
MIT License
701 stars 73 forks source link

Polish: Automatic multi-line doc comments / templating #291

Open MaulingMonkey opened 7 years ago

MaulingMonkey commented 7 years ago

Adding a new line after a /// style comment in C# automatically prefixes the line with ///. Might be able to reuse the existing autoindent code for similar in Rust?

Prefixing an existing C# function with /// on a new line also causes the autogeneration of xml tags for parameters, returns, etc. Rust doesn't have an enforced equivalent, but it sounds like rustdoc would recognize the following convention which could be generated instead ( http://brson.github.io/2012/04/14/how-to-rustdoc ):

/// [cursor here]
/// 
/// # Arguments
/// 
/// * `param1` - ...
/// * `param2` - ...
/// 
/// # Return Value
/// 
/// ...

I'm also planning to parse similar conventions for signature help providers.