diff options
author | Kevin Sjöberg | 2022-01-15 06:23:06 +0000 |
---|---|---|
committer | GitHub | 2022-01-15 06:23:06 +0000 |
commit | 3a34036310d502fe99887c7f15f02784475d6dc5 (patch) | |
tree | f5b7ab4383e631bc9563ee9dc467dac89e65e70a /helix-term | |
parent | 97e6f2a38f28bf0051b96fa6f0f5786746b83e74 (diff) |
Use the correct language ID for JavaScript & TypeScript (#1466)
* Use correct language ID for JavaScript/TypeScript
* Add missing slash
* Only calculate fallback when needed
Diffstat (limited to 'helix-term')
-rw-r--r-- | helix-term/src/application.rs | 8 |
1 files changed, 2 insertions, 6 deletions
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(), |