summaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
authorPhilipp Mildenberger2023-03-19 22:37:41 +0000
committerPhilipp Mildenberger2023-05-18 19:48:32 +0000
commit2eeac10755e6b88e3d5861dee7e2016a10c01c9f (patch)
tree81d338cb10f0718e3bbf280015ecf4a96dc460c7 /helix-term/src
parentb1199c552be39eec8cb428310c8bb2a952454b04 (diff)
Refactor doc language servers to a HashMap, and the config to use a Vec to retain order
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/health.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/helix-term/src/health.rs b/helix-term/src/health.rs
index 5b22ea55..8f921877 100644
--- a/helix-term/src/health.rs
+++ b/helix-term/src/health.rs
@@ -194,10 +194,10 @@ pub fn languages_all() -> std::io::Result<()> {
// TODO multiple language servers (check binary for each supported language server, not just the first)
- let lsp = lang.language_servers.keys().next().and_then(|ls_name| {
+ let lsp = lang.language_servers.first().and_then(|ls| {
syn_loader_conf
.language_server
- .get(ls_name)
+ .get(&ls.name)
.map(|config| config.command.clone())
});
check_binary(lsp);
@@ -271,10 +271,10 @@ pub fn language(lang_str: String) -> std::io::Result<()> {
// TODO multiple language servers
probe_protocol(
"language server",
- lang.language_servers.keys().next().and_then(|ls_name| {
+ lang.language_servers.first().and_then(|ls| {
syn_loader_conf
.language_server
- .get(ls_name)
+ .get(&ls.name)
.map(|config| config.command.clone())
}),
)?;