summaryrefslogtreecommitdiff
path: root/support/texlab/crates
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-01-05 03:02:50 +0000
committerNorbert Preining <norbert@preining.info>2024-01-05 03:02:50 +0000
commit387961768f65ec00d171b3781d4b87ea94bb19f5 (patch)
treeb3280b963f8e2b3d3f9f0b1f940912069d6f27c9 /support/texlab/crates
parentc45a0e15a3f74b963e3c2be142de33c8c8f12588 (diff)
CTAN sync 202401050302
Diffstat (limited to 'support/texlab/crates')
-rw-r--r--support/texlab/crates/base-db/src/graph.rs6
-rw-r--r--support/texlab/crates/parser/src/config.rs2
-rw-r--r--support/texlab/crates/syntax/src/bibtex/kind.rs2
-rw-r--r--support/texlab/crates/texlab/Cargo.toml2
-rw-r--r--support/texlab/crates/texlab/src/server/options.rs1
5 files changed, 10 insertions, 3 deletions
diff --git a/support/texlab/crates/base-db/src/graph.rs b/support/texlab/crates/base-db/src/graph.rs
index 088e0828b7..2148c7e269 100644
--- a/support/texlab/crates/base-db/src/graph.rs
+++ b/support/texlab/crates/base-db/src/graph.rs
@@ -76,6 +76,12 @@ impl<'a> Graph<'a> {
return;
};
+ let uri = source.uri.as_str();
+ let is_pkg = uri.ends_with(".sty") || uri.ends_with(".cls");
+ if is_pkg && !self.workspace.config().syntax.follow_package_links {
+ return;
+ }
+
for link in &data.semantics.links {
self.add_link(source, base_dir, link);
}
diff --git a/support/texlab/crates/parser/src/config.rs b/support/texlab/crates/parser/src/config.rs
index d2e0fb31ab..3a2e9e3e93 100644
--- a/support/texlab/crates/parser/src/config.rs
+++ b/support/texlab/crates/parser/src/config.rs
@@ -2,6 +2,7 @@ use rustc_hash::FxHashSet;
#[derive(Debug)]
pub struct SyntaxConfig {
+ pub follow_package_links: bool,
pub math_environments: FxHashSet<String>,
pub enum_environments: FxHashSet<String>,
pub verbatim_environments: FxHashSet<String>,
@@ -31,6 +32,7 @@ impl Default for SyntaxConfig {
.collect();
Self {
+ follow_package_links: false,
math_environments,
enum_environments,
verbatim_environments,
diff --git a/support/texlab/crates/syntax/src/bibtex/kind.rs b/support/texlab/crates/syntax/src/bibtex/kind.rs
index 7817f47495..0e8f8dabce 100644
--- a/support/texlab/crates/syntax/src/bibtex/kind.rs
+++ b/support/texlab/crates/syntax/src/bibtex/kind.rs
@@ -34,8 +34,6 @@ pub enum SyntaxKind {
ROOT,
}
-pub use SyntaxKind::*;
-
impl From<SyntaxKind> for rowan::SyntaxKind {
fn from(kind: SyntaxKind) -> Self {
Self(kind as u16)
diff --git a/support/texlab/crates/texlab/Cargo.toml b/support/texlab/crates/texlab/Cargo.toml
index 099e0cc8c7..45f6e6b418 100644
--- a/support/texlab/crates/texlab/Cargo.toml
+++ b/support/texlab/crates/texlab/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "texlab"
description = "LaTeX Language Server"
-version = "5.12.0"
+version = "5.12.1"
license.workspace = true
readme = "README.md"
authors.workspace = true
diff --git a/support/texlab/crates/texlab/src/server/options.rs b/support/texlab/crates/texlab/src/server/options.rs
index 3828745257..c718e49c16 100644
--- a/support/texlab/crates/texlab/src/server/options.rs
+++ b/support/texlab/crates/texlab/src/server/options.rs
@@ -124,6 +124,7 @@ pub struct RegexPattern(#[serde(with = "serde_regex")] pub Regex);
#[serde(rename_all = "camelCase")]
#[serde(default)]
pub struct ExperimentalOptions {
+ pub follow_package_links: bool,
pub math_environments: Vec<String>,
pub enum_environments: Vec<String>,
pub verbatim_environments: Vec<String>,