@@ -172,19 +172,18 @@ impl LanguageConfiguration {
172172 }
173173 }
174174
175− pub fn highlight_config(&self, scopes: &[String]) -> Option<Arc<HighlightConfiguration>> {
176− if let Some(config) = self.highlight_config.get() {
177− if let Some(config) = config {
178− config.configure(scopes);
179− }
180− config.clone()
181− } else {
182− self.highlight_config
183− .get_or_init(|| self.initialize_highlight(scopes))
184− .clone()
175+ pub fn reconfigure(&self, scopes: &[String]) {
176+ if let Some(Some(config)) = self.highlight_config.get() {
177+ config.configure(scopes);
185178 }
186179 }
187180
181+ pub fn highlight_config(&self, scopes: &[String]) -> Option<Arc<HighlightConfiguration>> {
182+ self.highlight_config
183+ .get_or_init(|| self.initialize_highlight(scopes))
184+ .clone()
185+ }
186+
188187 pub fn is_highlight_initialized(&self) -> bool {
189188 self.highlight_config.get().is_some()
190189 }