@@ -83,11 +83,11 @@ impl Application {
84 // initialize lsp
84 // initialize lsp
85 self.language_server.initialize().await.unwrap();
85 self.language_server.initialize().await.unwrap();
87− // self.language_server
87+ self.language_server
88− // .text_document_did_open(&cx.editor.view().unwrap().doc)
88+ .text_document_did_open(&self.editor.view().unwrap().doc)
90− // .unwrap();
90+ .unwrap();
92 self.render();
92 self.render();
@@ -142,13 +142,12 @@ impl Application {
142 match notification {
142 match notification {
143 Notification::PublishDiagnostics(params) => {
143 Notification::PublishDiagnostics(params) => {
144 let path = Some(params.uri.to_file_path().unwrap());
144 let path = Some(params.uri.to_file_path().unwrap());
145− let view: Option<&mut helix_view::View> = None;
145+
147− // let view = self
146+ let view = self
148− // .editor
147+ .editor
149− // .views
148+ .views
150− // .iter_mut()
149+ .iter_mut()
151− // .find(|view| view.doc.path == path);
150+ .find(|view| view.doc.path == path);
153 if let Some(view) = view {
152 if let Some(view) = view {
154 let doc = view.doc.text().slice(..);
153 let doc = view.doc.text().slice(..);