diff options
Diffstat (limited to 'support/texlab/crates/base-db/src/document.rs')
-rw-r--r-- | support/texlab/crates/base-db/src/document.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/support/texlab/crates/base-db/src/document.rs b/support/texlab/crates/base-db/src/document.rs index 25607a1bf5..7a388129fd 100644 --- a/support/texlab/crates/base-db/src/document.rs +++ b/support/texlab/crates/base-db/src/document.rs @@ -77,7 +77,12 @@ impl Document { } Language::Root => DocumentData::Root, Language::Latexmkrc => { - let data = parser::parse_latexmkrc(&text).unwrap_or_default(); + let data = path + .as_deref() + .and_then(|path| path.parent()) + .and_then(|dir| parser::parse_latexmkrc(&text, dir).ok()) + .unwrap_or_default(); + DocumentData::Latexmkrc(data) } Language::Tectonic => DocumentData::Tectonic, |