diff --git a/language_service/src/completion.rs b/language_service/src/completion.rs index ea7aec5bac..3f67b19c32 100644 --- a/language_service/src/completion.rs +++ b/language_service/src/completion.rs @@ -23,7 +23,10 @@ use rustc_hash::FxHashSet; use std::rc::Rc; use std::sync::Arc; +type SortPriority = u32; + #[derive(Debug)] +/// Used to represent pre-existing imports in the completion context struct ImportItem { path: Vec>, alias: Option>, @@ -89,8 +92,7 @@ pub(crate) fn get_completions( // Starting context is top-level (i.e. outside a namespace block) Context::TopLevel }, - // TODO(alex) below line - start_of_namespace: Default::default(), // todo!("set this to after the first comment"), + start_of_namespace: None, current_namespace_name: None, imports: vec![], }; @@ -714,8 +716,6 @@ impl Visitor<'_> for ContextFinder { } } -type SortPriority = u32; - fn package_item_to_completion_item( i: qsc::hir::Item, package: qsc::hir::Package, diff --git a/language_service/src/protocol.rs b/language_service/src/protocol.rs index a5d46e65ee..b76718234e 100644 --- a/language_service/src/protocol.rs +++ b/language_service/src/protocol.rs @@ -77,7 +77,6 @@ pub struct CompletionList { #[derive(Debug)] pub struct CompletionItem { - /// This label is used to render the completion item. pub label: String, pub kind: CompletionItemKind, pub sort_text: Option,