diff --git a/crates/zed/src/languages/language_plugin.rs b/crates/zed/src/languages/language_plugin.rs index 10ef71eb28..f31f606f02 100644 --- a/crates/zed/src/languages/language_plugin.rs +++ b/crates/zed/src/languages/language_plugin.rs @@ -34,7 +34,6 @@ pub struct PluginLspAdapter { fetch_latest_server_version: WasiFn<(), Option>, fetch_server_binary: WasiFn<(PathBuf, String), Result>, cached_server_binary: WasiFn>, - // label_for_completion: WasiFn>, initialization_options: WasiFn<(), String>, executor: Arc, runtime: Arc>, @@ -48,7 +47,6 @@ impl PluginLspAdapter { fetch_latest_server_version: plugin.function("fetch_latest_server_version")?, fetch_server_binary: plugin.function("fetch_server_binary")?, cached_server_binary: plugin.function("cached_server_binary")?, - // label_for_completion: plugin.function("label_for_completion")?, initialization_options: plugin.function("initialization_options")?, executor, runtime: Arc::new(Mutex::new(plugin)), @@ -133,25 +131,6 @@ impl LspAdapterTrait for PluginLspAdapter { .await } - // fn label_for_completion( - // &self, - // item: &lsp::CompletionItem, - // language: &language::Language, - // ) -> Option { - // // TODO: Push more of this method down into the plugin. - // use lsp::CompletionItemKind as Kind; - // let len = item.label.len(); - // let grammar = language.grammar()?; - // let kind = format!("{:?}", item.kind?); - // let name: String = call_block!(self, &self.label_for_completion, kind).log_err()??; - // let highlight_id = grammar.highlight_id_for_name(&name)?; - // Some(language::CodeLabel { - // text: item.label.clone(), - // runs: vec![(0..len, highlight_id)], - // filter_range: 0..len, - // }) - // } - async fn initialization_options(&self) -> Option { let string: String = self .runtime diff --git a/plugins/json_language/src/lib.rs b/plugins/json_language/src/lib.rs index 6a9e128698..5bb25d8077 100644 --- a/plugins/json_language/src/lib.rs +++ b/plugins/json_language/src/lib.rs @@ -89,27 +89,6 @@ pub fn cached_server_binary(container_dir: PathBuf) -> Option { } } -// #[export] -// pub fn label_for_completion( -// item: &lsp::CompletionItem, -// // language: &language::Language, -// ) -> Option { -// // TODO: Push more of this method down into the plugin. -// use lsp::CompletionItemKind as Kind; -// let len = item.label.len(); -// let grammar = language.grammar()?; -// let kind = format!("{:?}", item.kind?); - -// // TODO: implementation - -// let highlight_id = grammar.highlight_id_for_name(&name)?; -// Some(language::CodeLabel { -// text: item.label.clone(), -// runs: vec![(0..len, highlight_id)], -// filter_range: 0..len, -// }) -// } - #[export] pub fn initialization_options() -> Option { Some("{ \"provideFormatter\": true }".to_string())