diff options
Diffstat (limited to 'helix-view/src/editor.rs')
-rw-r--r-- | helix-view/src/editor.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index f4b0f73e..7406b475 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -307,11 +307,8 @@ impl Editor { if let Some(language_server) = doc.language_server() { tokio::spawn(language_server.text_document_did_close(doc.identifier())); } - let language_id = doc - .language() - .and_then(|s| s.split('.').last()) // source.rust - .map(ToOwned::to_owned) - .unwrap_or_default(); + + let language_id = doc.language_id().map(ToOwned::to_owned).unwrap_or_default(); // TODO: this now races with on_init code if the init happens too quickly tokio::spawn(language_server.text_document_did_open( |