From 387961768f65ec00d171b3781d4b87ea94bb19f5 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 5 Jan 2024 03:02:50 +0000 Subject: CTAN sync 202401050302 --- support/texlab/CHANGELOG.md | 7 +++++++ support/texlab/Cargo.lock | 2 +- support/texlab/crates/base-db/src/graph.rs | 6 ++++++ support/texlab/crates/parser/src/config.rs | 2 ++ support/texlab/crates/syntax/src/bibtex/kind.rs | 2 -- support/texlab/crates/texlab/Cargo.toml | 2 +- support/texlab/crates/texlab/src/server/options.rs | 1 + support/texlab/texlab.1 | 4 ++-- support/texlab/texlab.pdf | Bin 26374 -> 26383 bytes 9 files changed, 20 insertions(+), 6 deletions(-) (limited to 'support/texlab') diff --git a/support/texlab/CHANGELOG.md b/support/texlab/CHANGELOG.md index a8bae12b05..f2eb115b20 100644 --- a/support/texlab/CHANGELOG.md +++ b/support/texlab/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [5.12.1] - 2024-01-04 + +### Fixed + +- Avoid trying to parse most of the TeX distro when building the dependency graph. Add `texlab.experimental.followPackageLinks` setting to allow re-enabling the old behavior + ([#986](https://github.com/latex-lsp/texlab/issues/986)) + ## [5.12.0] - 2023-12-03 ### Added diff --git a/support/texlab/Cargo.lock b/support/texlab/Cargo.lock index 347193badd..be53fc7b1e 100644 --- a/support/texlab/Cargo.lock +++ b/support/texlab/Cargo.lock @@ -1500,7 +1500,7 @@ dependencies = [ [[package]] name = "texlab" -version = "5.12.0" +version = "5.12.1" dependencies = [ "anyhow", "base-db", 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, pub enum_environments: FxHashSet, pub verbatim_environments: FxHashSet, @@ -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 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, pub enum_environments: Vec, pub verbatim_environments: Vec, diff --git a/support/texlab/texlab.1 b/support/texlab/texlab.1 index 18919ec9a3..a602e6aa16 100644 --- a/support/texlab/texlab.1 +++ b/support/texlab/texlab.1 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13. -.TH TEXLAB "1" "December 2023" "texlab 5.12.0" "User Commands" +.TH TEXLAB "1" "January 2024" "texlab 5.12.1" "User Commands" .SH NAME -texlab \- manual page for texlab 5.12.0 +texlab \- manual page for texlab 5.12.1 .SH SYNOPSIS .B texlab [\fI\,OPTIONS\/\fR] diff --git a/support/texlab/texlab.pdf b/support/texlab/texlab.pdf index ac225c8f02..00007f6652 100644 Binary files a/support/texlab/texlab.pdf and b/support/texlab/texlab.pdf differ -- cgit v1.2.3