From 3a34036310d502fe99887c7f15f02784475d6dc5 Mon Sep 17 00:00:00 2001 From: Kevin Sjöberg Date: Sat, 15 Jan 2022 07:23:06 +0100 Subject: Use the correct language ID for JavaScript & TypeScript (#1466) * Use correct language ID for JavaScript/TypeScript * Add missing slash * Only calculate fallback when needed--- helix-term/src/application.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'helix-term/src') diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index c7202feb..c376aefa 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -358,12 +358,8 @@ impl Application { // trigger textDocument/didOpen for docs that are already open for doc in docs { - // TODO: extract and share with editor.open - 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(); tokio::spawn(language_server.text_document_did_open( doc.url().unwrap(), -- cgit v1.2.3-70-g09d2