mirror of
https://github.com/helix-editor/helix.git
synced 2025-01-19 21:47:07 +04:00
lsp: Re-enable hooks.
This commit is contained in:
parent
d61b4854b8
commit
c8424c6ff0
@ -83,11 +83,11 @@ pub async fn event_loop(&mut self) {
|
||||
|
||||
// initialize lsp
|
||||
self.language_server.initialize().await.unwrap();
|
||||
// TODO: temp
|
||||
// self.language_server
|
||||
// .text_document_did_open(&cx.editor.view().unwrap().doc)
|
||||
// .await
|
||||
// .unwrap();
|
||||
|
||||
self.language_server
|
||||
.text_document_did_open(&self.editor.view().unwrap().doc)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
self.render();
|
||||
|
||||
@ -142,13 +142,12 @@ pub async fn handle_language_server_message(&mut self, call: Option<helix_lsp::C
|
||||
match notification {
|
||||
Notification::PublishDiagnostics(params) => {
|
||||
let path = Some(params.uri.to_file_path().unwrap());
|
||||
let view: Option<&mut helix_view::View> = None;
|
||||
// TODO:
|
||||
// let view = self
|
||||
// .editor
|
||||
// .views
|
||||
// .iter_mut()
|
||||
// .find(|view| view.doc.path == path);
|
||||
|
||||
let view = self
|
||||
.editor
|
||||
.views
|
||||
.iter_mut()
|
||||
.find(|view| view.doc.path == path);
|
||||
|
||||
if let Some(view) = view {
|
||||
let doc = view.doc.text().slice(..);
|
||||
|
Loading…
Reference in New Issue
Block a user