mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 17:36:19 +04:00
Only call scopes.load() once
This commit is contained in:
parent
4b0205f690
commit
24314bd844
@ -462,12 +462,11 @@ pub fn update(
|
||||
let mut queue = VecDeque::new();
|
||||
queue.push_back(self.root);
|
||||
|
||||
let scopes = self.loader.scopes.load();
|
||||
let injection_callback = |language: &str| {
|
||||
self.loader
|
||||
.language_configuration_for_injection_string(language)
|
||||
.and_then(|language_config| {
|
||||
language_config.highlight_config(&self.loader.scopes.load())
|
||||
})
|
||||
.and_then(|language_config| language_config.highlight_config(&scopes))
|
||||
};
|
||||
|
||||
// Convert the changeset into tree sitter edits.
|
||||
|
Loading…
Reference in New Issue
Block a user