diff options
author | Norbert Preining <norbert@preining.info> | 2023-01-22 03:01:36 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-01-22 03:01:36 +0000 |
commit | 328cc6eb536476a95a84cd7de863b32cabc41b0e (patch) | |
tree | 6ce563a6c5075adedee625e648ab6e1fd86a0052 /support/texlab/src/db/discovery.rs | |
parent | 94c0d48361932b4beca57cc5609d26a46270dfeb (diff) |
CTAN sync 202301220301
Diffstat (limited to 'support/texlab/src/db/discovery.rs')
-rw-r--r-- | support/texlab/src/db/discovery.rs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/support/texlab/src/db/discovery.rs b/support/texlab/src/db/discovery.rs index 0e1ec314f7..5986fcd888 100644 --- a/support/texlab/src/db/discovery.rs +++ b/support/texlab/src/db/discovery.rs @@ -226,12 +226,16 @@ fn discover_parents(db: &mut dyn Db, workspace: Workspace) -> bool { .flatten() .filter(|entry| entry.file_type().map_or(false, |ty| ty.is_file())) .map(|entry| entry.path()) - .filter(|path| Language::from_path(&path) == Some(Language::Tex)) { - if workspace.lookup_path(db, &path).is_none() { - changed |= workspace - .load(db, &path, Language::Tex, Owner::Server) - .is_some(); + if let Some(language) = Language::from_path(&path) { + let can_be_parent = matches!( + language, + Language::Tex | Language::TexlabRoot | Language::Tectonic + ); + + if can_be_parent && workspace.lookup_path(db, &path).is_none() { + changed |= workspace.load(db, &path, language, Owner::Server).is_some(); + } } } |