diff options
author | Cor Peters | 2021-07-18 07:56:25 +0000 |
---|---|---|
committer | GitHub | 2021-07-18 07:56:25 +0000 |
commit | 0aa43902cab5dbcddb72ddf5d3b825ef874dc620 (patch) | |
tree | 9446d354355f34a9ec2577958e58eca496723c27 /helix-lsp/src/lib.rs | |
parent | 6cba62b49917fde7c5876a1cce9d3883c6bef6c9 (diff) |
Added option to provide a custom config file to the lsp. (#460)
* Added option to provide a custom config file to the lsp.
* Simplified lsp loading routine with anyhow
* Moved config to language.toml
* Fixed test case
* Cargo fmt
* Revert now-useless changes
* Renamed custom_config to config
Co-authored-by: Cor <prive@corpeters.nl>
Diffstat (limited to 'helix-lsp/src/lib.rs')
-rw-r--r-- | helix-lsp/src/lib.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/helix-lsp/src/lib.rs b/helix-lsp/src/lib.rs index 96a45bb9..72606b70 100644 --- a/helix-lsp/src/lib.rs +++ b/helix-lsp/src/lib.rs @@ -312,7 +312,12 @@ impl Registry { Entry::Vacant(entry) => { // initialize a new client let id = self.counter.fetch_add(1, Ordering::Relaxed); - let (mut client, incoming) = Client::start(&config.command, &config.args, id)?; + let (mut client, incoming) = Client::start( + &config.command, + &config.args, + serde_json::from_str(language_config.config.as_deref().unwrap_or("")).ok(), + id, + )?; // TODO: run this async without blocking futures_executor::block_on(client.initialize())?; s_incoming.push(UnboundedReceiverStream::new(incoming)); |