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:
Max Brunsfeld
2024-02-07 16:39:11 -08:00
committed by GitHub
co-authored by Marshall Bowers Marshall
parent f2a4dbaf7f
commit 7b03e977e4
6 changed files with 111 additions and 57 deletions
+4
View File
@@ -8772,6 +8772,10 @@ impl Editor {
cx.emit(EditorEvent::ExcerptsRemoved { ids: ids.clone() })
}
multi_buffer::Event::Reparsed => cx.emit(EditorEvent::Reparsed),
multi_buffer::Event::LanguageChanged => {
cx.emit(EditorEvent::Reparsed);
cx.notify();
}
multi_buffer::Event::DirtyChanged => cx.emit(EditorEvent::DirtyChanged),
multi_buffer::Event::Saved => cx.emit(EditorEvent::Saved),
multi_buffer::Event::FileHandleChanged | multi_buffer::Event::Reloaded => {