diff options
author | kyfanc | 2024-02-13 10:58:53 +0000 |
---|---|---|
committer | GitHub | 2024-02-13 10:58:53 +0000 |
commit | fe869e5dc7a8cd6c2c2e3945816bd890956eef3a (patch) | |
tree | ad0b899b482df976caf3cc2f079dc7d0d8a3769f /helix-term/src/ui/mod.rs | |
parent | 7934ac77143e69068420556b043dde035255340b (diff) |
fix lsp config reload (#9415)
`syn_loader` was replaced rather than interior value being replace,
old value was still being referenced and not updated after `:config-refresh`.
By using `ArcSwap` like for `config`, each `.load()` call will return the most
updated value.
Co-authored-by: kyfan <kyfan@email>
Diffstat (limited to 'helix-term/src/ui/mod.rs')
-rw-r--r-- | helix-term/src/ui/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs index efa2473e..d27e8355 100644 --- a/helix-term/src/ui/mod.rs +++ b/helix-term/src/ui/mod.rs @@ -336,8 +336,8 @@ pub mod completers { pub fn language(editor: &Editor, input: &str) -> Vec<Completion> { let text: String = "text".into(); - let language_ids = editor - .syn_loader + let loader = editor.syn_loader.load(); + let language_ids = loader .language_configs() .map(|config| &config.language_id) .chain(std::iter::once(&text)); |