Attempt to assign a language when a new buffer is saved

This commit is contained in:
Nathan Sobo
2021-09-18 11:46:22 -07:00
parent cab577406d
commit af99d0ef42
3 changed files with 24 additions and 1 deletions
+7
View File
@@ -268,6 +268,13 @@ impl Worktree {
}
}
pub fn languages(&self) -> &Arc<LanguageRegistry> {
match self {
Worktree::Local(worktree) => &worktree.languages,
Worktree::Remote(worktree) => &worktree.languages,
}
}
pub fn snapshot(&self) -> Snapshot {
match self {
Worktree::Local(worktree) => worktree.snapshot(),