Skip to content

Commit

Permalink
lsp: Allow for local globals when collecting all components
Browse files Browse the repository at this point in the history
  • Loading branch information
hunger committed Jun 19, 2024
1 parent 58148b4 commit 9e8e0ce
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tools/lsp/common/component_catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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(),
));
}
}
Expand Down

0 comments on commit 9e8e0ce

Please sign in to comment.