mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 14:21:16 +00:00
LSP: properly classify callback aliases in auto-complete
Otherwise the completion is wrong as it tries to complete with `:` instead of `=>`
This commit is contained in:
parent
ca53abdbc7
commit
d7402be076
1 changed files with 2 additions and 2 deletions
|
@ -240,7 +240,7 @@ fn resolve_element_scope(
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|(k, t)| {
|
.map(|(k, t)| {
|
||||||
let mut c = CompletionItem::new_simple(k, t.to_string());
|
let mut c = CompletionItem::new_simple(k, t.to_string());
|
||||||
c.kind = Some(if matches!(t, Type::Callback { .. }) {
|
c.kind = Some(if matches!(t, Type::InferredCallback | Type::Callback { .. }) {
|
||||||
CompletionItemKind::Method
|
CompletionItemKind::Method
|
||||||
} else {
|
} else {
|
||||||
CompletionItemKind::Property
|
CompletionItemKind::Property
|
||||||
|
@ -271,7 +271,7 @@ fn resolve_element_scope(
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
let mut c = CompletionItem::new_simple(k.into(), t.to_string());
|
let mut c = CompletionItem::new_simple(k.into(), t.to_string());
|
||||||
c.kind = Some(if matches!(t, Type::Callback { .. }) {
|
c.kind = Some(if matches!(t, Type::InferredCallback | Type::Callback { .. }) {
|
||||||
CompletionItemKind::Method
|
CompletionItemKind::Method
|
||||||
} else {
|
} else {
|
||||||
CompletionItemKind::Property
|
CompletionItemKind::Property
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue