@@ -24,9 +24,7 @@ pub struct HoverBuilder<'a> {
2424 /// Type expansion, often used for alias types
2525 pub type_expansion : Option < Vec < String > > ,
2626 /// see
27- see_content : Option < String > ,
28- /// other
29- other_content : Option < String > ,
27+ tag_content : Option < Vec < ( String , String ) > > ,
3028
3129 pub is_completion : bool ,
3230 trigger_token : Option < LuaSyntaxToken > ,
@@ -51,8 +49,7 @@ impl<'a> HoverBuilder<'a> {
5149 is_completion,
5250 trigger_token : token,
5351 type_expansion : None ,
54- see_content : None ,
55- other_content : None ,
52+ tag_content : None ,
5653 }
5754 }
5855
@@ -146,11 +143,8 @@ impl<'a> HoverBuilder<'a> {
146143 self . add_annotation_description ( description) ;
147144 }
148145
149- if let Some ( see) = desc_info. see_content {
150- self . see_content = Some ( see) ;
151- }
152- if let Some ( other) = desc_info. other_content {
153- self . other_content = Some ( other) ;
146+ if let Some ( tag_content) = desc_info. tag_content {
147+ self . tag_content = Some ( tag_content) ;
154148 }
155149
156150 Some ( ( ) )
@@ -244,14 +238,12 @@ impl<'a> HoverBuilder<'a> {
244238 }
245239 }
246240
247- if let Some ( see_content) = & self . see_content {
248- content. push_str ( & format ! ( "\n @*see* {}\n " , see_content) ) ;
241+ if let Some ( tag_content) = & self . tag_content {
242+ for ( tag_name, description) in tag_content {
243+ content. push_str ( & format ! ( "\n @*{}* {}\n " , tag_name, description) ) ;
244+ }
249245 }
250246
251- if let Some ( other) = & self . other_content {
252- content. push_str ( "\n \n " ) ;
253- content. push_str ( other) ;
254- }
255247 content
256248 } ;
257249
0 commit comments