Code: Select all
// Line CommentCode: Select all
/*
Comment Block
*/Code: Select all
//! Code documentationCode: Select all
/*!
Code documentation Block
*/Code: Select all
/// Code documentationCode: Select all
#[doc = "Code documentation"]Comments for documentation can contain simple markdown.
Comments can get nested.
Actually i see a difference between // line comments and /* block comments */, the attribute comments look like some code and all other comments look like line comments.
It would be nice if all the different types of comments can look some how different.
In example if the marker for documentation-comments could get a special color, and the comments which can contain markdown would use the markdown-highlighter but with some special background color the same may for attribute-comments.
// one color
/* ... */ an other color
//! an other color followed by markdown highlighter on special background color
/*! ... */ an other color followed by markdown highlighter on special background color
/// an other color followed by markdown highlighter on special background color
#[doc = "..."] an other color followed by markdown or rust highlighter on special background color
Some special case are code-blocks with backticks in markdown-comments, they also should use the correct highlighter (mostly for rust) but also use the same special background as the according comment-block.
this would be very fancy and outstanding, and its may not what people are used to (for now), but the possibility to activate such a granular highlighting would be amazing, may even the next level of highlighting for all future editors in general.
