Implement line<->block comment assist

This commit is contained in:
John Renner 2021-02-24 11:25:10 -08:00
parent a307e4f31f
commit 9eecba4dbf
4 changed files with 427 additions and 5 deletions

View file

@ -85,8 +85,9 @@ pub enum CommentPlacement {
}
impl CommentKind {
const BY_PREFIX: [(&'static str, CommentKind); 8] = [
const BY_PREFIX: [(&'static str, CommentKind); 9] = [
("/**/", CommentKind { shape: CommentShape::Block, doc: None }),
("/***", CommentKind { shape: CommentShape::Block, doc: None }),
("////", CommentKind { shape: CommentShape::Line, doc: None }),
("///", CommentKind { shape: CommentShape::Line, doc: Some(CommentPlacement::Outer) }),
("//!", CommentKind { shape: CommentShape::Line, doc: Some(CommentPlacement::Inner) }),