Reload grammars in extensions when they are updated on disk (#7531)
Release Notes: - N/A --------- Co-authored-by: Marshall Bowers <elliott.codes@gmail.com> Co-authored-by: Marshall <marshall@zed.dev>
This commit is contained in:
co-authored by
Marshall Bowers
Marshall
parent
f2a4dbaf7f
commit
7b03e977e4
@@ -758,6 +758,7 @@ impl Buffer {
|
||||
|
||||
/// Assign a language to the buffer.
|
||||
pub fn set_language(&mut self, language: Option<Arc<Language>>, cx: &mut ModelContext<Self>) {
|
||||
self.parse_count += 1;
|
||||
self.syntax_map.lock().clear();
|
||||
self.language = language;
|
||||
self.reparse(cx);
|
||||
|
||||
Reference in New Issue
Block a user