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:
parent
f2a4dbaf7f
commit
7b03e977e4
6 changed files with 111 additions and 57 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue