mirror of
https://github.com/latex-lsp/texlab.git
synced 2025-08-04 18:58:31 +00:00
Pass configuration to feature providers
This commit is contained in:
parent
c43e8918ad
commit
533e85b2aa
3 changed files with 44 additions and 14 deletions
|
@ -195,6 +195,7 @@ pub async fn workspace_symbols(
|
|||
text_document: TextDocumentIdentifier::new(uri.clone().into()),
|
||||
},
|
||||
distribution: Arc::clone(&distribution),
|
||||
options: Options::default(),
|
||||
};
|
||||
|
||||
let mut buffer = Vec::new();
|
||||
|
|
|
@ -29,6 +29,7 @@ pub struct FeatureRequest<P> {
|
|||
pub view: DocumentView,
|
||||
pub client_capabilities: Arc<ClientCapabilities>,
|
||||
pub distribution: Arc<Box<dyn Distribution>>,
|
||||
pub options: Options,
|
||||
}
|
||||
|
||||
impl<P> FeatureRequest<P> {
|
||||
|
@ -131,6 +132,7 @@ pub struct FeatureSpec {
|
|||
pub include_declaration: bool,
|
||||
pub client_capabilities: ClientCapabilities,
|
||||
pub distribution: Box<dyn Distribution>,
|
||||
pub options: Options,
|
||||
}
|
||||
|
||||
impl Default for FeatureSpec {
|
||||
|
@ -143,6 +145,7 @@ impl Default for FeatureSpec {
|
|||
include_declaration: false,
|
||||
client_capabilities: ClientCapabilities::default(),
|
||||
distribution: Box::new(UnknownDistribution::default()),
|
||||
options: Options::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -179,6 +182,7 @@ impl FeatureSpec {
|
|||
view: self.view(),
|
||||
client_capabilities: Arc::new(self.client_capabilities),
|
||||
distribution: Arc::new(self.distribution),
|
||||
options: self.options,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue