Skip to content

Commit f0fed01

Browse files
committed
hint 不显示命名空间
1 parent 55d3c93 commit f0fed01

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

crates/emmylua_ls/src/handlers/inlay_hint/build_function_hint.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,15 @@ fn get_part(semantic_model: &SemanticModel, typ: &LuaType) -> Option<InlayHintLa
134134
location: get_type_location(semantic_model, typ, 0),
135135
..Default::default()
136136
}),
137+
LuaType::Ref(id) | LuaType::Def(id) => {
138+
let value = id.get_simple_name();
139+
let location = get_type_location(semantic_model, typ, 0);
140+
Some(InlayHintLabelPart {
141+
value: value.to_string(),
142+
location,
143+
..Default::default()
144+
})
145+
}
137146
_ => {
138147
let value = hint_humanize_type(semantic_model, typ, RenderLevel::Simple);
139148
let location = get_type_location(semantic_model, typ, 0);

0 commit comments

Comments
 (0)