@@ -88,7 +88,7 @@ fn build_decl_hover(
88
88
}
89
89
90
90
let property_owner = LuaPropertyOwnerId :: LuaDecl ( decl_id) ;
91
- add_description ( db, & mut marked_strings, & typ , property_owner) ;
91
+ add_description ( db, & mut marked_strings, property_owner) ;
92
92
93
93
Some ( Hover {
94
94
contents : HoverContents :: Array ( marked_strings) ,
@@ -142,7 +142,6 @@ fn build_member_hover(
142
142
add_description (
143
143
db,
144
144
& mut marked_strings,
145
- & typ,
146
145
LuaPropertyOwnerId :: Member ( member_id) ,
147
146
) ;
148
147
@@ -155,23 +154,13 @@ fn build_member_hover(
155
154
fn add_description (
156
155
db : & DbIndex ,
157
156
marked_strings : & mut Vec < MarkedString > ,
158
- typ : & LuaType ,
159
157
property_owner : LuaPropertyOwnerId ,
160
158
) {
161
159
if let Some ( property) = db. get_property_index ( ) . get_property ( property_owner) {
162
160
if let Some ( detail) = & property. description {
163
161
marked_strings. push ( MarkedString :: from_markdown ( detail. to_string ( ) ) ) ;
164
162
}
165
163
}
166
-
167
- if let LuaType :: Signature ( signature_id) = typ {
168
- let property_owner = LuaPropertyOwnerId :: Signature ( signature_id. clone ( ) ) ;
169
- if let Some ( property) = db. get_property_index ( ) . get_property ( property_owner) {
170
- if let Some ( detail) = & property. description {
171
- marked_strings. push ( MarkedString :: from_markdown ( detail. to_string ( ) ) ) ;
172
- }
173
- }
174
- }
175
164
}
176
165
177
166
fn build_type_decl_hover (
@@ -207,16 +196,16 @@ fn build_type_decl_hover(
207
196
. get_property ( property_owner)
208
197
. and_then ( |p| p. description . clone ( ) ) ;
209
198
if let Some ( description) = description {
210
- s. push_str ( & format ! ( " | {} --{}\n " , type_humanize_text, description) ) ;
199
+ s. push_str ( & format ! (
200
+ " | {} --{}\n " ,
201
+ type_humanize_text, description
202
+ ) ) ;
211
203
} else {
212
204
s. push_str ( & format ! ( " | {}\n " , type_humanize_text) ) ;
213
205
}
214
206
}
215
207
216
- marked_strings. push ( MarkedString :: from_language_code (
217
- "lua" . to_string ( ) ,
218
- s,
219
- ) ) ;
208
+ marked_strings. push ( MarkedString :: from_language_code ( "lua" . to_string ( ) , s) ) ;
220
209
}
221
210
} else if type_decl. is_enum ( ) {
222
211
marked_strings. push ( MarkedString :: from_language_code (
@@ -231,7 +220,7 @@ fn build_type_decl_hover(
231
220
}
232
221
233
222
let property_owner = LuaPropertyOwnerId :: TypeDecl ( type_decl_id) ;
234
- add_description ( db, & mut marked_strings, & typ , property_owner) ;
223
+ add_description ( db, & mut marked_strings, property_owner) ;
235
224
236
225
Some ( Hover {
237
226
contents : HoverContents :: Array ( marked_strings) ,
0 commit comments