mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-03 05:12:55 +00:00
lsp: Allow for local globals when collecting all components
This commit is contained in:
parent
58148b4ca7
commit
9e8e0ce307
1 changed files with 7 additions and 2 deletions
|
|
@ -97,11 +97,15 @@ fn exported_project_component_info(
|
|||
}
|
||||
|
||||
#[cfg(feature = "preview-engine")]
|
||||
fn file_local_component_info(name: &str, position: Position) -> ComponentInformation {
|
||||
fn file_local_component_info(
|
||||
name: &str,
|
||||
position: Position,
|
||||
is_global: bool,
|
||||
) -> ComponentInformation {
|
||||
ComponentInformation {
|
||||
name: name.to_string(),
|
||||
category: "User Defined".to_string(),
|
||||
is_global: false,
|
||||
is_global,
|
||||
is_builtin: false,
|
||||
is_std_widget: false,
|
||||
is_layout: false,
|
||||
|
|
@ -191,6 +195,7 @@ pub fn file_local_components(
|
|||
result.push(file_local_component_info(
|
||||
&component.id,
|
||||
Position { url: url.clone(), offset },
|
||||
component.is_global(),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue