mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-18 09:30:31 +00:00
Implement line<->block comment assist
This commit is contained in:
parent
a307e4f31f
commit
9eecba4dbf
4 changed files with 427 additions and 5 deletions
|
@ -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) }),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue