Merge pull request #1559 from zed-industries/language-injection
Add language injection support
This commit is contained in:
commit
d4bbf21650
16 changed files with 2513 additions and 412 deletions
|
@ -2067,6 +2067,7 @@ impl Project {
|
|||
let full_path = buffer.read(cx).file()?.full_path(cx);
|
||||
let language = self.languages.select_language(&full_path)?;
|
||||
buffer.update(cx, |buffer, cx| {
|
||||
buffer.set_language_registry(self.languages.clone());
|
||||
buffer.set_language(Some(language.clone()), cx);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue