mirror of
https://github.com/latex-lsp/texlab.git
synced 2025-08-04 10:49:55 +00:00
parent
669e7629d6
commit
efe7e13627
3 changed files with 15 additions and 3 deletions
|
@ -416,7 +416,11 @@ impl Server {
|
|||
|
||||
if self.workspace.read().config().build.on_save {
|
||||
let text_document = TextDocumentIdentifier::new(uri.clone());
|
||||
let params = BuildParams { text_document };
|
||||
let params = BuildParams {
|
||||
text_document,
|
||||
position: None,
|
||||
};
|
||||
|
||||
self.build(None, params)?;
|
||||
}
|
||||
|
||||
|
@ -729,7 +733,7 @@ impl Server {
|
|||
}
|
||||
|
||||
if fwd_search_after {
|
||||
let _ = internal.send(InternalMessage::ForwardSearch(uri, None));
|
||||
let _ = internal.send(InternalMessage::ForwardSearch(uri, params.position));
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use commands::ForwardSearchError;
|
||||
use lsp_types::{TextDocumentIdentifier, TextDocumentPositionParams};
|
||||
use lsp_types::{Position, TextDocumentIdentifier, TextDocumentPositionParams};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_repr::{Deserialize_repr, Serialize_repr};
|
||||
|
||||
|
@ -17,6 +17,9 @@ impl lsp_types::request::Request for BuildRequest {
|
|||
#[serde(rename_all = "camelCase")]
|
||||
pub struct BuildParams {
|
||||
pub text_document: TextDocumentIdentifier,
|
||||
|
||||
#[serde(default)]
|
||||
pub position: Option<Position>,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue