summaryrefslogtreecommitdiff
path: root/helix-view/src/editor.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-02-21 10:47:21 +0000
committerBlaž Hrastnik2021-02-21 10:47:21 +0000
commit9132c6a591fc4515cdddfd16cc382fc3368ed27c (patch)
treea98facaaaf7ae2c71f8a85a2cac650427c7126b9 /helix-view/src/editor.rs
parent7da6bd6a71531713c4de58b04810e32e16eb349a (diff)
Make some Document fields read-only.
Diffstat (limited to 'helix-view/src/editor.rs')
-rw-r--r--helix-view/src/editor.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index 24cd8ef9..b70a6abd 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -37,9 +37,8 @@ impl Editor {
// try to find a language server based on the language name
let language_server = doc
- .language
- .as_ref()
- .and_then(|language| self.language_servers.get(&language, &executor));
+ .language()
+ .and_then(|language| self.language_servers.get(language, &executor));
if let Some(language_server) = language_server {
// TODO: do this everywhere
@@ -47,7 +46,7 @@ impl Editor {
smol::block_on(language_server.text_document_did_open(
doc.url().unwrap(),
- doc.version,
+ doc.version(),
doc.text(),
))
.unwrap();