diff options
Diffstat (limited to 'support/texlab/src/server.rs')
-rw-r--r-- | support/texlab/src/server.rs | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/support/texlab/src/server.rs b/support/texlab/src/server.rs index fe6f75e74a..567d912435 100644 --- a/support/texlab/src/server.rs +++ b/support/texlab/src/server.rs @@ -173,7 +173,6 @@ impl Server { name: "TexLab".to_owned(), version: Some(env!("CARGO_PKG_VERSION").to_owned()), }), - offset_encoding: None, }; self.connection .initialize_finish(id, serde_json::to_value(result)?)?; @@ -758,6 +757,18 @@ impl Server { Ok(()) } + fn code_actions(&mut self, id: RequestId, _params: CodeActionParams) -> Result<()> { + self.client + .send_response(lsp_server::Response::new_ok(id, Vec::<CodeAction>::new()))?; + Ok(()) + } + + fn code_action_resolve(&mut self, id: RequestId, action: CodeAction) -> Result<()> { + self.client + .send_response(lsp_server::Response::new_ok(id, action))?; + Ok(()) + } + fn handle_file_event(&mut self, event: notify::Event) { let mut changed = false; @@ -823,7 +834,7 @@ impl Server { .on::<DocumentSymbolRequest, _>(|id, params| { self.document_symbols(id, params) })? - .on::<WorkspaceSymbol, _>(|id, params| self.workspace_symbols(id, params))? + .on::<WorkspaceSymbolRequest, _>(|id, params| self.workspace_symbols(id, params))? .on::<Completion, _>(|id, params| { self.completion(id, params)?; Ok(()) @@ -855,6 +866,12 @@ impl Server { .on::<InlayHintResolveRequest,_>(|id, params| { self.inlay_hint_resolve(id, params) })? + .on::<CodeActionRequest, _>(|id, params| { + self.code_actions(id, params) + })? + .on::<CodeActionResolveRequest, _>(|id, params| { + self.code_action_resolve(id, params) + })? .default() { self.connection.sender.send(response.into())?; @@ -983,6 +1000,7 @@ impl From<forward_search::Error> for ForwardSearchStatus { fn from(err: forward_search::Error) -> Self { match err { forward_search::Error::TexNotFound(_) => ForwardSearchStatus::FAILURE, + forward_search::Error::InvalidTexFile(_) => ForwardSearchStatus::ERROR, forward_search::Error::PdfNotFound(_) => ForwardSearchStatus::ERROR, forward_search::Error::NoLocalFile(_) => ForwardSearchStatus::FAILURE, forward_search::Error::Unconfigured => ForwardSearchStatus::UNCONFIGURED, |