diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs index 102ecb15d..255c9a63b 100644 --- a/helix-core/src/syntax.rs +++ b/helix-core/src/syntax.rs @@ -97,7 +97,6 @@ pub struct LanguageConfiguration { #[serde(rename = "language-id")] // see the table under https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentItem pub language_server_language_id: Option, // csharp, rust, typescriptreact, for the language-server - pub scope: String, // source.rust pub file_types: Vec, // filename extension or ends_with? #[serde(default)] pub shebangs: Vec, // interpreter(s) associated with language @@ -700,10 +699,6 @@ pub fn textobject_query(&self) -> Option<&TextObjectQuery> { .as_ref() } - pub fn scope(&self) -> &str { - &self.scope - } - fn load_query(&self, kind: &str) -> Option { let query_text = read_query(&self.language_id, kind); if query_text.is_empty() { @@ -848,13 +843,6 @@ pub fn language_config_for_shebang( configuration_id.and_then(|&id| self.language_configs.get(id).cloned()) } - pub fn language_config_for_scope(&self, scope: &str) -> Option> { - self.language_configs - .iter() - .find(|config| config.scope == scope) - .cloned() - } - pub fn language_config_for_language_id(&self, id: &str) -> Option> { self.language_configs .iter() diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index 0de0cd172..4ddaa4420 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -1518,13 +1518,6 @@ pub fn get_current_revision(&mut self) -> usize { current_revision } - /// Corresponding language scope name. Usually `source.`. - pub fn language_scope(&self) -> Option<&str> { - self.language - .as_ref() - .map(|language| language.scope.as_str()) - } - /// Language name for the document. Corresponds to the `name` key in /// `languages.toml` configuration. pub fn language_name(&self) -> Option<&str> { diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index f13df2135..ebf261f64 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -1236,8 +1236,7 @@ fn launch_language_servers(&mut self, doc_id: DocumentId) { Ok(client) => Some((lang, client)), Err(err) => { log::error!( - "Failed to initialize the language servers for `{}` - `{}` {{ {} }}", - language.scope(), + "Failed to initialize the language servers for `{}` {{ {} }}", lang, err );