pax_global_header00006660000000000000000000000064151022111320014476gustar00rootroot0000000000000052 comment=5a7c553eb3ed0db6bbd136cbd189300bf15c946f texlab-5.24.0/000077500000000000000000000000001510221113200130455ustar00rootroot00000000000000texlab-5.24.0/CHANGELOG.md000066400000000000000000001276751510221113200147000ustar00rootroot00000000000000# Changelog 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.24.0] - 2025-11-03 ### Added - Add `texlab.hover.symbols` setting to allow turning off image preview for symbol-like commands ([#1420](https://github.com/latex-lsp/texlab/issues/1420)) - Add command definitions to document and workspace symbols ([#1440](https://github.com/latex-lsp/texlab/issues/1440)) - Add `texlab.experimental.glossaryReferenceCommands` setting ([#1475](https://github.com/latex-lsp/texlab/pull/1475)) ### Fixed - Treat `\includefrom` as `\include`-like command ([#1465](https://github.com/latex-lsp/texlab/pull/1465)) ## [5.23.1] - 2025-06-24 ### Fixed - Make sort order of workspace symbols deterministic ([#1421](https://github.com/latex-lsp/texlab/issues/1421)) - Parse command definitions without curly braces correctly, e. g. `\newcommand\foo{bar}` ([#1409](https://github.com/latex-lsp/texlab/issues/1409)) ## [5.23.0] - 2025-06-14 ### Added - Add `--line0`, `--line1` arguments to the `texlab inverse-search` command ([#1365](https://github.com/latex-lsp/texlab/issues/1365)) - Extract the context provided by latexmkrc to infer additions to TEXINPUTS and BIBINPUTS ([#1369](https://github.com/latex-lsp/texlab/issues/1369)) - Add support for `latexmk v4.86` ([#1410](https://github.com/latex-lsp/texlab/pull/1410)) - Recognize wide float environment in label parsing ([#1404](https://github.com/latex-lsp/texlab/pull/1404)) - Treat `\gdef`, `\edef`, `\xdef` and `\glet` as command definitions ([#1402](https://github.com/latex-lsp/texlab/pull/1402)) - Add support for multi-word filtering in workspace symbols ([#1396](https://github.com/latex-lsp/texlab/pull/1396)) - Add support for matching incomplete keywords in workspace symbol filtering ([#1396](https://github.com/latex-lsp/texlab/pull/1396)) - Add an experimental capability for `textDocument/build` and `textDocument/forwardSearch` ([#1328](https://github.com/latex-lsp/texlab/issues/1328)) - Allow disabling warnings using `% texlab: warnings off` and `% texlab: warnings on` ([#1327](https://github.com/latex-lsp/texlab/issues/1327)) ### Fixed - Regenerate diagnostics after loading the TeX distribution ([#1376](https://github.com/latex-lsp/texlab/issues/1376)) - Improve handling of nested curly braces in command parsing ([#1360](https://github.com/latex-lsp/texlab/issues/1360)) - Don't panic if the server receives a completion request with an invalid position ([#1367](https://github.com/latex-lsp/texlab/pull/1367)) - Only return `LocationLink[]` in `textDocument/definition` if the client supports it ([#1399](https://github.com/latex-lsp/texlab/issues/1399)) ## [5.22.1] - 2025-01-29 ### Security - Don't store IPC socket (`texlab.sock`) in temp directory (see [CWE-379](https://cwe.mitre.org/data/definitions/379.html), [#1331](https://github.com/latex-lsp/texlab/pull/1331/)) ## [5.22.0] - 2025-01-26 ### Added - Allow hovering over symbol-like commands (e. g. `\pi`) to show a unicode preview or a preview image if the client supports it ([#1261](https://github.com/latex-lsp/texlab/issues/1261)) - Add `texlab.symbols.customEnvironments` setting for specifying additional environments that will be included in the document symbols ([#1292](https://github.com/latex-lsp/texlab/issues/1292)) - Add `texlab.experimental.labelReferenceRangeCommands` setting ([#1210](https://github.com/latex-lsp/texlab/issues/1210)) - Add `tex-fmt` as a formatter for `latex` and `bibtex` ([#1320](https://github.com/latex-lsp/texlab/issues/1320)) ### Fixed - Fix parsing links with URL encoding ([#1279](https://github.com/latex-lsp/texlab/issues/1279)) - Improve error message when `texlab.build.executable` does not exist ([#1303](https://github.com/latex-lsp/texlab/issues/1303)) ## [5.21.0] - 2024-10-26 ### Added - Support starred variants in "Go to References" ([#1234](https://github.com/latex-lsp/texlab/issues/1234)) - Add `texlab.latexindent.replacement` setting to allow passing a replacement flag to `latexindent` ([#1222](https://github.com/latex-lsp/texlab/issues/1222)) - Don't require a label to show section numbers for document symbols ([#910](https://github.com/latex-lsp/texlab/issues/910)) - Support navigating to files that are part of the `TEXINPUTS` similar to `BIBINPUTS` ([#1228](https://github.com/latex-lsp/texlab/discussions/1228)) ### Fixed - Fix opening `untitled` documents ([#1242](https://github.com/latex-lsp/texlab/issues/1242)) - Handle `\bibitem` when checking for undefined references ([#1171](https://github.com/latex-lsp/texlab/issues/1171)) - Fix false-positive syntax error when using a command inside a `\label` ([#879](https://github.com/latex-lsp/texlab/issues/879)) ## [5.20.0] - 2024-10-08 ### Added - Add `texlab.inlayHints.maxLength` setting to allow limiting inlay hint text length ([#1212](https://github.com/latex-lsp/texlab/issues/1212)) - Allow suppressing diagnostics using `% texlab: ignore` magic comments ([#1211](https://github.com/latex-lsp/texlab/pull/1211)) ### Fixed - Fix enabling `texlab.build.useFileList` setting - Make "Goto Definition" work correctly with starred commands ([#1197](https://github.com/latex-lsp/texlab/issues/1197)) ## [5.19.0] - 2024-07-08 ### Added - Add `texlab.build.useFileList` setting to allow controlling whether to use the `.fls` files ### Changed - Disable using `.fls` files for project detection by default ## [5.18.0] - 2024-07-06 ### Added - Parse `.fls` files to make the project detection more reliable ([#1145](https://github.com/latex-lsp/texlab/issues/1145)) ### Fixed - Fix parsing commands with unicode characters inside BibTeX entries ([#1147](https://github.com/latex-lsp/texlab/issues/1147)) - Improve detection of included files when non-ASCII characters are used ([#923](https://github.com/latex-lsp/texlab/issues/923)) - Fix resolving includes starting from files included using `\subimport` ([#1145](https://github.com/latex-lsp/texlab/issues/1145)) ## [5.17.0] - 2024-06-23 ### Added - Add label commands from `zref` and `zref-clever` to the list of default label commands ([#1140](https://github.com/latex-lsp/texlab/pull/1140)) - Add `texlab.experimental.labelDefinitionPrefixes` and `texlab.experimental.labelReferencePrefixes` options ([#1139](https://github.com/latex-lsp/texlab/pull/1139)) ## [5.16.1] - 2024-05-25 ### Fixed - Don't treat `\label{}` and `\ref{}` with macro parameter as label commands ([#1119](https://github.com/latex-lsp/texlab/issues/1119)) - Fix parsing `latexmkrc` for `latexmk` versions older than `v4.8.4` ([#1128](https://github.com/latex-lsp/texlab/issues/1128)) - Remove unused `texlab.rootDirectory` setting from documentation ## [5.16.0] - 2024-05-01 ### Added - Add `texlab.experimental.labelDefinitionCommands` setting to customize the list of `\label`-like commands ([#1093](https://github.com/latex-lsp/texlab/issues/1093)) - Extend list of commands treated as command definitions and environment definitions ([#1087](https://github.com/latex-lsp/texlab/pull/1087)) - Allow the server to trigger the forward search in an editor-agnostic way: Running `texlab inverse-search --input --line ` will open the specified document in the editor if the client supports it ([#1091](https://github.com/latex-lsp/texlab/issues/1091)) ### Fixed - Fix detection of log dir when using `latexmkrc` (use `$aux_dir` instead of `$out_dir`) ([#1079](https://github.com/latex-lsp/texlab/pull/1079)) - Fix extracting `$aux_dir` and `$out_dir` from `latexmkrc` ([#1079](https://github.com/latex-lsp/texlab/pull/1079)) - Add support for extracting `$aux_dir` and `$out_dir` from `latexmk >= v4.85` (([#1079](https://github.com/latex-lsp/texlab/pull/1079))) - Improve log file change detection under Windows - Cleanup diagnostics of deleted files - Let `\declaretheorem` accept a list of environment names instead of just a single name ([#1075](https://github.com/latex-lsp/texlab/issues/1075)) - Use configured directories if not set explicitly by `latexmkrc` file ([#1095](https://github.com/latex-lsp/texlab/issues/1095)) ## [5.15.0] - 2024-04-21 ### Added - Replace tilde (`~`), environment variables, `${userHome}`, `${workspaceFolder}` in options - Replace tidle (`~`) and environment variables in `\include`-like commands - Add "Go To Definition" support for user-defined commands with `\def` and `\let` ([#1081](https://github.com/latex-lsp/texlab/issues/1081)) - Add "Find all References" for commands ([#1082](https://github.com/latex-lsp/texlab/issues/1082)) - Support more macros for defining commands ([#1083](https://github.com/latex-lsp/texlab/issues/1083)) ### Fixed - Avoid panicking when malformed URIs are sent to the server ([#1078](https://github.com/latex-lsp/texlab/issues/1078)) - Don't report errors for citations with macro arguments ([#1080](https://github.com/latex-lsp/texlab/issues/1080)) ## [5.14.1] - 2024-03-27 ### Fixed - Fix parsing `\label` with options (for example, when using `cleverref`) ([#1056](https://github.com/latex-lsp/texlab/issues/1056)) - Fix detecting project root if the home directory contains a `.latexmkrc` file ([#1061](https://github.com/latex-lsp/texlab/issues/1061)) ## [5.14.0] - 2024-03-24 ### Added - Improve support for handling `Tectonic.toml` projects ([#1014](https://github.com/latex-lsp/texlab/issues/1014)) - Cache results of project detection to improve performance - Triggering completion inside `\label{...}` will suggest undefined labels ([#1046](https://github.com/latex-lsp/texlab/issues/1046)) - Add snippets for `\( ... \)`, `\[ ... \]` and `\{ ... \}` ([#1010](https://github.com/latex-lsp/texlab/issues/1010)) ### Fixed - Don't return document symbol with empty name if `\item[]` is encountered ([#1040](https://github.com/latex-lsp/texlab/issues/1040)) - Fix extracting label numbers inside theorems defined by `ntheorem` package ([#1053](https://github.com/latex-lsp/texlab/issues/1053)) ## [5.13.1] - 2024-03-16 ### Fixed - Fix clearing stale diagnostics reported by the server ([#1042](https://github.com/latex-lsp/texlab/issues/1042)) - Speed up reading bibliographies with many string definitions ([#1039](https://github.com/latex-lsp/texlab/pull/1039)) ## [5.13.0] - 2024-03-10 ### Added - Add experimental `texlab.experimental.labelReferenceCommands` setting to customize the list of `\ref`-like commands ([#1032](https://github.com/latex-lsp/texlab/issues/1032)) ### Fixed - Don't report diagnostics for files that are part of the TeX distro ([#1028](https://github.com/latex-lsp/texlab/issues/1028)) ## [5.12.4] - 2024-02-22 ### Fixed - When `workspace/didChangeConfiguration` contains the configuration of multiple LSP servers, `texlab` will try to extract the `texlab` configuration instead of falling back to the default settings ([#1003](https://github.com/latex-lsp/texlab/issues/1003)) - Keep filtering completion lists server-side if prefix matcher is set ([#1003](https://github.com/latex-lsp/texlab/issues/1003)) - Allow brackets and parentheses in label names and similar constructs ([#1016](https://github.com/latex-lsp/texlab/issues/1016)) ## [5.12.3] - 2024-01-27 ### Fixed - Fix completing includes in conjunction with `\graphicspath` ([#997](https://github.com/latex-lsp/texlab/issues/997)) ## [5.12.2] - 2024-01-20 ### Fixed - Fix parsing commands when they are used with subscript ([#990](https://github.com/latex-lsp/texlab/issues/990)) - Don't append a newline each time a BibTeX document is being formatted ([#996](https://github.com/latex-lsp/texlab/issues/996)) ## [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 - Infer `texlab.build.auxDirectory`, `texlab.build.logDirectory` and `texlab.build.pdfDirectory` from `latexmkrc` if available ([#907](https://github.com/latex-lsp/texlab/issues/907)) ### Fixed - Do not report `undefined reference` errors when using `\nocite{*}` ([#964](https://github.com/latex-lsp/texlab/issues/964)) - Fix potential crash when parsing build log files ([#973](https://github.com/latex-lsp/texlab/issues/973)) - Set the final tab stop of the `\begin` snippet inside the environment ([#963](https://github.com/latex-lsp/texlab/issues/963)) ## [5.11.0] - 2023-11-05 ### Added - Add `texlab.inlayHints.labelDefinitions` and `texlab.inlayHints.labelReferences` options ([#753](https://github.com/latex-lsp/texlab/issues/753)) - Display inlay hints for label references by default ([#753](https://github.com/latex-lsp/texlab/issues/753)) ### Fixed - Moving the build logs to the recycle bin will now clear the diagnostics ([texlab-vscode/#825](https://github.com/latex-lsp/texlab-vscode/issues/825)) - Fix false positive when reporting syntax errors for BibTeX accents ([#945](https://github.com/latex-lsp/texlab/issues/945)) ## [5.10.1] - 2023-10-10 ### Fixed - Fix regression when renaming commands ([#936](https://github.com/latex-lsp/texlab/issues/936)) ## [5.10.0] - 2023-09-30 ### Added - Allow passing additional arguments to `ChkTeX` using `texlab.chktex.additionalArgs` ([#927](https://github.com/latex-lsp/texlab/issues/927)) ### Fixed - Fix loading bibliographies from `kpathsea` search path ([#923](https://github.com/latex-lsp/texlab/issues/923)) - Don't report duplicate results when using goto definition on includes ([#924](https://github.com/latex-lsp/texlab/issues/924)) - Fix project detection when there exist files with the same name ([#923](https://github.com/latex-lsp/texlab/issues/923)) - Do not report parse errors with `$` in paths ([#931](https://github.com/latex-lsp/texlab/issues/931)) ## [5.9.2] - 2023-08-14 ### Fixed - Don't crash when using comments inside `\include`-like commands ([#919](https://github.com/latex-lsp/texlab/issues/919)) - Folding ranges include only the contents instead of the entire range of the structure. For example, the folding range of an environment will start after the `\begin` and stop before the `\end` ([#915](https://github.com/latex-lsp/texlab/issues/915)) ## [5.9.1] - 2023-08-11 ### Fixed - Improve performance when completing BibTeX entries ([#493](https://github.com/latex-lsp/texlab/issues/493)) - Don't report unused entries for very large bibliographies - Avoid redundant reparses after saving documents ## [5.9.0] - 2023-08-06 ### Added - Use bibliographies found in `BIBINPUTS` environment variable ([#493](https://github.com/latex-lsp/texlab/issues/493)) - Add `texlab.build.pdfDirectory` setting ([#911](https://github.com/latex-lsp/texlab/issues/911)) ### Fixed - Fix search path for aux files when using `\include` instead of `\input` ([#906](https://github.com/latex-lsp/texlab/issues/906)) ## [5.8.0] - 2023-07-30 ### Added - Report diagnostics for unused and undefined labels - Report diagnostics for unused BibTeX entries and undefined citations - Report diagnostics for duplicate BibTeX entries - Report diagnostics for duplicate labels - Add `texlab.build.auxDirectory` and `texlab.build.logDirectory` settings ([#906](https://github.com/latex-lsp/texlab/issues/906)) ### Deprecated - Deprecate `texlab.auxDirectory` in favor of `texlab.build.auxDirectory` ### Fixed - Fix parsing paths with `|` ([#568](https://github.com/latex-lsp/texlab/issues/568)) - Fix parsing LaTeX identifiers with `=` ([#568](https://github.com/latex-lsp/texlab/issues/568)) ## [5.7.0] - 2023-06-07 ### Added - Add symbol support for `thmtools` package ([#894](https://github.com/latex-lsp/texlab/issues/894)) - Add `texlab.findEnvironments` command to return the list of environments containing a position ([#892](https://github.com/latex-lsp/texlab/issues/892)) ### Changed - Show inlay hints for labels after the command instead of inside the argument ([#890](https://github.com/latex-lsp/texlab/issues/890)) ### Fixed - Prevent adding trailing newline after formatting with `latexmk` ([#895](https://github.com/latex-lsp/texlab/issues/895)) - Improving `\paragraph` parsing ## [5.6.0] - 2023-05-20 ### Added - Add `texlab.cancelBuild` command to cancel the currently active build ([#887](https://github.com/latex-lsp/texlab/issues/887)) ### Fixed - Fix resolving include commands from the `import` package ([#885](https://github.com/latex-lsp/texlab/issues/885)) - Fix regression when tracking active cursor position ([#880](https://github.com/latex-lsp/texlab/issues/880)) ## [5.5.1] - 2023-05-06 ### Fixed - Fix spurious completion results when completing environments ([#883](https://github.com/latex-lsp/texlab/issues/883)) - Fix regression when guessing cursor position after formatting ([#880](https://github.com/latex-lsp/texlab/issues/880)) - Fix parsing `\verb` command ([#828](https://github.com/latex-lsp/texlab/issues/828)) - Add `flalign` and `flalign*` to default list of math environments ([#884](https://github.com/latex-lsp/texlab/issues/884)) ## [5.5.0] - 2023-04-16 ### Added - Allow optionally passing cursor position to `textDocument/build` request for use in forward search after building. Previously, the server had to guess the cursor position ([#475](https://github.com/latex-lsp/texlab/issues/475)) - Add experimental `texlab.experimental.citationCommands` setting to allow extending the list of citation commands ([#832](https://github.com/latex-lsp/texlab/issues/832)) - Add support for escaping placeholders in build arguments similar to forward search - Allow configuring completion matching algorithm ([#872](https://github.com/latex-lsp/texlab/issues/872)) ### Fixed - Fix regression introduced in `v5.4.2` involving `texlab.cleanArtifacts` command. ## [5.4.2] - 2023-04-11 ### Fixed - Fix memory leak when editing documents over a long time ([#856](https://github.com/latex-lsp/texlab/issues/856)) - Fix parsing parentheses in file paths ([#874](https://github.com/latex-lsp/texlab/issues/874)) ## [5.4.1] - 2023-03-26 ### Fixed - Do not return symbols with empty names (e. g. sections without name) ([#870](https://github.com/latex-lsp/texlab/issues/870)) - Repair `textDocument/formatting` request ([#871](https://github.com/latex-lsp/texlab/issues/871)) ## [5.4.0] - 2023-03-12 ### Added - Add experimental settings to allow extending the list of special environments: - `texlab.experimental.mathEnvironments` - `texlab.experimental.enumEnvironments` - `texlab.experimental.verbatimEnvironments` - Add `texlab.changeEnvironment` workspace command ([#849](https://github.com/latex-lsp/texlab/issues/849)) - Add `texlab.showDependencyGraph` workspace command ### Changed - Do not show caption or section names in label inlay hints ([#858](https://github.com/latex-lsp/texlab/issues/858)) - Include more user-defined commands in command completion ### Fixed - Parse nested `\iffalse` blocks correctly ([#853](https://github.com/latex-lsp/texlab/issues/853)) - Parse commands with multi-byte characters correctly ([#857](https://github.com/latex-lsp/texlab/issues/857)) - Fix checking whether a document can be a root file ## [5.3.0] - 2023-02-25 ### Added - Allow filtering `textDocument/documentSymbols` using regular expressions specified via `texlab.symbols.allowedPatterns` and `texlab.symbols.ignoredPatterns` ([#851](https://github.com/latex-lsp/texlab/issues/851)) ### Fixed - Do not use percent-encoded path when searching for PDF files during forward search ([#848](https://github.com/latex-lsp/texlab/issues/848)) - Always return an empty list of code actions instead of returning "method not found" ([#850](https://github.com/latex-lsp/texlab/issues/850)) ## [5.2.0] - 2023-01-29 ### Added - Include line numbers in build warnings when available ([#840](https://github.com/latex-lsp/texlab/issues/840)) - Add `none` formatter to `texlab.latexFormatter` and `texlab.bibtexFormatter` options to allow disabling formatting ([#846](https://github.com/latex-lsp/texlab/issues/846)) ### Fixed - Concatenate more than two lines of maximum length in build diagnostics ([#842](https://github.com/latex-lsp/texlab/pull/842)) - Apply the correct range of references to labels when renaming ([#841](https://github.com/latex-lsp/texlab/issues/841)) - Use `document` environment to detect root file instead of `\documentclass` ([#845](https://github.com/latex-lsp/texlab/issues/845)) ## [5.1.0] - 2023-01-21 ### Added - Allow manually overriding the root directory using a `texlabroot`/`.texlabroot` marker file. See the wiki for more information. ([#826](https://github.com/latex-lsp/texlab/issues/826), [#838](https://github.com/latex-lsp/texlab/pull/838)) ### Deprecated - Deprecate `texlab.rootDirectory` setting in favor of `.texlabroot` files ### Fixed - Do not use `.git`, `.chktexrc`, `.latexmkrc` files/directories to determine the root directory ([#826](https://github.com/latex-lsp/texlab/issues/826)) - Fix building documents without an explicit root directory ([#837](https://github.com/latex-lsp/texlab/issues/837)) ## [5.0.0] - 2022-12-29 ### Changed - _BREAKING_: `texlab.rootDirectory` is now used as the folder path from which the compiler is executed relative to the main document. By default it is equal to `"."`. For more information, please visit the wiki. - Improve performance of completion by a huge margin due to a faster filtering method used internally - Do not discover project files beyond the provided workspace folders - Try to guess the root directory by checking for files such as `.latexmkrc` or `Tectonic.toml` if `texlab.rootDirectory` is not set ### Fixed - Update positions of reported build diagnostics when editing the affected line - Do not treat links to files as bidirectional by default. This prevents issues where `texlab` ends up compiling the wrong file in projects with shared files ([#806](https://github.com/latex-lsp/texlab/issues/806), [#757](https://github.com/latex-lsp/texlab/issues/757), [#679](https://github.com/latex-lsp/texlab/issues/679)) - Fix coverage of directories which need to be watched for changes ([#502](https://github.com/latex-lsp/texlab/issues/502), [#491](https://github.com/latex-lsp/texlab/issues/491)) - Resolve links of the `import` package correctly - Use `filterText` of completion items when filtering internally ([#829](https://github.com/latex-lsp/texlab/issues/829)) ## [4.3.2] - 2022-11-20 ### Fixed - Do not try to run the TeX engine on package files and fail the build instead ([#801](https://github.com/latex-lsp/texlab/issues/801)) - Handle URIs with URL-encoded drive letters on Windows ([#802](https://github.com/latex-lsp/texlab/issues/802)) - Parse BibTeX entries with unbalanced quotes correctly ([#809](https://github.com/latex-lsp/texlab/issues/809)) - Provide completion for more acronym commands ([#813](https://github.com/latex-lsp/texlab/issues/813)) - Fix parsing acronym definitions ([#813](https://github.com/latex-lsp/texlab/issues/813)) ## [4.3.1] - 2022-10-22 ### Fixed - Do not crash with a stack overflow when trying to load packages with many internal dependencies ([#793](https://github.com/latex-lsp/texlab/issues/793)) - Normalize drive letters of all document URIs - Fix parsing commands that take file paths as arguments ([#789](https://github.com/latex-lsp/texlab/issues/789)) - Use the correct working directory and command line arguments when calling `latexindent` ([#645](https://github.com/latex-lsp/texlab/issues/645)) - Fix publishing to CTAN ## [4.3.0] - 2022-09-25 ### Added - Add inlay hints for `\label{...}` ([#753](https://github.com/latex-lsp/texlab/issues/753)) ### Fixed - Improve accuracy of the error locations reported by the TeX engine ([#738](https://github.com/latex-lsp/texlab/issues/738)) - Reduce number of false positive errors reported by `texlab` ([#745](https://github.com/latex-lsp/texlab/issues/745)) ## [4.2.2] - 2022-08-28 ### Fixed - Do not watch the same directory multiple times, which can result in a memory leak on Windows ([#737](https://github.com/latex-lsp/texlab/issues/679)) - Fix detection of root document when sharing files between projects ([#679](https://github.com/latex-lsp/texlab/issues/679)) - Fix text synchronization problem caused by file watcher ([#724](https://github.com/latex-lsp/texlab/issues/724)) ## [4.2.1] - 2022-08-05 ### Fixed - Deserialize server options with missing keys (or not keys at all) correctly ([#707](https://github.com/latex-lsp/texlab/issues/707)) - Pass `chktexrc` files if they are not in the current directory ([#683](https://github.com/latex-lsp/texlab/issues/683)) - Revert back to server-side file watching due to lack of client support ([#679](https://github.com/latex-lsp/texlab/issues/679)) ## [4.2.0] - 2022-07-03 ### Added - Add support for escaping placeholders in forward search ([#649](https://github.com/latex-lsp/texlab/issues/649)) - Add support for diagnostic filtering ([#323](https://github.com/latex-lsp/texlab/issues/323)) - Add pre-built binaries for the following targets: - `aarch64-unknown-linux-gnu` - `armv7-unknown-linux-gnueabihf` - `x86_64-unknown-linux-musl` - `aarch64-pc-windows-msvc` - `i686-pc-windows-msvc` ### Fixed - Parse incomplete server options correctly ([#651](https://github.com/latex-lsp/texlab/issues/651)) ## [4.1.0] - 2022-06-12 ### Added - Add server commands to clean build directory ([#607](https://github.com/latex-lsp/texlab/issues/607)) ### Changed - Improve output when hovering over BibTeX strings - Improve the heuristic for finding build artifacts ([#635](https://github.com/latex-lsp/texlab/issues/635)) ### Fixed - Allow brackets in included file paths ([#639](https://github.com/latex-lsp/texlab/issues/639)) - Allow commands in included file paths ([#641](https://github.com/latex-lsp/texlab/issues/641)) ## [4.0.0] - 2022-05-25 ### Added - Add `--version` command line flag - Provide pre-built binaries for `aarch64-apple-darwin` architecture ([#591](https://github.com/latex-lsp/texlab/pull/591)) - Autocomplete files based on `\graphicspath` ([#590](https://github.com/latex-lsp/texlab/issues/590)) - Release `texlab` on `crates.io` ([#399](https://github.com/latex-lsp/texlab/issues/399)) ### Changed - _BREAKING_: Use client-side file watching instead of server-side notifications (`workspace/didChangeWatchedFiles`) - _BREAKING_: Bump minimum supported Rust version to 1.58.1 - _BREAKING_: Do not use `citeproc-rs` to render citations. Instead, use a custom approach that tries to resemble the `BibLaTeX` output ([#629](https://github.com/latex-lsp/texlab/pull/629)) ### Fixed - Parse `\subinputfrom` command correctly ([#610](https://github.com/latex-lsp/texlab/pull/610)) - Parse verbatim environments correctly ([#490](https://github.com/latex-lsp/texlab/issues/490)) - Stop capturing stdout when build exits ([#588](https://github.com/latex-lsp/texlab/issues/588)) - Fix parsing of key-value pairs ([#573](https://github.com/latex-lsp/texlab/issues/573)) - Normalize `texlab.rootDirectory` when resolving includes ([#571](https://github.com/latex-lsp/texlab/issues/571)) - Allow optional arguments in environment definitions ([#570](https://github.com/latex-lsp/texlab/issues/570)) - Allow `=` in include paths ([#568](https://github.com/latex-lsp/texlab/issues/568)) ## [3.3.2] - 2022-02-26 ### Fixed - Parse command definitions with optional arguments correctly - Fix detection of command definitions in completion ([latex-lsp/texlab-vscode#618](https://github.com/latex-lsp/texlab-vscode/issues/618)) - Watch aux directory by default for changes ([#563](https://github.com/latex-lsp/texlab/issues/563)) - Do not allow multi-line keys in the grammar ([#559](https://github.com/latex-lsp/texlab/issues/559)) - Use `textEdit` property for snippets ([#558](https://github.com/latex-lsp/texlab/issues/558)) - Allow simple commands as text argument for most commands ([#557](https://github.com/latex-lsp/texlab/issues/557)) - Treat `\renewcommand` as an environment definition ([#556](https://github.com/latex-lsp/texlab/issues/556)) - Do not return `null` from forward search request - Make directory path in `\import` optional ([#540](https://github.com/latex-lsp/texlab/issues/540)) - Do not spam workspace/configuration requests ([#533](https://github.com/latex-lsp/texlab/issues/533)) ## [3.3.1] - 2021-11-10 ### Fixed - Fix completion for symbols in commands with incomplete braces ([#510](https://github.com/latex-lsp/texlab/issues/510)) - Do not produce syntax errors for macro parameters inside special command arguments ([#508](https://github.com/latex-lsp/texlab/issues/508)) - Fix a bug that sometimes causes the `aux` file to pick up the diagnostics of the `tex` file ([#502](https://github.com/latex-lsp/texlab/issues/502)) - Fix a bug that sometimes prevents `log` files from being reanalyzed ([#502](https://github.com/latex-lsp/texlab/issues/502)) ## [3.3.0] - 2021-10-10 ### Added - Enable incremental text synchronization to reduce serialization overhead ([#460](https://github.com/latex-lsp/texlab/issues/460)) ### Changed - Reduce size of executable by compressing the completion database ### Fixed - Fix completion of commands near delimiters ([#449](https://github.com/latex-lsp/texlab/issues/449)) - Prevent `texlab` from hanging because of unanswered configuration requests sent to Emacs ([#456](https://github.com/latex-lsp/texlab/issues/456)) - Re-analyze the workspace if the initial configuration has been received late ## [3.2.0] - 2021-06-12 ### Added - Re-introduce `texlab.build.forwardSearchAfter` with a more reliable way of detecting the current line number. - Re-introduce `texlab.build.onSave` due to popular request ([#427](https://github.com/latex-lsp/texlab/issues/427)). - Re-introduce work done progress notifications for building. ### Changed - Recommend `texlab.build.onSave` instead of `-pvc` in documentation. - Do not rely on `.latexmkrc` for previewing anymore, instead `texlab.build.forwardSearchAfter` can be used ([#440](https://github.com/latex-lsp/texlab/issues/440), [#436](https://github.com/latex-lsp/texlab/issues/436)). - Deprecate `texlab.build.isContinuous` setting ### Fixed - Fix conditional compilation of the `citation` feature. ## [3.1.0] - 2021-06-03 ### Added - Add `texlab.latexFormatter` setting to allow turning off `latexindent`. At the moment, `texlab.latexFormatter: texlab` is not implemented yet and does nothing. - Expose the `--local` flag of `latexindent` via `texlab.latexindent.local` setting ([#365](https://github.com/latex-lsp/texlab/issues/365)) - Expose the `--modifylinebreaks` flag of `latexindent` via `texlab.latexindent.modifyLineBreaks` setting ([#365](https://github.com/latex-lsp/texlab/issues/365)) - Assign (unique) error codes to static analysis diagnostics. ### Fixed - Avoid creating defunct `latexindent` processes which clear out the document ([#437](https://github.com/latex-lsp/texlab/issues/437)) - Allow whitespace in LaTeX identifiers like labels ([#433](https://github.com/latex-lsp/texlab/issues/433)) - Run CI on Ubuntu 18.04 to allow an older `glibc` version ([#439](https://github.com/latex-lsp/texlab/issues/439)). ### Fixed ## [3.0.1] - 2021-05-22 ### Fixed - Sometimes the log parser does not pick up errors from the log file ([#426](https://github.com/latex-lsp/texlab/issues/426)) - Fix a bug involving characters that are not part of the ASCII charset ([#428](https://github.com/latex-lsp/texlab/issues/428)) ## [3.0.0] - 2021-05-16 ### Added - Basic error analysis for LaTeX files ([#323](https://github.com/latex-lsp/texlab/issues/323)) - Parse LaTeX3 commands correctly ([#410](https://github.com/latex-lsp/texlab/issues/410)) - Allow configuring ChkTeX using a `chktexrc` file ([#309](https://github.com/latex-lsp/texlab/issues/309)) - Implement goto definition for includes ([#386](https://github.com/latex-lsp/texlab/issues/386)) - Provide completion for `\citeA{...}` ([#409](https://github.com/latex-lsp/texlab/issues/409)) - Allow passing additional arguments to `latexindent` ([#365](https://github.com/latex-lsp/texlab/issues/365)) - Document symbols and label completion now correctly handle `subequations`. ### Changed - _BREAKING_: The configuration format has changed. Every setting is now under the `texlab` scope instead of the two scopes `latex` and `bibtex`. For a list of possible options, please see [here](docs/options.md). The `latex.build.onSave` setting has been removed in favor of `-pvc` of `latexmk`. In the VSCode extension, the `latex.build.onSave` setting is still available along with the `latex.build.forwardSearchAfter` setting. The reasoning is that that `latex.build.forwardSearchAfter` cannot reliably implemented in the server because it requires the current cursor position, which the LSP spec does not offer. In previous versions, TexLab had to guess the cursor position. We encourage editor extensions, to still support these settings under the `texlab` scope. - _BREAKING_: Previewing equations has been removed for now until a better solution is found. The existing approach is way too slow and does not work reliably. - Distribution detection no longer produces an error message in the client. Instead, a log message is generated. A TeX distribution is only required to compile documents. - Improve compile times a bit. ### Fixed - Do not send snippets if the client does not support them ([#413](https://github.com/latex-lsp/texlab/issues/413)) - Fix protocol violation when exiting the server ([#310](https://github.com/latex-lsp/texlab/issues/310)) - Fix reporting compile-time diagnostics using file watching ([#339](https://github.com/latex-lsp/texlab/issues/339)) - Fix compilation warnings ([#359](https://github.com/latex-lsp/texlab/issues/359)) - Fix crash when exiting with NeoVim LSP client ([#405](https://github.com/latex-lsp/texlab/issues/405)) - Hopefully fixes the ChkTeX spamming issue ([#186](https://github.com/latex-lsp/texlab/issues/186)) - Reduce CPU-load when idle ([#400](https://github.com/latex-lsp/texlab/issues/400)) ## [2.2.2] - 2021-01-10 ### Fixed - Fix compilation on `arm64-apple-darwin` (Apple Silicon) ([#343](https://github.com/latex-lsp/texlab/issues/343)) ## [2.2.1] - 2021-01-06 ### Added - Add basic support for RNW files - Add support for `varioref` package ### Changed - Set `isIncomplete` to `false` for small completion lists ### Fixed - Fix compilation on `aarch64` and `armv7l` ([#289](https://github.com/latex-lsp/texlab/issues/289)) ## [2.2.0] - 2020-05-27 ### Added - Fuzzy matching now works with Visual Studio Code ### Changed - Improve performance of completion ### Fixed - Fix the ordering of completion items when using `lsp-mode` ([#227](https://github.com/latex-lsp/texlab/issues/227)) - Fix preview when using custom class files ([#228](https://github.com/latex-lsp/texlab/issues/228)) ## [2.1.0] - 2020-05-10 ### Added - Add a new setting `latex.build.forwardSearchAfter` to trigger the forward search after building. - Add option to write the log output to a log file ### Fixed - Fix crash in symbols when encountering theorem descriptions ([#220](https://github.com/latex-lsp/texlab/issues/220)) - Fix a parsing error that caused `texlab` to take 100% CPU usage in some cases ([#212](https://github.com/latex-lsp/texlab/issues/212)) - Prevent building the same file multiple times at once ## [2.0.0] - 2020-04-20 ### Added - Add basic support for the `import` package - Allow LaTeX and BibTeX formatting via `latexindent`. The built-in BibTeX formatter is still available via `"bibtex.formatting.formatter": "texlab"` ([#151](https://github.com/latex-lsp/texlab/issues/151)) ### Fixed - Handle `subfiles` package when executing forward search ([#208](https://github.com/latex-lsp/texlab/issues/208)) - Fix detection of terminated builds - Ensure that there is at most one instance of ChkTeX running - Fix deserialization of incoming JSON-RPC errors - Fix preview when including packages in a child file ### Changed - **Breaking change**: `latex.build.args` now uses placeholders like the forward search. The filename (`%f`) is no longer implicitly appended to the end of the argument list. - **Breaking change**: Update the LSP types to accommodate newer LSP clients ([#200](https://github.com/latex-lsp/texlab/issues/200)) - Improve performance of completion (when completing LaTeX commands) - Improve workspace detection algorithm ## [1.10.0] - 2020-02-11 ### Added - Add a new setting `latex.build.outputDirectory` to specify the directory containing the build artifacts. This setting can be used in combination with the `-outdir` flag of `latexmk` ([#147](https://github.com/latex-lsp/texlab/issues/147)) - Add basic support for push-based configuration via `workspace/didChangeConfiguration` ([#123](https://github.com/latex-lsp/texlab/issues/123)) ### Fixed - Show all digits of chktex warning number ([#160](https://github.com/latex-lsp/texlab/issues/160)) ## [1.9.0] - 2019-12-30 ### Added - Provide completion for local packages if `kpsewhich` is installed - Add `.def` and `.bibtex` to the list of supported extensions - Add basic support for `tectonic` ### Fixed - Fix rendering of citations with DOIs ([#117](https://github.com/latex-lsp/texlab/issues/117)) - Fix building of LaTeX files without `\begin{document}` ([#122](https://github.com/latex-lsp/texlab/issues/122)) - Do not crash when editing remote files - Run LaTeX linter when opening a file if enabled - Handle `\hyphen` when rendering citations ## [1.8.0] - 2019-12-01 ### Added - Add support for `crossref` when previewing citations ([#16](https://github.com/latex-lsp/texlab/issues/16)) - Warn if the user does not have a TeX distribution installed ### Changed - Change license to GPLv3 - Do not require Node.js when building the server (#[87](https://github.com/latex-lsp/texlab/issues/87)) ## [1.7.0] - 2019-11-20 ### Added - Add logging for JSON-RPC errors via `stderr` ([#111](https://github.com/latex-lsp/texlab/issues/111)) - Provide completion for `\subfile` - Provide completion for glossary entries - Show full path when hovering over includes - Implement "Goto Definition" for BibTeX strings ### Changed - Use Rust Stable (1.39+) instead of Rust Beta - Sort symbols by project order ([#93](https://github.com/latex-lsp/texlab/issues/93)) ### Fixed - Improve detection of local packages inside the current workspace ([#110](https://github.com/latex-lsp/texlab/issues/110)) - Fix potential crash in "Goto Definition" ## [1.6.0] - 2019-09-29 ### Added - Include enumeration environments in symbols - Implement `workspace/symbol` request - Handle enumeration items when rendering labels - Handle subtables in symbols and completion ### Changed - Handle BibTeX strings when rendering citations - Improve rendering of labels - Do not require a label when generating symbols - Improve detection of included files - Reorganize completion and symbol kinds - Do not rely on `workspace/didChangeWatchedFiles` - Use Rust Beta instead of Rust Nightly - Make rendering of section labels more consistent ### Fixed - Fix theorem numbers in multi-file projects - Fix filter text of citations with braces inside a field - Handle invalid UTF-8 in log files ## [1.5.0] - 2019-08-27 ### Added - Add support for clients that do not support hierarchical symbols - Add support for hovering over BibTeX strings ### Changed - Use formatted references in symbol request ### Fixed - Do not run ChkTeX on BibTeX files - Fix build freezes on Windows ([#63](https://github.com/latex-lsp/texlab/issues/63)) ## [1.4.1] - 2019-08-22 ### Added - Add support for \part ### Fixed - Increase hover range when hovering over labels - Fix rendering of theorem labels - Handle Windows paths correctly ## [1.4.0] - 2019-08-20 ### Added - Provide symbols for BibTeX fields and BibTeX strings - Provide symbols for LaTeX labels - Show theorem name when hovering over theorem references - Show Unicode glyps when completing symbols ### Changed - Use LocationLink for "peek definition" when possible - Node.js is no longer a dependency ## [1.3.0] - 2019-08-06 ### Added - Provide document symbols for BibTeX entries and LaTeX sections ### Changed - Hovering over a package does not require an internet connection anymore - The Linux server binaries do not depend on `libssl` anymore ([#55](https://github.com/latex-lsp/texlab/issues/55)) ### Fixed - Build cancellation has been reimplemented ([#47](https://github.com/latex-lsp/texlab/issues/47), [#63](https://github.com/latex-lsp/texlab/issues/63)) ## [1.2.0] - 2019-07-23 ### Added - Add completion support for `\RequirePackage` - Filter completion list based on the contents of the reference ### Changed - The index mechanism has been removed. Packages are now indexed with a script beforehand. ## [1.1.0] - 2019-07-13 ### Added - Add section name and caption to label completion - Show section name and caption when hovering over labels - Add some missing kernel commands with stars - Add support for comma-separated imports - Add setting to lint after a change occurs ### Changed - Improve completion at the end of the file ### Fixed - Fix preselect for environments with missing braces ## [1.0.0] - 2019-07-04 ### Added - Add support citations with multiple keys ([#22](https://github.com/latex-lsp/texlab/issues/22)) - Add support for the cleveref package ([#21](https://github.com/latex-lsp/texlab/issues/21)) - Implement "Go to Definition" for commands ([#15](https://github.com/latex-lsp/texlab/issues/15)) - Provide preview for user-defined commands - Provide completion and preview for theorem environments ### Changed - Java is no longer a required dependency - Node.js is now an optional dependency required to display citations - Improve performance of completion - Improve startup time - The server no longer depends on a workspace folder - "Find all References" works from a reference instead of just the definition ([#25](https://github.com/latex-lsp/texlab/issues/25)) - All configuration items are now optional - Provide only math labels when completing \eqref - Preselect the matching environment name ([#29](https://github.com/latex-lsp/texlab/issues/29)) ### Fixed - Let the client decide whether to include the declaration when finding all references ([#25](https://github.com/latex-lsp/texlab/issues/25)) - Renaming a label with colons now works as expected ([#30](https://github.com/latex-lsp/texlab/issues/30)) - Handle colons when completing labels and citations ([#30](https://github.com/latex-lsp/texlab/issues/30)) - Do not crash when encountering a BibTeX entry with a `crossref` field ([#16](https://github.com/latex-lsp/texlab/issues/16)) - Hovering over uppercase BibTeX fields now shows the documentation ([#17](https://github.com/latex-lsp/texlab/issues/17)) - Do not depend on extensions when resolving included files ([#22](https://github.com/latex-lsp/texlab/issues/22)) - Do not depend on the `workspace/configuration` request (#[22](https://github.com/latex-lsp/texlab/issues/22)) - Prevent completion from triggering too often ## [0.4.2] - 2019-04-10 ### Fixed - Fix completion inside `\( \)`. ([#14](https://github.com/latex-lsp/texlab/issues/14)) - Do not crash on invalid requests. ## [0.4.1] - 2019-03-30 ### Changed - Improve startup time ### Fixed - Improve MiKTeX support ([#8](https://github.com/latex-lsp/texlab-vscode/issues/8)) ## [0.4.0] - 2019-03-09 ### Added - Add linting support for LaTeX via [ChkTeX](https://www.nongnu.org/chktex/) ### Changed - Analyze referenced files that are not part of the current workspace - Improve completion for includes - Improve performance of completion ## [0.3.0] - 2019-03-05 ### Added - Show preview when hovering over math expressions - Show package name when hovering over a command ### Changed - Store completion database in `~/.texlab` directory ### Fixed - Fix crash when editing a BibTeX file - Fix crash when hovering over invalid BibTeX entries - Fix a bug where the completion does not get triggered correctly ## [0.2.0] - 2019-03-01 ### Added - Show bibliography when completing citations - Show bibliography when hovering over citations - Completion for equation references ### Fixed - Fix completion of file includes - Prevent server crash when opening a locked file ## [0.1.2] - 2019-02-16 ### Fixed - Do not display an error when PDF viewers return a non-zero exit code while performing forward search ## [0.1.1] - 2019-02-15 ### Changed - Reduce binary size ### Fixed - Fix rendering of completion symbols ## [0.1.0] - 2019-02-15 - Initial release texlab-5.24.0/CONTRIBUTING.md000066400000000000000000000002651510221113200153010ustar00rootroot00000000000000# Contributing Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate. texlab-5.24.0/Cargo.lock000066400000000000000000001635661510221113200147730ustar00rootroot00000000000000# This file is automatically @generated by Cargo. # It is not intended for manual editing. version = 4 [[package]] name = "adler2" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "aho-corasick" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea5d730647d4fadd988536d06fecce94b7b4f2a7efdae548f1cf4b63205518ab" dependencies = [ "memchr", ] [[package]] name = "anes" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstream" version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", "utf8parse", ] [[package]] name = "anstyle" version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" dependencies = [ "windows-sys 0.48.0", ] [[package]] name = "anstyle-wincon" version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" dependencies = [ "anstyle", "windows-sys 0.48.0", ] [[package]] name = "anyhow" version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" [[package]] name = "autocfg" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "base-db" version = "0.0.0" dependencies = [ "bibtex-utils", "dirs", "distro", "itertools 0.14.0", "line-index", "log", "notify", "notify-debouncer-full", "once_cell", "parser", "percent-encoding", "regex", "rowan", "rustc-hash 2.1.1", "shellexpand", "syntax", "titlecase", "url", ] [[package]] name = "beef" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" [[package]] name = "bibfmt" version = "0.0.0" dependencies = [ "expect-test", "line-index", "parser", "rowan", "syntax", ] [[package]] name = "bibtex-utils" version = "0.0.0" dependencies = [ "chrono", "expect-test", "human_name", "itertools 0.14.0", "parser", "rowan", "rustc-hash 2.1.1", "syntax", "unicode-normalization", ] [[package]] name = "bitflags" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" [[package]] name = "bstr" version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab" dependencies = [ "memchr", "regex-automata", "serde", ] [[package]] name = "bumpalo" version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "cast" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "castaway" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a17ed5635fc8536268e5d4de1e22e81ac34419e5f052d4d51f4e01dcc263fcc" dependencies = [ "rustversion", ] [[package]] name = "cfg-if" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" dependencies = [ "num-traits", ] [[package]] name = "ciborium" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "effd91f6c78e5a4ace8a5d3c0b6bfaec9e2baaef55f3efc00e45fb2e477ee926" dependencies = [ "ciborium-io", "ciborium-ll", "serde", ] [[package]] name = "ciborium-io" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdf919175532b369853f5d5e20b26b43112613fd6fe7aee757e35f7a44642656" [[package]] name = "ciborium-ll" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "defaa24ecc093c77630e6c15e17c51f5e187bf35ee514f4e2d67baaa96dae22b" dependencies = [ "ciborium-io", "half", ] [[package]] name = "citeproc" version = "0.0.0" dependencies = [ "base-db", "bibtex-utils", "expect-test", "isocountry", "itertools 0.14.0", "parser", "rowan", "rustc-hash 2.1.1", "syntax", "titlecase", "unicode-normalization", "url", ] [[package]] name = "clap" version = "4.5.51" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5" dependencies = [ "clap_builder", "clap_derive", ] [[package]] name = "clap_builder" version = "4.5.51" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75835f0c7bf681bfd05abe44e965760fea999a5286c6eb2d59883634fd02011a" dependencies = [ "anstream", "anstyle", "clap_lex", "strsim", ] [[package]] name = "clap_derive" version = "4.5.49" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" dependencies = [ "heck", "proc-macro2", "quote", "syn", ] [[package]] name = "clap_lex" version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "colorchoice" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "commands" version = "0.0.0" dependencies = [ "anyhow", "base-db", "bstr", "crossbeam-channel", "distro", "expect-test", "itertools 0.14.0", "libc", "log", "rowan", "rustc-hash 2.1.1", "syntax", "test-utils", "thiserror 2.0.17", "url", ] [[package]] name = "compact_str" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f86b9c4c00838774a6d902ef931eff7470720c51d90c2e32cfe15dc304737b3f" dependencies = [ "castaway", "cfg-if", "itoa", "ryu", "serde", "static_assertions", ] [[package]] name = "completion" version = "0.0.0" dependencies = [ "base-db", "completion-data", "criterion", "distro", "expect-test", "fuzzy-matcher", "line-index", "parser", "rayon", "rowan", "rustc-hash 2.1.1", "syntax", "test-utils", "url", ] [[package]] name = "completion-data" version = "0.0.0" dependencies = [ "base-db", "flate2", "itertools 0.14.0", "once_cell", "rustc-hash 2.1.1", "serde", "serde_json", ] [[package]] name = "countme" version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7704b5fdd17b18ae31c4c1da5a2e0305a2bf17b5249300a9ee9ed7b72114c636" [[package]] name = "crc32fast" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ "cfg-if", ] [[package]] name = "criterion" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1c047a62b0cc3e145fa84415a3191f628e980b194c2755aa12300a4e6cbd928" dependencies = [ "anes", "cast", "ciborium", "clap", "criterion-plot", "itertools 0.13.0", "num-traits", "oorandom", "plotters", "rayon", "regex", "serde", "serde_json", "tinytemplate", "walkdir", ] [[package]] name = "criterion-plot" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b1bcc0dc7dfae599d84ad0b1a55f80cde8af3725da8313b528da95ef783e338" dependencies = [ "cast", "itertools 0.13.0", ] [[package]] name = "crossbeam-channel" version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-deque" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" dependencies = [ "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" version = "0.9.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", "memoffset", "scopeguard", ] [[package]] name = "crossbeam-utils" version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "definition" version = "0.0.0" dependencies = [ "base-db", "itertools 0.14.0", "rowan", "rustc-hash 2.1.1", "syntax", "test-utils", ] [[package]] name = "diagnostics" version = "0.0.0" dependencies = [ "base-db", "encoding_rs", "encoding_rs_io", "expect-test", "itertools 0.14.0", "line-index", "log", "multimap", "once_cell", "regex", "rowan", "rustc-hash 2.1.1", "syntax", "test-utils", "url", ] [[package]] name = "dirs" version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" dependencies = [ "dirs-sys", ] [[package]] name = "dirs-sys" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" dependencies = [ "libc", "option-ext", "redox_users", "windows-sys 0.59.0", ] [[package]] name = "displaydoc" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "dissimilar" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86e3bdc80eee6e16b2b6b0f87fbc98c04bee3455e35174c0de1a125d0688c632" [[package]] name = "distro" version = "0.0.0" dependencies = [ "anyhow", "rustc-hash 2.1.1", ] [[package]] name = "either" version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "encoding_rs" version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] [[package]] name = "encoding_rs_io" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1cc3c5651fb62ab8aa3103998dade57efdd028544bd300516baa31840c252a83" dependencies = [ "encoding_rs", ] [[package]] name = "errno" version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" dependencies = [ "libc", "windows-sys 0.59.0", ] [[package]] name = "expect-test" version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63af43ff4431e848fb47472a920f14fa71c24de13255a5692e93d4e90302acb0" dependencies = [ "dissimilar", "once_cell", ] [[package]] name = "fastrand" version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "fern" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4316185f709b23713e41e3195f90edef7fb00c3ed4adc79769cf09cc762a3b29" dependencies = [ "log", ] [[package]] name = "file-id" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1fc6a637b6dc58414714eddd9170ff187ecb0933d4c7024d1abbd23a3cc26e9" dependencies = [ "windows-sys 0.60.2", ] [[package]] name = "flate2" version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb" dependencies = [ "crc32fast", "miniz_oxide", ] [[package]] name = "fluent-uri" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17c704e9dbe1ddd863da1e6ff3567795087b1eb201ce80d8fa81162e1516500d" dependencies = [ "bitflags 1.3.2", ] [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "folding" version = "0.0.0" dependencies = [ "base-db", "expect-test", "rowan", "syntax", "test-utils", ] [[package]] name = "form_urlencoded" version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" dependencies = [ "percent-encoding", ] [[package]] name = "fsevent-sys" version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2" dependencies = [ "libc", ] [[package]] name = "fuzzy-matcher" version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54614a3312934d066701a80f20f15fa3b56d67ac7722b39eea5b4c9dd1d66c94" dependencies = [ "thread_local", ] [[package]] name = "getrandom" version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" dependencies = [ "cfg-if", "libc", "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] name = "getrandom" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" dependencies = [ "cfg-if", "libc", "r-efi", "wasi 0.14.2+wasi-0.2.4", ] [[package]] name = "half" version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" [[package]] name = "hashbrown" version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" [[package]] name = "heck" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "highlights" version = "0.0.0" dependencies = [ "base-db", "expect-test", "rowan", "test-utils", ] [[package]] name = "hover" version = "0.0.0" dependencies = [ "base-db", "bibtex-utils", "citeproc", "completion-data", "expect-test", "rowan", "syntax", "test-utils", ] [[package]] name = "human_name" version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbd70ad9620f3a33a270cedfa47114c9566660c28ff8d0b3772b5c8dc1dac085" dependencies = [ "compact_str", "crossbeam-utils", "phf", "phf_codegen", "serde", "serde_json", "smallvec", "unicode-case-mapping", "unicode-normalization", "unicode-segmentation", "unidecode", ] [[package]] name = "icu_collections" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" dependencies = [ "displaydoc", "yoke", "zerofrom", "zerovec", ] [[package]] name = "icu_locid" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" dependencies = [ "displaydoc", "litemap", "tinystr", "writeable", "zerovec", ] [[package]] name = "icu_locid_transform" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" dependencies = [ "displaydoc", "icu_locid", "icu_locid_transform_data", "icu_provider", "tinystr", "zerovec", ] [[package]] name = "icu_locid_transform_data" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" [[package]] name = "icu_normalizer" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" dependencies = [ "displaydoc", "icu_collections", "icu_normalizer_data", "icu_properties", "icu_provider", "smallvec", "utf16_iter", "utf8_iter", "write16", "zerovec", ] [[package]] name = "icu_normalizer_data" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" [[package]] name = "icu_properties" version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" dependencies = [ "displaydoc", "icu_collections", "icu_locid_transform", "icu_properties_data", "icu_provider", "tinystr", "zerovec", ] [[package]] name = "icu_properties_data" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" [[package]] name = "icu_provider" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" dependencies = [ "displaydoc", "icu_locid", "icu_provider_macros", "stable_deref_trait", "tinystr", "writeable", "yoke", "zerofrom", "zerovec", ] [[package]] name = "icu_provider_macros" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "idna" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" dependencies = [ "idna_adapter", "smallvec", "utf8_iter", ] [[package]] name = "idna_adapter" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" dependencies = [ "icu_normalizer", "icu_properties", ] [[package]] name = "inlay-hints" version = "0.0.0" dependencies = [ "base-db", "expect-test", "rowan", "rustc-hash 2.1.1", "test-utils", ] [[package]] name = "inotify" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f37dccff2791ab604f9babef0ba14fbe0be30bd368dc541e2b08d07c8aa908f3" dependencies = [ "bitflags 2.8.0", "inotify-sys", "libc", ] [[package]] name = "inotify-sys" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb" dependencies = [ "libc", ] [[package]] name = "ipc" version = "0.0.0" dependencies = [ "crossbeam-channel", "dirs", "expect-test", "log", "parser", "serde", "serde_json", "uds_windows", ] [[package]] name = "isocountry" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ea1dc4bf0fb4904ba83ffdb98af3d9c325274e92e6e295e4151e86c96363e04" dependencies = [ "serde", "thiserror 1.0.69", ] [[package]] name = "itertools" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ "either", ] [[package]] name = "itertools" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" dependencies = [ "either", ] [[package]] name = "itoa" version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "js-sys" version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" dependencies = [ "wasm-bindgen", ] [[package]] name = "kqueue" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eac30106d7dce88daf4a3fcb4879ea939476d5074a9b7ddd0fb97fa4bed5596a" dependencies = [ "kqueue-sys", "libc", ] [[package]] name = "kqueue-sys" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b" dependencies = [ "bitflags 1.3.2", "libc", ] [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" version = "0.2.177" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" [[package]] name = "libredox" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ "bitflags 2.8.0", "libc", ] [[package]] name = "line-index" version = "0.0.0" dependencies = [ "rustc-hash 2.1.1", "text-size", ] [[package]] name = "links" version = "0.0.0" dependencies = [ "base-db", "expect-test", "test-utils", ] [[package]] name = "linux-raw-sys" version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe7db12097d22ec582439daf8618b8fdd1a7bef6270e9af3b1ebcd30893cf413" [[package]] name = "litemap" version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" [[package]] name = "lock_api" version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" dependencies = [ "scopeguard", ] [[package]] name = "log" version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" [[package]] name = "logos" version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff472f899b4ec2d99161c51f60ff7075eeb3097069a36050d8037a6325eb8154" dependencies = [ "logos-derive", ] [[package]] name = "logos-codegen" version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "192a3a2b90b0c05b27a0b2c43eecdb7c415e29243acc3f89cc8247a5b693045c" dependencies = [ "beef", "fnv", "lazy_static", "proc-macro2", "quote", "regex-syntax", "rustc_version", "syn", ] [[package]] name = "logos-derive" version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "605d9697bcd5ef3a42d38efc51541aa3d6a4a25f7ab6d1ed0da5ac632a26b470" dependencies = [ "logos-codegen", ] [[package]] name = "lsp-server" version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d6ada348dbc2703cbe7637b2dda05cff84d3da2819c24abcb305dd613e0ba2e" dependencies = [ "crossbeam-channel", "log", "serde", "serde_derive", "serde_json", ] [[package]] name = "lsp-types" version = "0.97.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53353550a17c04ac46c585feb189c2db82154fc84b79c7a66c96c2c644f66071" dependencies = [ "bitflags 1.3.2", "fluent-uri", "serde", "serde_json", "serde_repr", ] [[package]] name = "memchr" version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "memoffset" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg", ] [[package]] name = "miniz_oxide" version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" dependencies = [ "adler2", "simd-adler32", ] [[package]] name = "mio" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ "libc", "log", "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.52.0", ] [[package]] name = "multimap" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d87ecb2933e8aeadb3e3a02b828fed80a7528047e68b4f424523a0981a3a084" dependencies = [ "serde", ] [[package]] name = "nom" version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405" dependencies = [ "memchr", ] [[package]] name = "notify" version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d3d07927151ff8575b7087f245456e549fea62edf0ec4e565a5ee50c8402bc3" dependencies = [ "bitflags 2.8.0", "fsevent-sys", "inotify", "kqueue", "libc", "log", "mio", "notify-types", "walkdir", "windows-sys 0.60.2", ] [[package]] name = "notify-debouncer-full" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "375bd3a138be7bfeff3480e4a623df4cbfb55b79df617c055cd810ba466fa078" dependencies = [ "file-id", "log", "notify", "notify-types", "walkdir", ] [[package]] name = "notify-types" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e0826a989adedc2a244799e823aece04662b66609d96af8dff7ac6df9a8925d" [[package]] name = "num-traits" version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", ] [[package]] name = "num_cpus" version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ "hermit-abi", "libc", ] [[package]] name = "once_cell" version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "oorandom" version = "11.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" [[package]] name = "option-ext" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "parking_lot" version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" dependencies = [ "lock_api", "parking_lot_core", ] [[package]] name = "parking_lot_core" version = "0.9.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", "windows-link", ] [[package]] name = "parser" version = "0.0.0" dependencies = [ "distro", "expect-test", "log", "logos", "once_cell", "pathdiff", "regex", "rowan", "rustc-hash 2.1.1", "shellexpand", "syntax", "tempfile", "versions", ] [[package]] name = "pathdiff" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" [[package]] name = "percent-encoding" version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "phf" version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" dependencies = [ "phf_shared", ] [[package]] name = "phf_codegen" version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a" dependencies = [ "phf_generator", "phf_shared", ] [[package]] name = "phf_generator" version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" dependencies = [ "phf_shared", "rand", ] [[package]] name = "phf_shared" version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" dependencies = [ "siphasher", ] [[package]] name = "plotters" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" dependencies = [ "num-traits", "plotters-backend", "plotters-svg", "wasm-bindgen", "web-sys", ] [[package]] name = "plotters-backend" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" [[package]] name = "plotters-svg" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" dependencies = [ "plotters-backend", ] [[package]] name = "proc-macro2" version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] [[package]] name = "quote" version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] [[package]] name = "r-efi" version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" [[package]] name = "rand" version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "rand_core", ] [[package]] name = "rand_core" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" [[package]] name = "rayon" version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" dependencies = [ "either", "rayon-core", ] [[package]] name = "rayon-core" version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" dependencies = [ "crossbeam-deque", "crossbeam-utils", ] [[package]] name = "redox_syscall" version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d04b7d0ee6b4a0207a0a7adb104d23ecb0b47d6beae7152d0fa34b692b29fd6" dependencies = [ "bitflags 2.8.0", ] [[package]] name = "redox_users" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b" dependencies = [ "getrandom 0.2.9", "libredox", "thiserror 2.0.17", ] [[package]] name = "references" version = "0.0.0" dependencies = [ "base-db", "rowan", "rustc-hash 2.1.1", "syntax", "test-utils", ] [[package]] name = "regex" version = "1.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" dependencies = [ "aho-corasick", "memchr", "regex-automata", "regex-syntax", ] [[package]] name = "regex-automata" version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" dependencies = [ "aho-corasick", "memchr", "regex-syntax", ] [[package]] name = "regex-syntax" version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "rename" version = "0.0.0" dependencies = [ "base-db", "parser", "rowan", "rustc-hash 2.1.1", "syntax", "test-utils", ] [[package]] name = "rowan" version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "417a3a9f582e349834051b8a10c8d71ca88da4211e4093528e36b9845f6b5f21" dependencies = [ "countme", "hashbrown", "rustc-hash 1.1.0", "text-size", ] [[package]] name = "rustc-hash" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc-hash" version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" [[package]] name = "rustc_version" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] [[package]] name = "rustix" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d97817398dd4bb2e6da002002db259209759911da105da92bec29ccb12cf58bf" dependencies = [ "bitflags 2.8.0", "errno", "libc", "linux-raw-sys", "windows-sys 0.59.0", ] [[package]] name = "rustversion" version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" [[package]] name = "ryu" version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "same-file" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" dependencies = [ "winapi-util", ] [[package]] name = "scopeguard" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "semver" version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" dependencies = [ "serde_core", "serde_derive", ] [[package]] name = "serde_core" version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "serde_json" version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" dependencies = [ "itoa", "memchr", "ryu", "serde", "serde_core", ] [[package]] name = "serde_regex" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8136f1a4ea815d7eac4101cfd0b16dc0cb5e1fe1b8609dfd728058656b7badf" dependencies = [ "regex", "serde", ] [[package]] name = "serde_repr" version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "shellexpand" version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b1fdf65dd6331831494dd616b30351c38e96e45921a27745cf98490458b90bb" dependencies = [ "dirs", ] [[package]] name = "simd-adler32" version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" [[package]] name = "siphasher" version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "smallvec" version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "stable_deref_trait" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "static_assertions" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "strsim" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" [[package]] name = "symbols" version = "0.0.0" dependencies = [ "base-db", "distro", "expect-test", "itertools 0.14.0", "line-index", "regex", "rowan", "rustc-hash 2.1.1", "syntax", "test-utils", "titlecase", "url", ] [[package]] name = "syn" version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] [[package]] name = "synstructure" version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "syntax" version = "0.0.0" dependencies = [ "distro", "itertools 0.14.0", "rowan", "rustc-hash 2.1.1", ] [[package]] name = "tempfile" version = "3.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" dependencies = [ "fastrand", "getrandom 0.3.2", "once_cell", "rustix", "windows-sys 0.59.0", ] [[package]] name = "test-utils" version = "0.0.0" dependencies = [ "base-db", "distro", "line-index", "rowan", "url", ] [[package]] name = "texlab" version = "5.24.0" dependencies = [ "anyhow", "base-db", "bibfmt", "citeproc", "clap", "commands", "completion", "completion-data", "criterion", "crossbeam-channel", "definition", "diagnostics", "distro", "fern", "folding", "highlights", "hover", "inlay-hints", "ipc", "line-index", "links", "log", "lsp-server", "lsp-types", "notify", "notify-debouncer-full", "parking_lot", "parser", "references", "regex", "rename", "rowan", "rustc-hash 2.1.1", "serde", "serde_json", "serde_regex", "serde_repr", "symbols", "syntax", "tempfile", "threadpool", "titlecase", "url", ] [[package]] name = "text-size" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f18aa187839b2bdb1ad2fa35ead8c4c2976b64e4363c386d45ac0f7ee85c9233" [[package]] name = "thiserror" version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ "thiserror-impl 1.0.69", ] [[package]] name = "thiserror" version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" dependencies = [ "thiserror-impl 2.0.17", ] [[package]] name = "thiserror-impl" version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "thiserror-impl" version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "thread_local" version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" dependencies = [ "cfg-if", "once_cell", ] [[package]] name = "threadpool" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" dependencies = [ "num_cpus", ] [[package]] name = "tinystr" version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" dependencies = [ "displaydoc", "zerovec", ] [[package]] name = "tinytemplate" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" dependencies = [ "serde", "serde_json", ] [[package]] name = "tinyvec" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" dependencies = [ "tinyvec_macros", ] [[package]] name = "tinyvec_macros" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "titlecase" version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb567088a91d59b492520c8149e2be5ce10d5deb2d9a383f3378df3259679d40" dependencies = [ "regex", ] [[package]] name = "uds_windows" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" dependencies = [ "memoffset", "tempfile", "winapi", ] [[package]] name = "unicode-case-mapping" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "916a391c62ffbc5b6220fdafa353e93b530d21904d82ca1a2e29cdb5cfb4399f" [[package]] name = "unicode-ident" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5fd4f6878c9cb28d874b009da9e8d183b5abc80117c40bbd187a1fde336be6e8" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "unidecode" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "402bb19d8e03f1d1a7450e2bd613980869438e0666331be3e073089124aa1adc" [[package]] name = "url" version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" dependencies = [ "form_urlencoded", "idna", "percent-encoding", "serde", ] [[package]] name = "utf16_iter" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" [[package]] name = "utf8_iter" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "utf8parse" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "versions" version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80a7e511ce1795821207a837b7b1c8d8aca0c648810966ad200446ae58f6667f" dependencies = [ "itertools 0.14.0", "nom", ] [[package]] name = "walkdir" version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", "winapi-util", ] [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasi" version = "0.14.2+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" dependencies = [ "wit-bindgen-rt", ] [[package]] name = "wasm-bindgen" version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", "syn", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "web-sys" version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" dependencies = [ "js-sys", "wasm-bindgen", ] [[package]] name = "winapi" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ "winapi-i686-pc-windows-gnu", "winapi-x86_64-pc-windows-gnu", ] [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-link" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" [[package]] name = "windows-sys" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ "windows-targets 0.48.5", ] [[package]] name = "windows-sys" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ "windows-targets 0.52.6", ] [[package]] name = "windows-sys" version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ "windows-targets 0.52.6", ] [[package]] name = "windows-sys" version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ "windows-targets 0.53.5", ] [[package]] name = "windows-targets" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ "windows_aarch64_gnullvm 0.48.5", "windows_aarch64_msvc 0.48.5", "windows_i686_gnu 0.48.5", "windows_i686_msvc 0.48.5", "windows_x86_64_gnu 0.48.5", "windows_x86_64_gnullvm 0.48.5", "windows_x86_64_msvc 0.48.5", ] [[package]] name = "windows-targets" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", "windows_i686_gnullvm 0.52.6", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] [[package]] name = "windows-targets" version = "0.53.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" dependencies = [ "windows-link", "windows_aarch64_gnullvm 0.53.1", "windows_aarch64_msvc 0.53.1", "windows_i686_gnu 0.53.1", "windows_i686_gnullvm 0.53.1", "windows_i686_msvc 0.53.1", "windows_x86_64_gnu 0.53.1", "windows_x86_64_gnullvm 0.53.1", "windows_x86_64_msvc 0.53.1", ] [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_gnullvm" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" [[package]] name = "windows_aarch64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_aarch64_msvc" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" [[package]] name = "windows_i686_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnu" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_gnullvm" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" [[package]] name = "windows_i686_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_i686_msvc" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" [[package]] name = "windows_x86_64_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnu" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_gnullvm" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" [[package]] name = "windows_x86_64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "windows_x86_64_msvc" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" [[package]] name = "wit-bindgen-rt" version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ "bitflags 2.8.0", ] [[package]] name = "write16" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" [[package]] name = "writeable" version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" [[package]] name = "yoke" version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" dependencies = [ "serde", "stable_deref_trait", "yoke-derive", "zerofrom", ] [[package]] name = "yoke-derive" version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", "syn", "synstructure", ] [[package]] name = "zerofrom" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", "syn", "synstructure", ] [[package]] name = "zerovec" version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" dependencies = [ "yoke", "zerofrom", "zerovec-derive", ] [[package]] name = "zerovec-derive" version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", "syn", ] texlab-5.24.0/Cargo.toml000066400000000000000000000024611510221113200150000ustar00rootroot00000000000000[workspace] members = ["crates/*"] resolver = "2" [workspace.package] version = "5.24.0" license = "GPL-3.0" authors = [ "Eric Förster ", "Patrick Förster ", ] edition = "2024" rust-version = "1.89" [workspace.dependencies] anyhow = "1.0.100" bstr = "1.12.1" chrono = { version = "0.4.42", default-features = false } clap = "4.5.51" criterion = "0.7.0" crossbeam-channel = "0.5.15" dirs = "6.0.0" encoding_rs = "0.8.35" encoding_rs_io = "0.1.7" expect-test = "1.5.1" fern = "0.7.1" flate2 = "1.1.5" human_name = "2.0.4" isocountry = "0.3.2" itertools = "0.14.0" libc = "0.2.177" log = "0.4.28" logos = "0.15.1" lsp-server = "0.7.9" lsp-types = "0.97.0" multimap = "0.10.1" notify = "8.0.0" notify-debouncer-full = "0.6.0" once_cell = "1.21.3" parking_lot = "0.12.5" pathdiff = "0.2.3" percent-encoding = "2.3.2" rayon = "1.11.0" regex = "1.12.2" rowan = "0.16.1" rustc-hash = "2.1.1" serde = "1.0.228" serde_json = "1.0.145" serde_regex = "1.1.0" serde_repr = "0.1.20" shellexpand = "3.1.1" tempfile = "3.23.0" thiserror = "2.0.17" threadpool = "1.8.1" titlecase = "3.6.0" uds_windows = "1.1.0" unicode-normalization = "0.1.25" url = "2.5.7" versions = "7.0.0" [profile.release] lto = "thin" incremental = true [profile.bench] lto = "thin" incremental = true texlab-5.24.0/LICENSE000066400000000000000000001045151510221113200140600ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . texlab-5.24.0/README.md000066400000000000000000000073761510221113200143410ustar00rootroot00000000000000[![CI](https://github.com/latex-lsp/texlab/workflows/CI/badge.svg)](https://github.com/latex-lsp/texlab/actions) [![Wiki](https://img.shields.io/badge/docs-Wiki-success)](https://github.com/latex-lsp/texlab/wiki) [![GitHub release](https://img.shields.io/github/release/latex-lsp/texlab?label=github)](https://github.com/latex-lsp/texlab/releases) [![CTAN](https://img.shields.io/ctan/v/texlab)](https://ctan.org/pkg/texlab) # TexLab A cross-platform implementation of the [Language Server Protocol](https://microsoft.github.io/language-server-protocol) providing rich cross-editing support for the [LaTeX](https://www.latex-project.org/) typesetting system. The server may be used with [any editor that implements the Language Server Protocol](https://microsoft.github.io/language-server-protocol/implementors/tools/). ![Demo](images/demo.gif) ## Getting Started If your editor extension like does not install the TexLab server automatically, you will need to install it manually. We provide [precompiled binaries](https://github.com/latex-lsp/texlab/releases) for Windows, Linux and macOS. Alternatively, you can build TexLab from source or install it using your package manager. For a list of supported package managers, you can take a look at [Repology](https://repology.org/project/texlab/versions): [![Packaging status](https://repology.org/badge/vertical-allrepos/texlab.svg)](https://repology.org/project/texlab/versions) ### Requirements A [TeX distribution](https://www.latex-project.org/get/#tex-distributions) is _not_ strictly required to use the server but TexLab cannot compile your documents without one. TexLab supports compiling using [Tectonic](https://tectonic-typesetting.github.io/). For an example configuration, please see [here](https://github.com/latex-lsp/texlab/wiki/Tectonic). On Windows, you may need to install [Microsoft Visual C++ Redistributable for Visual Studio 2015](https://www.microsoft.com/en-US/download/details.aspx?id=48145). ### Building from Source You will need to install the following dependencies to compile the server: - A recent, stable version of [Rust](https://rustup.rs/) Then run the following command in the project folder: ```shell cargo build --release ``` Avoid installing `texlab` from [crates.io](https://crates.io/crates/texlab) because we don't publish new versions of the server to the registry, anymore. Instead, you can use ```shell cargo install --git https://github.com/latex-lsp/texlab --locked --tag ``` ## Usage After installing an editor extension, you can simply start editing LaTeX files. All editing features work out-of-the-box over all files in the currently opened workspace. There is no need for magic comments like `%!TEX root` and TexLab should figure out the dependencies of a file on its own. Note that you may need to set the `texlab.rootDirectory` option for some multi-folder projects. TexLab features a variety of options which can be used to configure features like building or forward search. See the [Wiki](https://github.com/latex-lsp/texlab/wiki) for more information. ## Development You can create a debug build by building the server without the `--release` flag. The resulting build can be used with the [Visual Studio Code extension](https://github.com/latex-lsp/texlab-vscode) by adding the absolute path of the `target/debug` folder to your `PATH` environment variable. TexLab has an extensive test suite of unit and integration tests. You can run them by executing ```shell cargo test ``` in the project folder. ## Contributing See [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us. ## Maintainers - Patrick Förster (patrick.foerster@outlook.de) ## License [GPL-3.0](https://choosealicense.com/licenses/gpl-3.0/) texlab-5.24.0/crates/000077500000000000000000000000001510221113200143265ustar00rootroot00000000000000texlab-5.24.0/crates/base-db/000077500000000000000000000000001510221113200156235ustar00rootroot00000000000000texlab-5.24.0/crates/base-db/Cargo.toml000066400000000000000000000013121510221113200175500ustar00rootroot00000000000000[package] name = "base-db" version = "0.0.0" license.workspace = true authors.workspace = true edition.workspace = true rust-version.workspace = true [dependencies] bibtex-utils = { path = "../bibtex-utils" } dirs.workspace = true distro = { path = "../distro" } itertools.workspace = true line-index = { path = "../line-index" } log.workspace = true notify-debouncer-full.workspace = true notify.workspace = true once_cell.workspace = true parser = { path = "../parser" } percent-encoding.workspace = true regex.workspace = true rowan.workspace = true rustc-hash.workspace = true shellexpand.workspace = true syntax = { path = "../syntax" } titlecase.workspace = true url.workspace = true [lib] doctest = false texlab-5.24.0/crates/base-db/src/000077500000000000000000000000001510221113200164125ustar00rootroot00000000000000texlab-5.24.0/crates/base-db/src/config.rs000066400000000000000000000076761510221113200202450ustar00rootroot00000000000000use std::time::Duration; use parser::SyntaxConfig; use regex::Regex; use rustc_hash::FxHashMap; #[derive(Debug, Default)] pub struct Config { pub build: BuildConfig, pub diagnostics: DiagnosticsConfig, pub formatting: FormattingConfig, pub synctex: Option, pub symbols: SymbolConfig, pub hover: HoverConfig, pub syntax: SyntaxConfig, pub completion: CompletionConfig, pub inlay_hints: InlayHintConfig, } #[derive(Debug)] pub struct BuildConfig { pub program: String, pub args: Vec, pub on_save: bool, pub forward_search_after: bool, pub aux_dir: String, pub log_dir: String, pub pdf_dir: String, pub output_filename: Option, } #[derive(Debug)] pub struct DiagnosticsConfig { pub allowed_patterns: Vec, pub ignored_patterns: Vec, pub chktex: ChktexConfig, pub delay: Duration, } #[derive(Debug, Default)] pub struct ChktexConfig { pub on_open: bool, pub on_save: bool, pub on_edit: bool, pub additional_args: Vec, } #[derive(Debug)] pub struct SynctexConfig { pub program: String, pub args: Vec, } #[derive(Debug)] pub struct FormattingConfig { pub tex_formatter: Formatter, pub bib_formatter: Formatter, pub latex_indent: LatexIndentConfig, pub line_length: usize, } #[derive(Debug)] pub enum Formatter { Null, Server, LatexIndent, TexFmt, } #[derive(Debug, Default)] pub struct LatexIndentConfig { pub local: Option, pub modify_line_breaks: bool, pub replacement: Option, } #[derive(Debug, Default)] pub struct SymbolConfig { pub allowed_patterns: Vec, pub ignored_patterns: Vec, pub custom_environments: FxHashMap, } #[derive(Debug, Default)] pub struct SymbolEnvironmentConfig { pub display_name: String, pub label: bool, } #[derive(Debug)] pub struct HoverConfig { pub symbols: HoverSymbolConfig, } #[derive(Debug, PartialEq, Eq, Clone, Copy)] pub enum HoverSymbolConfig { None, Glyph, Image, } #[derive(Debug)] pub struct InlayHintConfig { pub label_definitions: bool, pub label_references: bool, pub max_length: Option, } #[derive(Debug)] pub struct CompletionConfig { pub matcher: MatchingAlgo, } #[derive(Debug)] pub enum MatchingAlgo { Skim, SkimIgnoreCase, Prefix, PrefixIgnoreCase, } impl Default for BuildConfig { fn default() -> Self { Self { program: String::from("latexmk"), args: ["-pdf", "-interaction=nonstopmode", "-synctex=1", "%f"] .into_iter() .map(String::from) .collect(), on_save: false, forward_search_after: false, aux_dir: String::from("."), log_dir: String::from("."), pdf_dir: String::from("."), output_filename: None, } } } impl Default for DiagnosticsConfig { fn default() -> Self { Self { allowed_patterns: Vec::new(), ignored_patterns: Vec::new(), delay: Duration::from_millis(300), chktex: ChktexConfig::default(), } } } impl Default for FormattingConfig { fn default() -> Self { Self { tex_formatter: Formatter::LatexIndent, bib_formatter: Formatter::Server, line_length: 80, latex_indent: LatexIndentConfig::default(), } } } impl Default for InlayHintConfig { fn default() -> Self { Self { label_definitions: true, label_references: true, max_length: None, } } } impl Default for CompletionConfig { fn default() -> Self { Self { matcher: MatchingAlgo::SkimIgnoreCase, } } } impl Default for HoverConfig { fn default() -> Self { Self { symbols: HoverSymbolConfig::Image, } } } texlab-5.24.0/crates/base-db/src/data.rs000066400000000000000000001637421510221113200177060ustar00rootroot00000000000000#[derive(Debug, PartialEq, Eq, Clone, Copy)] pub struct BibtexEntryType<'a> { pub name: &'a str, pub category: BibtexEntryTypeCategory, pub documentation: Option<&'a str>, } #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy)] pub enum BibtexEntryTypeCategory { Misc, String, Article, Thesis, Book, Part, Collection, } #[derive(Debug, PartialEq, Eq, Clone, Copy)] pub struct BibtexFieldType<'a> { pub name: &'a str, pub documentation: &'a str, } impl<'a> BibtexEntryType<'a> { pub fn find(name: &str) -> Option { BIBTEX_ENTRY_TYPES .iter() .find(|ty| ty.name.eq_ignore_ascii_case(name)) .copied() } } impl<'a> BibtexFieldType<'a> { pub fn find(name: &str) -> Option { BIBTEX_FIELD_TYPES .iter() .find(|ty| ty.name.eq_ignore_ascii_case(name)) .copied() } } pub static BIBTEX_ENTRY_TYPES: &[BibtexEntryType<'static>] = &[ BibtexEntryType { name: "@preamble", category: BibtexEntryTypeCategory::Misc, documentation: None, }, BibtexEntryType { name: "@string", category: BibtexEntryTypeCategory::String, documentation: None, }, BibtexEntryType { name: "@comment", category: BibtexEntryTypeCategory::Misc, documentation: None, }, BibtexEntryType { name: "@article", category: BibtexEntryTypeCategory::Article, documentation: Some( "An article in a journal, magazine, newspaper, or other periodical which forms a \n self-contained unit with its own title. The title of the periodical is given in the \n journaltitle field. If the issue has its own title in addition to the main title of \n the periodical, it goes in the issuetitle field. Note that editor and related \n fields refer to the journal while translator and related fields refer to the article.\n\nRequired fields: `author`, `title`, `journaltitle`, `year/date`", ), }, BibtexEntryType { name: "@book", category: BibtexEntryTypeCategory::Book, documentation: Some( "A single-volume book with one or more authors where the authors share credit for\n the work as a whole. This entry type also covers the function of the `@inbook` type\n of traditional BibTeX.\n\nRequired fields: `author`, `title`, `year/date`", ), }, BibtexEntryType { name: "@mvbook", category: BibtexEntryTypeCategory::Book, documentation: Some( "A multi-volume `@book`. For backwards compatibility, multi-volume books are also\n supported by the entry type `@book`. However, it is advisable to make use of the\n dedicated entry type `@mvbook`.\n\nRequired fields: `author`, `title`, `year/date`", ), }, BibtexEntryType { name: "@inbook", category: BibtexEntryTypeCategory::Part, documentation: Some( "A part of a book which forms a self-contained unit with its own title. Note that the\n profile of this entry type is different from standard BibTeX.\n\nRequired fields: `author`, `title`, `booktitle`, `year/date`", ), }, BibtexEntryType { name: "@bookinbook", category: BibtexEntryTypeCategory::Part, documentation: Some( "This type is similar to `@inbook` but intended for works originally published as a\n stand-alone book. A typical example are books reprinted in the collected works of\n an author.", ), }, BibtexEntryType { name: "@suppbook", category: BibtexEntryTypeCategory::Book, documentation: Some( "Supplemental material in a `@book`. This type is closely related to the `@inbook`\n entry type. While `@inbook` is primarily intended for a part of a book with its own\n title (e. g., a single essay in a collection of essays by the same author), this type is\n provided for elements such as prefaces, introductions, forewords, afterwords, etc.\n which often have a generic title only. Style guides may require such items to be\n formatted differently from other `@inbook` items. The standard styles will treat this\n entry type as an alias for `@inbook`.", ), }, BibtexEntryType { name: "@booklet", category: BibtexEntryTypeCategory::Book, documentation: Some( "A book-like work without a formal publisher or sponsoring institution. Use the field\n howpublished to supply publishing information in free format, if applicable. The\n field type may be useful as well.\n\nRequired fields: `author/editor`, `title`, `year/date`", ), }, BibtexEntryType { name: "@collection", category: BibtexEntryTypeCategory::Collection, documentation: Some( "A single-volume collection with multiple, self-contained contributions by distinct\n authors which have their own title. The work as a whole has no overall author but it\n will usually have an editor.\n\nRequired fields: `editor`, `title`, `year/date`", ), }, BibtexEntryType { name: "@mvcollection", category: BibtexEntryTypeCategory::Collection, documentation: Some( "A multi-volume `@collection`. For backwards compatibility, multi-volume collections\n are also supported by the entry type `@collection`. However, it is advisable\n to make use of the dedicated entry type `@mvcollection`.\n\nRequired fields: `editor`, `title`, `year/date`", ), }, BibtexEntryType { name: "@incollection", category: BibtexEntryTypeCategory::Part, documentation: Some( "A contribution to a collection which forms a self-contained unit with a distinct author\n and title. The `author` refers to the `title`, the `editor` to the `booktitle`, i. e.,\n the title of the collection.\n\nRequired fields: `author`, `title`, `booktitle`, `year/date`", ), }, BibtexEntryType { name: "@suppcollection", category: BibtexEntryTypeCategory::Collection, documentation: Some( "Supplemental material in a `@collection`. This type is similar to `@suppbook` but\n related to the `@collection` entry type. The standard styles will treat this entry\n type as an alias for `@incollection`.", ), }, BibtexEntryType { name: "@manual", category: BibtexEntryTypeCategory::Misc, documentation: Some( "Technical or other documentation, not necessarily in printed form. The author or\n editor is omissible.\n\nRequired fields: `author/editor`, `title`, `year/date`", ), }, BibtexEntryType { name: "@misc", category: BibtexEntryTypeCategory::Misc, documentation: Some( "A fallback type for entries which do not fit into any other category. Use the field\n howpublished to supply publishing information in free format, if applicable. The\n field type may be useful as well. author, editor, and year are omissible.\n\nRequired fields: `author/editor`, `title`, `year/date`", ), }, BibtexEntryType { name: "@online", category: BibtexEntryTypeCategory::Misc, documentation: Some( "An online resource. `author`, `editor`, and `year` are omissible.\n This entry type is intended for sources such as web sites which are intrinsically\n online resources. Note that all entry types support the url field. For example, when\n adding an article from an online journal, it may be preferable to use the `@article`\n type and its url field.\n\nRequired fields: `author/editor`, `title`, `year/date`, `url`", ), }, BibtexEntryType { name: "@patent", category: BibtexEntryTypeCategory::Misc, documentation: Some( "A patent or patent request. The number or record token is given in the number\n field. Use the type field to specify the type and the location field to indicate the\n scope of the patent, if different from the scope implied by the type. Note that the\n location field is treated as a key list with this entry type.\n\nRequired fields: `author`, `title`, `number`, `year/date`", ), }, BibtexEntryType { name: "@periodical", category: BibtexEntryTypeCategory::Misc, documentation: Some( "An complete issue of a periodical, such as a special issue of a journal. The title of\n the periodical is given in the title field. If the issue has its own title in addition to\n the main title of the periodical, it goes in the issuetitle field. The editor is\n omissible.\n\nRequired fields: `editor`, `title`, `year/date`", ), }, BibtexEntryType { name: "@suppperiodical", category: BibtexEntryTypeCategory::Misc, documentation: Some( "Supplemental material in a `@periodical`. This type is similar to `@suppbook`\n but related to the `@periodical` entry type. The role of this entry type may be\n more obvious if you bear in mind that the `@article` type could also be called\n `@inperiodical`. This type may be useful when referring to items such as regular\n columns, obituaries, letters to the editor, etc. which only have a generic title. Style\n guides may require such items to be formatted differently from articles in the strict\n sense of the word. The standard styles will treat this entry type as an alias for\n `@article`.", ), }, BibtexEntryType { name: "@proceedings", category: BibtexEntryTypeCategory::Book, documentation: Some( "A single-volume conference proceedings. This type is very similar to `@collection`.\n It supports an optional organization field which holds the sponsoring institution.\n The editor is omissible.\n\nRequired fields: `title`, `year/date`", ), }, BibtexEntryType { name: "@mvproceedings", category: BibtexEntryTypeCategory::Book, documentation: Some( "A multi-volume `@proceedings` entry. For backwards compatibility, multi-volume\n proceedings are also supported by the entry type `@proceedings`. However, it is\n advisable to make use of the dedicated entry type `@mvproceedings`\n\nRequired fields: `title`, `year/date`", ), }, BibtexEntryType { name: "@inproceedings", category: BibtexEntryTypeCategory::Part, documentation: Some( "An article in a conference proceedings. This type is similar to `@incollection`. It\n supports an optional `organization` field.\n\nRequired fields: `author`, `title`, `booktitle`, `year/date`", ), }, BibtexEntryType { name: "@reference", category: BibtexEntryTypeCategory::Collection, documentation: Some( "A single-volume work of reference such as an encyclopedia or a dictionary. This is a\n more specific variant of the generic `@collection` entry type. The standard styles\n will treat this entry type as an alias for `@collection`.", ), }, BibtexEntryType { name: "@mvreference", category: BibtexEntryTypeCategory::Collection, documentation: Some( "A multi-volume `@reference` entry. The standard styles will treat this entry type\n as an alias for `@mvcollection`. For backwards compatibility, multi-volume references\n are also supported by the entry type `@reference`. However, it is advisable\n to make use of the dedicated entry type `@mvreference`.", ), }, BibtexEntryType { name: "@inreference", category: BibtexEntryTypeCategory::Part, documentation: Some( "An article in a work of reference. This is a more specific variant of the generic\n `@incollection` entry type. The standard styles will treat this entry type as an\n alias for `@incollection`.", ), }, BibtexEntryType { name: "@report", category: BibtexEntryTypeCategory::Misc, documentation: Some( "A technical report, research report, or white paper published by a university or some\n other institution. Use the `type` field to specify the type of report. The sponsoring\n institution goes in the `institution` field.\n\nRequired fields: `author`, `title`, `type`, `institution`, `year/date`", ), }, BibtexEntryType { name: "@set", category: BibtexEntryTypeCategory::Misc, documentation: Some("An entry set. This entry type is special."), }, BibtexEntryType { name: "@thesis", category: BibtexEntryTypeCategory::Thesis, documentation: Some( "A thesis written for an educational institution to satisfy the requirements for a degree.\n Use the `type` field to specify the type of thesis.\n\nRequired fields: `author`, `title`, `type`, `institution`, `year/date`", ), }, BibtexEntryType { name: "@unpublished", category: BibtexEntryTypeCategory::Misc, documentation: Some( "A work with an author and a title which has not been formally published, such as\n a manuscript or the script of a talk. Use the fields `howpublished` and `note` to\n supply additional information in free format, if applicable.\n\nRequired fields: `author`, `title`, `year/date`", ), }, BibtexEntryType { name: "@xdata", category: BibtexEntryTypeCategory::Misc, documentation: Some( "This entry type is special. `@xdata` entries hold data which may be inherited by other\n entries using the `xdata` field. Entries of this type only serve as data containers;\n they may not be cited or added to the bibliography.", ), }, BibtexEntryType { name: "@conference", category: BibtexEntryTypeCategory::Part, documentation: Some("A legacy alias for `@inproceedings`."), }, BibtexEntryType { name: "@electronic", category: BibtexEntryTypeCategory::Misc, documentation: Some("An alias for `@online`."), }, BibtexEntryType { name: "@mastersthesis", category: BibtexEntryTypeCategory::Thesis, documentation: Some( "Similar to `@thesis` except that the `type` field is optional and defaults to the\n localised term ‘Master’s thesis’. You may still use the `type` field to override that.", ), }, BibtexEntryType { name: "@phdthesis", category: BibtexEntryTypeCategory::Thesis, documentation: Some( "Similar to `@thesis` except that the `type` field is optional and defaults to the\n localised term ‘PhD thesis’. You may still use the `type` field to override that.", ), }, BibtexEntryType { name: "@techreport", category: BibtexEntryTypeCategory::Misc, documentation: Some( "Similar to `@report` except that the `type` field is optional and defaults to the\n localised term ‘technical report’. You may still use the `type` field to override that.", ), }, BibtexEntryType { name: "@www", category: BibtexEntryTypeCategory::Misc, documentation: Some("An alias for `@online`, provided for `jurabib` compatibility."), }, BibtexEntryType { name: "@artwork", category: BibtexEntryTypeCategory::Misc, documentation: Some( "Works of the visual arts such as paintings, sculpture, and installations.", ), }, BibtexEntryType { name: "@audio", category: BibtexEntryTypeCategory::Misc, documentation: Some( "Audio recordings, typically on audio cd, dvd, audio cassette, or similar media. See\n also `@music`.", ), }, BibtexEntryType { name: "@bibnote", category: BibtexEntryTypeCategory::Misc, documentation: Some( "This special entry type is not meant to be used in the `bib` file like other types. It is\n provided for third-party packages like `notes2bib` which merge notes into the bibliography.\n The notes should go into the `note` field. Be advised that the `@bibnote`\n type is not related to the `defbibnote` command in any way. `defbibnote`\n is for adding comments at the beginning or the end of the bibliography, whereas\n the `@bibnote` type is meant for packages which render endnotes as bibliography\n entries.", ), }, BibtexEntryType { name: "@commentary", category: BibtexEntryTypeCategory::Misc, documentation: Some( "Commentaries which have a status different from regular books, such as legal commentaries.", ), }, BibtexEntryType { name: "@image", category: BibtexEntryTypeCategory::Misc, documentation: Some("Images, pictures, photographs, and similar media."), }, BibtexEntryType { name: "@jurisdiction", category: BibtexEntryTypeCategory::Misc, documentation: Some("Court decisions, court recordings, and similar things."), }, BibtexEntryType { name: "@legislation", category: BibtexEntryTypeCategory::Misc, documentation: Some("Laws, bills, legislative proposals, and similar things."), }, BibtexEntryType { name: "@legal", category: BibtexEntryTypeCategory::Misc, documentation: Some("Legal documents such as treaties."), }, BibtexEntryType { name: "@letter", category: BibtexEntryTypeCategory::Misc, documentation: Some("Personal correspondence such as letters, emails, memoranda, etc."), }, BibtexEntryType { name: "@movie", category: BibtexEntryTypeCategory::Misc, documentation: Some("Motion pictures. See also `@video`."), }, BibtexEntryType { name: "@music", category: BibtexEntryTypeCategory::Misc, documentation: Some("Musical recordings. This is a more specific variant of `@audio`."), }, BibtexEntryType { name: "@performance", category: BibtexEntryTypeCategory::Misc, documentation: Some( "Musical and theatrical performances as well as other works of the performing arts.\n This type refers to the event as opposed to a recording, a score, or a printed play.", ), }, BibtexEntryType { name: "@review", category: BibtexEntryTypeCategory::Misc, documentation: Some( "Reviews of some other work. This is a more specific variant of the `@article` type.\n The standard styles will treat this entry type as an alias for `@article`.", ), }, BibtexEntryType { name: "@software", category: BibtexEntryTypeCategory::Misc, documentation: Some("Computer software."), }, BibtexEntryType { name: "@standard", category: BibtexEntryTypeCategory::Misc, documentation: Some( "National and international standards issued by a standards body such as the International\n Organization for Standardization.", ), }, BibtexEntryType { name: "@video", category: BibtexEntryTypeCategory::Misc, documentation: Some( "Audiovisual recordings, typically on dvd, vhs cassette, or similar media. See also\n `@movie`.", ), }, ]; pub static BIBTEX_FIELD_TYPES: &[BibtexFieldType<'static>] = &[ BibtexFieldType { name: "abstract", documentation: "This field is intended for recording abstracts in a bib file, to be printed by a special bibliography style. It is not used by all standard bibliography styles.", }, BibtexFieldType { name: "addendum", documentation: "Miscellaneous bibliographic data to be printed at the end of the entry. This is similar to the `note` field except that it is printed at the end of the bibliography entry.", }, BibtexFieldType { name: "afterword", documentation: "The author(s) of an afterword to the work. If the author of the afterword is identical to the `editor` and/or `translator`, the standard styles will automatically concatenate these fields in the bibliography. See also `introduction` and `foreword`.", }, BibtexFieldType { name: "annotation", documentation: "This field may be useful when implementing a style for annotated bibliographies. It is not used by all standard bibliography styles. Note that this field is completely unrelated to `annotator`. The `annotator` is the author of annotations which are part of the work cited.", }, BibtexFieldType { name: "annotator", documentation: "The author(s) of annotations to the work. If the annotator is identical to the `editor` and/or `translator`, the standard styles will automatically concatenate these fields in the bibliography. See also `commentator`.", }, BibtexFieldType { name: "author", documentation: "The author(s) of the `title`.", }, BibtexFieldType { name: "authortype", documentation: "The type of author. This field will affect the string (if any) used to introduce the author. Not used by the standard bibliography styles.", }, BibtexFieldType { name: "bookauthor", documentation: "The author(s) of the `booktitle`.", }, BibtexFieldType { name: "bookpagination", documentation: "If the work is published as part of another one, this is the pagination scheme of the enclosing work, i. e., `bookpagination` relates to `pagination` like `booktitle` to `title`. The value of this field will affect the formatting of the `pages` and `pagetotal` fields. The key should be given in the singular form. Possible keys are `page`, `column`, `line`, `verse`, `section`, and `paragraph`. See also `pagination`.", }, BibtexFieldType { name: "booksubtitle", documentation: "The subtitle related to the `booktitle`. If the subtitle field refers to a work which is part of a larger publication, a possible subtitle of the main work is given in this field. See also `subtitle`.", }, BibtexFieldType { name: "booktitle", documentation: "If the `title` field indicates the title of a work which is part of a larger publication, the title of the main work is given in this field. See also `title`.", }, BibtexFieldType { name: "booktitleaddon", documentation: "An annex to the `booktitle`, to be printed in a different font.", }, BibtexFieldType { name: "chapter", documentation: "A chapter or section or any other unit of a work.", }, BibtexFieldType { name: "commentator", documentation: "The author(s) of a commentary to the work. Note that this field is intended for commented editions which have a commentator in addition to the author. If the work is a stand-alone commentary, the commentator should be given in the `author` field. If the commentator is identical to the `editor` and/or `translator`, the standard styles will automatically concatenate these fields in the bibliography. See also `annotator`.", }, BibtexFieldType { name: "date", documentation: "The publication date. See also `month` and `year`.", }, BibtexFieldType { name: "doi", documentation: "The Digital Object Identifier of the work.", }, BibtexFieldType { name: "edition", documentation: "The edition of a printed publication. This must be an integer, not an ordinal. Don’t say `edition={First}` or `edition={1st}` but `edition={1}`. The bibliography style converts this to a language dependent ordinal. It is also possible to give the edition as a literal string, for example \"Third, revised and expanded edition\".", }, BibtexFieldType { name: "editor", documentation: "The editor(s) of the `title`, `booktitle`, or `maintitle`, depending on the entry type. Use the `editortype` field to specify the role if it is different from `editor`.", }, BibtexFieldType { name: "editora", documentation: "A secondary editor performing a different editorial role, such as compiling, redacting, etc. Use the `editoratype` field to specify the role.", }, BibtexFieldType { name: "editorb", documentation: "Another secondary editor performing a different role. Use the `editorbtype` field to specify the role.", }, BibtexFieldType { name: "editorc", documentation: "Another secondary editor performing a different role. Use the `editorctype` field to specify the role.", }, BibtexFieldType { name: "editortype", documentation: "The type of editorial role performed by the `editor`. Roles supported by default are `editor`, `compiler`, `founder`, `continuator`, `redactor`, `reviser`, `collaborator`, `organizer`. The role `editor` is the default. In this case, the field is omissible.", }, BibtexFieldType { name: "editoratype", documentation: "Similar to `editortype` but referring to the `editora` field.", }, BibtexFieldType { name: "editorbtype", documentation: "Similar to `editortype` but referring to the `editorb` field.", }, BibtexFieldType { name: "editorctype", documentation: "Similar to `editortype` but referring to the `editorc` field.", }, BibtexFieldType { name: "eid", documentation: "The electronic identifier of an `@article`.", }, BibtexFieldType { name: "entrysubtype", documentation: "This field, which is not used by the standard styles, may be used to specify a subtype of an entry type. This may be useful for bibliography styles which support a finergrained set of entry types.", }, BibtexFieldType { name: "eprint", documentation: "The electronic identifier of an online publication. This is roughly comparable to a doi but specific to a certain archive, repository, service, or system. See also `eprinttype` and `eprintclass`.", }, BibtexFieldType { name: "eprintclass", documentation: "Additional information related to the resource indicated by the `eprinttype` field. This could be a section of an archive, a path indicating a service, a classification of some sort, etc. See also`eprint` and `eprinttype`.", }, BibtexFieldType { name: "eprinttype", documentation: "The type of `eprint` identifier, e. g., the name of the archive, repository, service, or system the `eprint` field refers to. See also `eprint` and `eprintclass`.", }, BibtexFieldType { name: "eventdate", documentation: "The date of a conference, a symposium, or some other event in `@proceedings` and `@inproceedings` entries. See also `eventtitle` and `venue`.", }, BibtexFieldType { name: "eventtitle", documentation: "The title of a conference, a symposium, or some other event in `@proceedings` and `@inproceedings` entries. Note that this field holds the plain title of the event. Things like \"Proceedings of the Fifth XYZ Conference\" go into the `titleaddon` or `booktitleaddon` field, respectively. See also `eventdate` and `venue`.", }, BibtexFieldType { name: "eventtitleaddon", documentation: "An annex to the `eventtitle` field. Can be used for known event acronyms, for example.", }, BibtexFieldType { name: "file", documentation: "A local link to a PDF or other version of the work. Not used by the standard bibliography styles.", }, BibtexFieldType { name: "foreword", documentation: "The author(s) of a foreword to the work. If the author of the foreword is identical to the `editor` and/or `translator`, the standard styles will automatically concatenate these fields in the bibliography. See also `introduction` and `afterword`.", }, BibtexFieldType { name: "holder", documentation: "The holder(s) of a `@patent`, if different from the `author`. Note that corporate holders need to be wrapped in an additional set of braces.", }, BibtexFieldType { name: "howpublished", documentation: "A publication notice for unusual publications which do not fit into any of the common categories.", }, BibtexFieldType { name: "indextitle", documentation: "A title to use for indexing instead of the regular `title` field. This field may be useful if you have an entry with a title like \"An Introduction to …\" and want that indexed as \"Introduction to …, An\". Style authors should note that `biblatex` automatically copies the value of the `title` field to `indextitle` if the latter field is undefined.", }, BibtexFieldType { name: "institution", documentation: "The name of a university or some other institution, depending on the entry type. Traditional BibTeX uses the field name `school` for theses, which is supported as an alias.", }, BibtexFieldType { name: "introduction", documentation: "The author(s) of an introduction to the work. If the author of the introduction is identical to the `editor` and/or `translator`, the standard styles will automatically concatenate these fields in the bibliography. See also `foreword` and `afterword`.", }, BibtexFieldType { name: "isan", documentation: "The International Standard Audiovisual Number of an audiovisual work. Not used by the standard bibliography styles.", }, BibtexFieldType { name: "isbn", documentation: "The International Standard Book Number of a book.", }, BibtexFieldType { name: "ismn", documentation: "The International Standard Music Number for printed music such as musical scores. Not used by the standard bibliography styles.", }, BibtexFieldType { name: "isrn", documentation: "The International Standard Technical Report Number of a technical report.", }, BibtexFieldType { name: "issn", documentation: "The International Standard Serial Number of a periodical.", }, BibtexFieldType { name: "issue", documentation: "The issue of a journal. This field is intended for journals whose individual issues are identified by a designation such as ‘Spring’ or ‘Summer’ rather than the month or a number. The placement of `issue` is similar to `month` and `number`, integer ranges and short designators are better written to the number field. See also `month` and `number`.", }, BibtexFieldType { name: "issuesubtitle", documentation: "The subtitle of a specific issue of a journal or other periodical.", }, BibtexFieldType { name: "issuetitle", documentation: "The title of a specific issue of a journal or other periodical.", }, BibtexFieldType { name: "iswc", documentation: "The International Standard Work Code of a musical work. Not used by the standard bibliography styles.", }, BibtexFieldType { name: "journalsubtitle", documentation: "The subtitle of a journal, a newspaper, or some other periodical.", }, BibtexFieldType { name: "journaltitle", documentation: "The name of a journal, a newspaper, or some other periodical.", }, BibtexFieldType { name: "label", documentation: "A designation to be used by the citation style as a substitute for the regular label if any data required to generate the regular label is missing. For example, when an author-year citation style is generating a citation for an entry which is missing the author or the year, it may fall back to `label`. Note that, in contrast to `shorthand`, `label` is only used as a fallback. See also `shorthand`.", }, BibtexFieldType { name: "language", documentation: "The language(s) of the work. Languages may be specified literally or as localisation keys. If localisation keys are used, the prefix lang is omissible. See also `origlanguage`.", }, BibtexFieldType { name: "library", documentation: "This field may be useful to record information such as a library name and a call number. This may be printed by a special bibliography style if desired. Not used by the standard bibliography styles.", }, BibtexFieldType { name: "location", documentation: "The place(s) of publication, i. e., the location of the `publisher` or `institution`, depending on the entry type. Traditional BibTeX uses the field name `address`, which is supported as an alias. With `@patent` entries, this list indicates the scope of a patent.", }, BibtexFieldType { name: "mainsubtitle", documentation: "The subtitle related to the `maintitle`. See also `subtitle`.", }, BibtexFieldType { name: "maintitle", documentation: "The main title of a multi-volume book, such as *Collected Works*. If the `title` or `booktitle` field indicates the title of a single volume which is part of multi-volume book, the title of the complete work is given in this field.", }, BibtexFieldType { name: "maintitleaddon", documentation: "An annex to the `maintitle`, to be printed in a different font.", }, BibtexFieldType { name: "month", documentation: "The publication month. This must be an integer, not an ordinal or a string. Don’t say `month={January}` but `month={1}`. The bibliography style converts this to a language dependent string or ordinal where required. This field is a literal field only when given explicitly in the data (for plain BibTeX compatibility for example). It is however better to use the `date` field as this supports many more features.", }, BibtexFieldType { name: "nameaddon", documentation: "An addon to be printed immediately after the author name in the bibliography. Not used by the standard bibliography styles. This field may be useful to add an alias or pen name (or give the real name if the pseudonym is commonly used to refer to that author).", }, BibtexFieldType { name: "note", documentation: "Miscellaneous bibliographic data which does not fit into any other field. The note field may be used to record bibliographic data in a free format. Publication facts such as \"Reprint of the edition London 1831\" are typical candidates for the note field. See also `addendum`.", }, BibtexFieldType { name: "number", documentation: "The number of a journal or the volume/number of a book in a `series`. See also `issue`. With `@patent` entries, this is the number or record token of a patent or patent request. Normally this field will be an integer or an integer range, but in certain cases it may also contain \"S1\", \"Suppl. 1\", in these cases the output should be scrutinised carefully.", }, BibtexFieldType { name: "organization", documentation: "The organization(s) that published a `@manual` or an `@online` resource, or sponsored a conference.", }, BibtexFieldType { name: "origdate", documentation: "If the work is a translation, a reprint, or something similar, the publication date of the original edition. Not used by the standard bibliography styles. See also `date`.", }, BibtexFieldType { name: "origlanguage", documentation: "If the work is a translation, the language(s) of the original work. See also `language`.", }, BibtexFieldType { name: "origlocation", documentation: "If the work is a translation, a reprint, or something similar, the location of the original edition. Not used by the standard bibliography styles. See also `location`.", }, BibtexFieldType { name: "origpublisher", documentation: "If the work is a translation, a reprint, or something similar, the publisher of the original edition. Not used by the standard bibliography styles. See also `publisher`.", }, BibtexFieldType { name: "origtitle", documentation: "If the work is a translation, the `title` of the original work. Not used by the standard bibliography styles. See also `title`.", }, BibtexFieldType { name: "pages", documentation: "One or more page numbers or page ranges. If the work is published as part of another one, such as an article in a journal or a collection, this field holds the relevant page range in that other work. It may also be used to limit the reference to a specific part of a work (a chapter in a book, for example).", }, BibtexFieldType { name: "pagetotal", documentation: "The total number of pages of the work.", }, BibtexFieldType { name: "pagination", documentation: "The pagination of the work. The value of this field will affect the formatting the *postnote* argument to a citation command. The key should be given in the singular form. Possible keys are `page`, `column`, `line`, `verse`, `section`, and `paragraph`. See also `bookpagination`.", }, BibtexFieldType { name: "part", documentation: "The number of a partial volume. This field applies to books only, not to journals. It may be used when a logical volume consists of two or more physical ones. In this case the number of the logical volume goes in the `volume` field and the number of the part of that volume in the `part` field. See also `volume`.", }, BibtexFieldType { name: "publisher", documentation: "The name(s) of the publisher(s).", }, BibtexFieldType { name: "pubstate", documentation: "The publication state of the work, e. g., 'in press'.", }, BibtexFieldType { name: "reprinttitle", documentation: "The title of a reprint of the work. Not used by the standard styles.", }, BibtexFieldType { name: "series", documentation: "The name of a publication series, such as \"Studies in …\", or the number of a journal series. Books in a publication series are usually numbered. The number or volume of a book in a series is given in the `number` field. Note that the `@article` entry type makes use of the `series` field as well, but handles it in a special way.", }, BibtexFieldType { name: "shortauthor", documentation: "The author(s) of the work, given in an abbreviated form. This field is mainly intended for abbreviated forms of corporate authors.", }, BibtexFieldType { name: "shorteditor", documentation: "The editor(s) of the work, given in an abbreviated form. This field is mainly intended for abbreviated forms of corporate editors.", }, BibtexFieldType { name: "shorthand", documentation: "A special designation to be used by the citation style instead of the usual label. If defined, it overrides the default label. See also `label`.", }, BibtexFieldType { name: "shorthandintro", documentation: "The verbose citation styles which comes with this package use a phrase like \"henceforth cited as [shorthand]\" to introduce shorthands on the first citation. If the `shorthandintro` field is defined, it overrides the standard phrase. Note that the alternative phrase must include the shorthand.", }, BibtexFieldType { name: "shortjournal", documentation: "A short version or an acronym of the `journaltitle`. Not used by the standard bibliography styles.", }, BibtexFieldType { name: "shortseries", documentation: "A short version or an acronym of the `series` field. Not used by the standard bibliography styles.", }, BibtexFieldType { name: "shorttitle", documentation: "The title in an abridged form. This field is usually not included in the bibliography. It is intended for citations in author-title format. If present, the author-title citation styles use this field instead of `title`.", }, BibtexFieldType { name: "subtitle", documentation: "The subtitle of the work.", }, BibtexFieldType { name: "title", documentation: "The title of the work.", }, BibtexFieldType { name: "titleaddon", documentation: "An annex to the `title`, to be printed in a different font.", }, BibtexFieldType { name: "translator", documentation: "The translator(s) of the `title` or `booktitle`, depending on the entry type. If the translator is identical to the `editor`, the standard styles will automatically concatenate these fields in the bibliography.", }, BibtexFieldType { name: "type", documentation: "The type of a `manual`, `patent`, `report`, or `thesis`.", }, BibtexFieldType { name: "url", documentation: "The URL of an online publication. If it is not URL-escaped (no ‘%’ chars) it will be URI-escaped according to RFC 3987, that is, even Unicode chars will be correctly escaped.", }, BibtexFieldType { name: "urldate", documentation: "The access date of the address specified in the `url` field.", }, BibtexFieldType { name: "venue", documentation: "The location of a conference, a symposium, or some other event in `@proceedings` and `@inproceedings` entries. Note that the `location` list holds the place of publication. It therefore corresponds to the `publisher` and `institution` lists. The location of the event is given in the `venue` field. See also `eventdate` and `eventtitle`.", }, BibtexFieldType { name: "version", documentation: "The revision number of a piece of software, a manual, etc.", }, BibtexFieldType { name: "volume", documentation: "The volume of a multi-volume book or a periodical. It is expected to be an integer, not necessarily in arabic numerals since `biber` will automatically from roman numerals or arabic letter to integers internally for sorting purposes. See also `part`. See the `noroman` option which can be used to suppress roman numeral parsing. This can help in cases where there is an ambiguity between parsing as roman numerals or alphanumeric (e.g. ‘C’).", }, BibtexFieldType { name: "volumes", documentation: "The total number of volumes of a multi-volume work. Depending on the entry type, this field refers to `title` or `maintitle`. It is expected to be an integer, not necessarily in arabic numerals since `biber` will automatically from roman numerals or arabic letter to integers internally for sorting purposes. See the `noroman` option which can be used to suppress roman numeral parsing. This can help in cases where there is an ambiguity between parsing as roman numerals or alphanumeric (e.g. ‘C’).", }, BibtexFieldType { name: "year", documentation: "The year of publication. This field is a literal field only when given explicitly in the data (for plain BibTeX compatibility for example). It is however better to use the `date` field as this is compatible with plain years too and supports many more features.", }, BibtexFieldType { name: "crossref", documentation: "This field holds an entry key for the cross-referencing feature. Child entries with a `crossref` field inherit data from the parent entry specified in the `crossref` field. If the number of child entries referencing a specific parent entry hits a certain threshold, the parent entry is automatically added to the bibliography even if it has not been cited explicitly. The threshold is settable with the `mincrossrefs` package option. Style authors should note that whether or not the `crossref` fields of the child entries are defined on the `biblatex` level depends on the availability of the parent entry. If the parent entry is available, the `crossref` fields of the child entries will be defined. If not, the child entries still inherit the data from the parent entry but their `crossref` fields will be undefined. Whether the parent entry is added to the bibliography implicitly because of the threshold or explicitly because it has been cited does not matter. See also the `xref` field.", }, BibtexFieldType { name: "entryset", documentation: "This field is specific to entry sets. This field is consumed by the backend processing and does not appear in the `.bbl`.", }, BibtexFieldType { name: "execute", documentation: "A special field which holds arbitrary TeX code to be executed whenever the data of the respective entry is accessed. This may be useful to handle special cases. Conceptually, this field is comparable to the hooks `AtEveryBibitem`, `AtEveryLositem`, and `AtEveryCitekey`, except that it is definable on a per-entry basis in the `bib` file. Any code in this field is executed automatically immediately after these hooks.", }, BibtexFieldType { name: "gender", documentation: "The gender of the author or the gender of the editor, if there is no author. The following identifiers are supported: `sf` (feminine singular, a single female name), `sm` (masculine singular, a single male name), `sn` (neuter singular, a single neuter name), `pf` (feminine plural, a list of female names), `pm` (masculine plural, a list of male names), `pn` (neuter plural, a list of neuter names),`pp` (plural, a mixed gender list of names). This information is only required by special bibliography and citation styles and only in certain languages. For example, a citation style may replace recurrent author names with a term such as 'idem'. If the Latin word is used, as is custom in English and French, there is no need to specify the gender. In German publications, however, such key terms are usually given in German and in this case they are gender-sensitive.", }, BibtexFieldType { name: "langid", documentation: "The language id of the bibliography entry. The alias `hyphenation` is provided for backwards compatibility. The identifier must be a language name known to the `babel/polyglossia` packages. This information may be used to switch hyphenation patterns and localise strings in the bibliography. Note that the language names are case sensitive. The languages currently supported by this package are given in table 2. Note that `babel` treats the identifier `english` as an alias for `british` or `american`, depending on the `babel` version. The `biblatex` package always treats it as an alias for `american`. It is preferable to use the language identifiers `american` and `british` (`babel`) or a language specific option to specify a language variant (`polyglossia`, using the `langidopts` field) to avoid any possible confusion.", }, BibtexFieldType { name: "langidopts", documentation: "For `polyglossia` users, allows per-entry language specific options. The literal value of this field is passed to `polyglossia`’s language switching facility when using the package option `autolang=langname`.", }, BibtexFieldType { name: "ids", documentation: "Citation key aliases for the main citation key. An entry may be cited by any of its aliases and `biblatex` will treat the citation as if it had used the primary citation key. This is to aid users who change their citation keys but have legacy documents which use older keys for the same entry. This field is consumed by the backend processing and does not appear in the `.bbl`.", }, BibtexFieldType { name: "indexsorttitle", documentation: "The title used when sorting the index. In contrast to indextitle, this field is used for sorting only. The printed title in the index is the indextitle or the title field. This field may be useful if the title contains special characters or commands which interfere with the sorting of the index. Style authors should note that biblatex automatically copies the value of either the indextitle or the title field to indexsorttitle if the latter field is undefined.", }, BibtexFieldType { name: "keywords", documentation: "A separated list of keywords. These keywords are intended for the bibliography filters, they are usually not printed. Note that with the default separator (comma), spaces around the separator are ignored.", }, BibtexFieldType { name: "options", documentation: "A separated list of entry options in *key*=*value* notation. This field is used to set options on a per-entry basis. Note that citation and bibliography styles may define additional entry options.", }, BibtexFieldType { name: "presort", documentation: "A special field used to modify the sorting order of the bibliography. This field is the first item the sorting routine considers when sorting the bibliography, hence it may be used to arrange the entries in groups. This may be useful when creating subdivided bibliographies with the bibliography filters. This field is consumed by the backend processing and does not appear in the `.bbl`.", }, BibtexFieldType { name: "related", documentation: "Citation keys of other entries which have a relationship to this entry. The relationship is specified by the `relatedtype` field.", }, BibtexFieldType { name: "relatedoptions", documentation: "Per-type options to set for a related entry. Note that this does not set the options on the related entry itself, only the `dataonly` clone which is used as a datasource for the parent entry.", }, BibtexFieldType { name: "relatedtype", documentation: "An identifier which specified the type of relationship for the keys listed in the `related` field. The identifier is a localised bibliography string printed before the data from the related entry list. It is also used to identify type-specific formatting directives and bibliography macros for the related entries.", }, BibtexFieldType { name: "relatedstring", documentation: "A field used to override the bibliography string specified by `relatedtype`.", }, BibtexFieldType { name: "sortkey", documentation: "A field used to modify the sorting order of the bibliography. Think of this field as the master sort key. If present, `biblatex` uses this field during sorting and ignores everything else, except for the presort field. This field is consumed by the backend processing and does not appear in the `.bbl`.", }, BibtexFieldType { name: "sortname", documentation: "A name or a list of names used to modify the sorting order of the bibliography. If present, this list is used instead of `author` or `editor` when sorting the bibliography. This field is consumed by the backend processing and does not appear in the `.bbl`.", }, BibtexFieldType { name: "sortshorthand", documentation: "Similar to sortkey but used in the list of shorthands. If present, biblatex uses this field instead of shorthand when sorting the list of shorthands. This is useful if the shorthand field holds shorthands with formatting commands such as `emph` or `\textbf`. This field is consumed by the backend processing and does not appear in the `.bbl`.", }, BibtexFieldType { name: "sorttitle", documentation: "A field used to modify the sorting order of the bibliography. If present, this field is used instead of the title field when sorting the bibliography. The sorttitle field may come in handy if you have an entry with a title like \"An Introduction to…\" and want that alphabetized under ‘I’ rather than ‘A’. In this case, you could put \"Introduction to…\" in the sorttitle field. This field is consumed by the backend processing and does not appear in the `.bbl`.", }, BibtexFieldType { name: "sortyear", documentation: "A field used to modify the sorting order of the bibliography. In the default sorting templates, if this field is present, it is used instead of the year field when sorting the bibliography. This field is consumed by the backend processing and does not appear in the `.bbl`.", }, BibtexFieldType { name: "xdata", documentation: "This field inherits data from one or more `@xdata` entries. Conceptually, the `xdata` field is related to crossref and xref: `crossref` establishes a logical parent/child relation and inherits data; `xref` establishes as logical parent/child relation without inheriting data; `xdata` inherits data without establishing a relation. The value of the `xdata` may be a single entry key or a separated list of keys. This field is consumed by the backend processing and does not appear in the `.bbl`.", }, BibtexFieldType { name: "xref", documentation: "This field is an alternative cross-referencing mechanism. It differs from `crossref` in that the child entry will not inherit any data from the parent entry specified in the `xref` field. If the number of child entries referencing a specific parent entry hits a certain threshold, the parent entry is automatically added to the bibliography even if it has not been cited explicitly. The threshold is settable with the `minxrefs` package option. Style authors should note that whether or not the `xref` fields of the child entries are defined on the `biblatex` level depends on the availability of the parent entry. If the parent entry is available, the `xref` fields of the child entries will be defined. If not, their `xref` fields will be undefined. Whether the parent entry is added to the bibliography implicitly because of the threshold or explicitly because it has been cited does not matter. See also the `crossref` field.", }, BibtexFieldType { name: "namea", documentation: "Custom lists for special bibliography styles. Not used by the standard bibliography styles.", }, BibtexFieldType { name: "nameb", documentation: "Custom lists for special bibliography styles. Not used by the standard bibliography styles.", }, BibtexFieldType { name: "namec", documentation: "Custom lists for special bibliography styles. Not used by the standard bibliography styles.", }, BibtexFieldType { name: "nameatype", documentation: "Similar to `authortype` and `editortype` but referring to the fields `name[a--c]`. Not used by the standard bibliography styles.", }, BibtexFieldType { name: "namebtype", documentation: "Similar to `authortype` and `editortype` but referring to the fields `name[a--c]`. Not used by the standard bibliography styles.", }, BibtexFieldType { name: "namectype", documentation: "Similar to `authortype` and `editortype` but referring to the fields `name[a--c]`. Not used by the standard bibliography styles.", }, BibtexFieldType { name: "lista", documentation: "Custom lists for special bibliography styles. Not used by the standard bibliography styles.", }, BibtexFieldType { name: "listb", documentation: "Custom lists for special bibliography styles. Not used by the standard bibliography styles.", }, BibtexFieldType { name: "listc", documentation: "Custom lists for special bibliography styles. Not used by the standard bibliography styles.", }, BibtexFieldType { name: "listd", documentation: "Custom lists for special bibliography styles. Not used by the standard bibliography styles.", }, BibtexFieldType { name: "liste", documentation: "Custom lists for special bibliography styles. Not used by the standard bibliography styles.", }, BibtexFieldType { name: "listf", documentation: "Custom lists for special bibliography styles. Not used by the standard bibliography styles.", }, BibtexFieldType { name: "usera", documentation: "Custom fields for special bibliography styles. Not used by the standard bibliography styles.", }, BibtexFieldType { name: "userb", documentation: "Custom fields for special bibliography styles. Not used by the standard bibliography styles.", }, BibtexFieldType { name: "userc", documentation: "Custom fields for special bibliography styles. Not used by the standard bibliography styles.", }, BibtexFieldType { name: "userd", documentation: "Custom fields for special bibliography styles. Not used by the standard bibliography styles.", }, BibtexFieldType { name: "usere", documentation: "Custom fields for special bibliography styles. Not used by the standard bibliography styles.", }, BibtexFieldType { name: "userf", documentation: "Custom fields for special bibliography styles. Not used by the standard bibliography styles.", }, BibtexFieldType { name: "verba", documentation: "Similar to the custom fields except that these are verbatim fields. Not used by the standard bibliography styles.", }, BibtexFieldType { name: "verbb", documentation: "Similar to the custom fields except that these are verbatim fields. Not used by the standard bibliography styles.", }, BibtexFieldType { name: "verbc", documentation: "Similar to the custom fields except that these are verbatim fields. Not used by the standard bibliography styles.", }, BibtexFieldType { name: "address", documentation: "An alias for `location`, provided for BibTeX compatibility. Traditional BibTeX uses the slightly misleading field name `address` for the place of publication, i. e., the location of the publisher, while `biblatex` uses the generic field name `location`.", }, BibtexFieldType { name: "annote", documentation: "An alias for `annotation`, provided for jurabib compatibility.", }, BibtexFieldType { name: "archiveprefix", documentation: "An alias for `eprinttype`, provided for arXiv compatibility.", }, BibtexFieldType { name: "journal", documentation: "An alias for `journaltitle`, provided for BibTeX compatibility.", }, BibtexFieldType { name: "key", documentation: "An alias for `sortkey`, provided for BibTeX compatibility.", }, BibtexFieldType { name: "pdf", documentation: "An alias for `file`, provided for JabRef compatibility.", }, BibtexFieldType { name: "primaryclass", documentation: "An alias for `eprintclass`, provided for arXiv compatibility.", }, BibtexFieldType { name: "school", documentation: "An alias for `institution`, provided for BibTeX compatibility. The `institution` field is used by traditional BibTeX for technical reports whereas the `school` field holds the institution associated with theses. The `biblatex` package employs the generic field name `institution` in both cases.", }, ]; texlab-5.24.0/crates/base-db/src/deps.rs000066400000000000000000000003331510221113200177120ustar00rootroot00000000000000mod discover; mod graph; mod project; mod root; pub use self::{ discover::{discover, watch}, graph::{DirectLinkData, Edge, EdgeData, Graph, HOME_DIR}, project::{Project, parents}, root::ProjectRoot, }; texlab-5.24.0/crates/base-db/src/deps/000077500000000000000000000000001510221113200173455ustar00rootroot00000000000000texlab-5.24.0/crates/base-db/src/deps/discover.rs000066400000000000000000000067521510221113200215430ustar00rootroot00000000000000use std::path::PathBuf; use distro::Language; use itertools::Itertools; use rustc_hash::FxHashSet; use crate::Workspace; use super::ProjectRoot; pub fn watch( workspace: &mut Workspace, watcher: &mut notify_debouncer_full::Debouncer, watched_dirs: &mut FxHashSet, ) where T: notify::Watcher, C: notify_debouncer_full::FileIdCache, { let roots = workspace .iter() .filter_map(|document| document.dir.as_ref()) .filter(|dir| dir.scheme() == "file") .unique() .map(|dir| ProjectRoot::walk_and_find(workspace, dir)); for root in roots { for uri in [&root.src_dir, &root.aux_dir, &root.log_dir, &root.pdf_dir] { if let Ok(path) = uri.to_file_path() { if watched_dirs.insert(path.clone()) { let _ = watcher.watch(&path, notify::RecursiveMode::NonRecursive); } } } } } pub fn discover(workspace: &mut Workspace, checked_paths: &mut FxHashSet) { loop { let mut changed = false; changed |= discover_parents(workspace, checked_paths); changed |= discover_children(workspace, checked_paths); if !changed { break; } } } fn discover_parents(workspace: &mut Workspace, checked_paths: &mut FxHashSet) -> bool { let dirs = workspace .iter() .filter(|document| document.language != Language::Bib) .filter_map(|document| document.path.as_deref()) .flat_map(|path| path.ancestors().skip(1)) .filter(|path| workspace.contains(path)) .map(|path| path.to_path_buf()) .collect::>(); let mut changed = false; for dir in dirs { if workspace .iter() .filter(|document| matches!(document.language, Language::Root | Language::Tectonic)) .filter_map(|document| document.path.as_deref()) .filter_map(|path| path.parent()) .any(|marker| dir.starts_with(marker)) { continue; } let Ok(entries) = std::fs::read_dir(dir) else { continue; }; for file in entries .flatten() .filter(|entry| entry.file_type().is_ok_and(|type_| type_.is_file())) .map(|entry| entry.path()) { let Some(lang) = Language::from_path(&file) else { continue; }; if !matches!( lang, Language::Tex | Language::Root | Language::Tectonic | Language::Latexmkrc ) { continue; } if workspace.lookup_file(&file).is_none() && file.exists() { changed |= workspace.load(&file, lang).is_ok(); checked_paths.insert(file); } } } changed } fn discover_children(workspace: &mut Workspace, checked_paths: &mut FxHashSet) -> bool { let files = workspace .graphs() .values() .flat_map(|graph| graph.missing.iter()) .filter(|uri| uri.scheme() == "file") .flat_map(|uri| uri.to_file_path()) .collect::>(); let mut changed = false; for file in files { let language = Language::from_path(&file).unwrap_or(Language::Tex); if workspace.lookup_file(&file).is_none() && file.exists() { changed |= workspace.load(&file, language).is_ok(); checked_paths.insert(file); } } changed } texlab-5.24.0/crates/base-db/src/deps/graph.rs000066400000000000000000000221541510221113200210200ustar00rootroot00000000000000use std::{ffi::OsStr, path::PathBuf, rc::Rc, sync::Arc}; use distro::Language; use itertools::Itertools; use once_cell::sync::Lazy; use percent_encoding::percent_decode_str; use rustc_hash::FxHashSet; use url::Url; use crate::{Document, Workspace, semantics, util}; use super::ProjectRoot; pub static HOME_DIR: Lazy> = Lazy::new(dirs::home_dir); #[derive(Debug, Clone)] pub struct Edge { pub source: Url, pub target: Url, pub data: EdgeData, } #[derive(Debug, Clone)] pub enum EdgeData { DirectLink(Box), FileList(Arc), AdditionalFiles, Artifact, } #[derive(Debug, Clone)] pub struct DirectLinkData { pub link: semantics::tex::Link, pub new_root: Option, } #[derive(Debug, Clone, Copy)] struct Start<'a, 'b> { source: &'a Document, root: &'b ProjectRoot, } #[derive(Debug)] pub struct Graph { pub missing: Vec, pub edges: Vec, pub start: Url, } impl Graph { pub fn new(workspace: &Workspace, start: &Document) -> Self { let mut graph = Self { missing: Vec::new(), edges: Vec::new(), start: start.uri.clone(), }; let Some(start_dir) = &start.dir else { return graph; }; let root = ProjectRoot::walk_and_find(workspace, start_dir); let mut stack = vec![(start, Rc::new(root))]; let mut visited = FxHashSet::default(); while let Some((source, root)) = stack.pop() { let index = graph.edges.len(); graph.process( workspace, Start { source, root: &root, }, ); for edge in &graph.edges[index..] { if visited.insert(edge.target.clone()) { let new_root = match &edge.data { EdgeData::DirectLink(data) => data.new_root.clone(), EdgeData::FileList(root) => Some(root.as_ref().clone()), _ => None, }; let new_root = new_root.map_or_else(|| Rc::clone(&root), Rc::new); stack.push((workspace.lookup(&edge.target).unwrap(), new_root)); } } } graph } pub fn preorder<'a: 'b, 'b>( &'b self, workspace: &'a Workspace, ) -> impl DoubleEndedIterator + 'b { std::iter::once(&self.start) .chain(self.edges.iter().map(|group| &group.target)) .unique() .filter_map(|uri| workspace.lookup(uri)) } fn process(&mut self, workspace: &Workspace, start: Start) { self.add_direct_links(workspace, start); self.add_artifacts(workspace, start); self.add_additional_files(workspace, start); if workspace.config().syntax.use_file_list { self.add_file_list_links(workspace, start); } } fn add_additional_files(&mut self, workspace: &Workspace, start: Start) { for uri in &start.root.additional_files { match workspace.lookup(uri) { Some(target) => { self.edges.push(Edge { source: start.source.uri.clone(), target: target.uri.clone(), data: EdgeData::AdditionalFiles, }); } None => { self.missing.push(uri.clone()); } } } } fn add_file_list_links(&mut self, workspace: &Workspace, start: Start) -> Option<()> { let file_list = start.source.data.as_file_list()?; let home_dir = HOME_DIR.as_deref(); let working_dir = file_list .working_dir .as_deref() .and_then(|dir| Url::from_directory_path(dir).ok()); let working_dir = working_dir.as_ref().or(start.source.dir.as_ref())?; let new_root = Arc::new(ProjectRoot::from_config(workspace, working_dir)); for target_uri in file_list .inputs .iter() .chain(file_list.outputs.iter()) .filter(|path| { path.is_relative() || Language::from_path(&path) == Some(Language::Bib) || home_dir.is_some_and(|home_dir| path.starts_with(home_dir)) }) .filter_map(|path| working_dir.join(path.to_str()?).ok()) { if workspace.lookup(&target_uri).is_some() { self.edges.push(Edge { source: start.source.uri.clone(), target: target_uri, data: EdgeData::FileList(Arc::clone(&new_root)), }); } else { self.missing.push(target_uri); } } Some(()) } fn add_direct_links(&mut self, workspace: &Workspace, start: Start) -> Option<()> { let data = start.source.data.as_tex()?; for link in &data.semantics.links { self.add_direct_link(workspace, start, link); } Some(()) } fn add_direct_link( &mut self, workspace: &Workspace, start: Start, link: &semantics::tex::Link, ) { let home_dir = HOME_DIR.as_deref(); let stem = &link.path.text; let mut file_names = vec![stem.clone()]; link.kind .extensions() .iter() .map(|ext| format!("{stem}.{ext}")) .for_each(|name| file_names.push(name)); let file_name_db = &workspace.distro().file_name_db; let distro_files = file_names .iter() .filter_map(|name| { file_name_db .get(name) .or_else(|| start.root.file_name_db.get(name)) }) .filter(|path| { home_dir.is_some_and(|dir| path.starts_with(dir)) || Language::from_path(path) == Some(Language::Bib) }) .flat_map(Url::from_file_path); for target_uri in file_names .iter() .flat_map(|file_name| { util::expand_relative_path(file_name, &start.root.src_dir, workspace.folders()) }) .chain(distro_files) { match workspace.lookup(&target_uri) { Some(target) => { let new_root = link .base_dir .as_deref() .and_then(|path| start.root.src_dir.join(path).ok()) .map(|dir| ProjectRoot::from_config(workspace, &dir)); let link_data = DirectLinkData { link: link.clone(), new_root, }; self.edges.push(Edge { source: start.source.uri.clone(), target: target.uri.clone(), data: EdgeData::DirectLink(Box::new(link_data)), }); break; } None => { self.missing.push(target_uri); } }; } } fn add_artifacts(&mut self, workspace: &Workspace, start: Start) { if start.source.language != Language::Tex { return; } let root = start.root; self.add_artifact_group(workspace, start, &root.aux_dir, "aux"); self.add_artifact_group(workspace, start, &root.log_dir, "log"); self.add_artifact_group(workspace, start, &root.aux_dir, "fls"); } fn add_artifact_group( &mut self, workspace: &Workspace, start: Start, dir: &Url, extension: &str, ) { let relative_path = start .root .compile_dir .make_relative(&start.source.uri) .unwrap(); self.add_artifact( workspace, start.source, &dir.join(&relative_path).unwrap(), extension, ); self.add_artifact(workspace, start.source, &dir, extension); self.add_artifact(workspace, start.source, &start.root.compile_dir, extension); } fn add_artifact( &mut self, workspace: &Workspace, source: &Document, dir: &Url, extension: &str, ) { let mut path = PathBuf::from( percent_decode_str(source.uri.path()) .decode_utf8_lossy() .as_ref(), ); path.set_extension(extension); let Some(target_uri) = path .file_name() .and_then(OsStr::to_str) .and_then(|name| dir.join(name).ok()) else { return; }; match workspace.lookup(&target_uri) { Some(target) => { self.edges.push(Edge { source: source.uri.clone(), target: target.uri.clone(), data: EdgeData::Artifact, }); } None => { self.missing.push(target_uri); } } } } texlab-5.24.0/crates/base-db/src/deps/project.rs000066400000000000000000000020631510221113200213620ustar00rootroot00000000000000use itertools::Itertools; use rustc_hash::FxHashSet; use crate::{Document, Workspace}; #[derive(Debug, Clone)] pub struct Project<'a> { pub documents: FxHashSet<&'a Document>, } impl<'a> Project<'a> { pub fn from_child(workspace: &'a Workspace, child: &'a Document) -> Self { let mut documents = FxHashSet::default(); for graph in workspace.graphs().values() { if graph.preorder(workspace).contains(&child) { documents.extend(graph.preorder(workspace)); } } Self { documents } } } pub fn parents<'a>(workspace: &'a Workspace, child: &'a Document) -> FxHashSet<&'a Document> { workspace .iter() .filter(|document| { document .data .as_tex() .is_some_and(|data| data.semantics.can_be_root) }) .filter(|parent| { let graph = &workspace.graphs()[&parent.uri]; let mut nodes = graph.preorder(workspace); nodes.contains(&child) }) .collect() } texlab-5.24.0/crates/base-db/src/deps/root.rs000066400000000000000000000130451510221113200207010ustar00rootroot00000000000000use std::sync::Arc; use distro::FileNameDB; use url::Url; use crate::{DocumentData, Workspace, util}; use super::graph::HOME_DIR; #[derive(Clone)] pub struct ProjectRoot { pub compile_dir: Url, pub src_dir: Url, pub aux_dir: Url, pub log_dir: Url, pub pdf_dir: Url, pub additional_files: Vec, pub file_name_db: Arc, } impl ProjectRoot { pub fn walk_and_find(workspace: &Workspace, dir: &Url) -> Self { let home_dir = HOME_DIR .as_deref() .and_then(|path| Url::from_directory_path(path).ok()); let mut current = dir.clone(); loop { let root = Self::from_rootfile(workspace, ¤t) .or_else(|| Self::from_tectonic(workspace, ¤t)) .or_else(|| Self::from_latexmkrc(workspace, ¤t)); if let Some(root) = root { break root; } let Ok(parent) = current.join("..") else { break Self::from_config(workspace, dir); }; if current == parent || Some(&parent) == home_dir.as_ref() { break Self::from_config(workspace, dir); } current = parent; } } pub fn from_tectonic(workspace: &Workspace, dir: &Url) -> Option { let exists = workspace .iter() .filter(|document| document.dir.as_ref() == Some(dir)) .any(|document| matches!(document.data, DocumentData::Tectonic)); if !exists { return None; } let compile_dir = dir.clone(); let src_dir = dir.join("src/").unwrap(); let out_dir = dir.join("build/").unwrap(); let aux_dir = out_dir.clone(); let log_dir = out_dir.clone(); let pdf_dir = out_dir; let additional_files = vec![ src_dir.join("_preamble.tex").unwrap(), src_dir.join("_postamble.tex").unwrap(), ]; Some(Self { compile_dir, src_dir, aux_dir, log_dir, pdf_dir, additional_files, file_name_db: Default::default(), }) } pub fn from_latexmkrc(workspace: &Workspace, dir: &Url) -> Option { let config = workspace.config(); let rcfile = workspace .iter() .filter(|document| document.dir.as_ref() == Some(dir)) .find_map(|document| document.data.as_latexmkrc())?; let compile_dir = dir.clone(); let src_dir = dir.clone(); let aux_dir_rc = rcfile .aux_dir .as_ref() .and_then(|path| append_dir(dir, path, workspace).ok()); let out_dir_rc = rcfile .out_dir .as_ref() .and_then(|path| append_dir(dir, path, workspace).ok()); let aux_dir = aux_dir_rc .clone() .or_else(|| append_dir(dir, &config.build.aux_dir, workspace).ok()) .unwrap_or_else(|| dir.clone()); let log_dir = aux_dir_rc .or_else(|| append_dir(dir, &config.build.log_dir, workspace).ok()) .unwrap_or_else(|| dir.clone()); let pdf_dir = out_dir_rc .or_else(|| append_dir(dir, &config.build.pdf_dir, workspace).ok()) .unwrap_or_else(|| dir.clone()); let additional_files = vec![]; let file_name_db = Arc::clone(&rcfile.file_name_db); Some(Self { compile_dir, src_dir, aux_dir, log_dir, pdf_dir, additional_files, file_name_db, }) } pub fn from_rootfile(workspace: &Workspace, dir: &Url) -> Option { let exists = workspace .iter() .filter(|document| document.dir.as_ref() == Some(dir)) .any(|document| matches!(document.data, DocumentData::Root)); if !exists { return None; } Some(Self::from_config(workspace, dir)) } pub fn from_config(workspace: &Workspace, dir: &Url) -> Self { let compile_dir = dir.clone(); let src_dir = dir.clone(); let config = workspace.config(); let aux_dir = append_dir(dir, &config.build.aux_dir, workspace).unwrap_or_else(|_| dir.clone()); let log_dir = append_dir(dir, &config.build.log_dir, workspace).unwrap_or_else(|_| dir.clone()); let pdf_dir = append_dir(dir, &config.build.pdf_dir, workspace).unwrap_or_else(|_| dir.clone()); let additional_files = vec![]; Self { compile_dir, src_dir, aux_dir, log_dir, pdf_dir, additional_files, file_name_db: Default::default(), } } } fn append_dir(dir: &Url, path: &str, workspace: &Workspace) -> Result { let mut path = String::from(path); if !path.ends_with('/') { path.push('/'); } util::expand_relative_path(&path, dir, workspace.folders()) } impl std::fmt::Debug for ProjectRoot { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_struct("ProjectRoot") .field("compile_dir", &self.compile_dir.as_str()) .field("src_dir", &self.src_dir.as_str()) .field("aux_dir", &self.aux_dir.as_str()) .field("log_dir", &self.log_dir.as_str()) .field("pdf_dir", &self.pdf_dir.as_str()) .field("additional_files", &self.additional_files) .field("file_name_db", &"...") .finish() } } texlab-5.24.0/crates/base-db/src/document.rs000066400000000000000000000151761510221113200206100ustar00rootroot00000000000000use std::path::PathBuf; use distro::Language; use line_index::{LineCol, LineIndex}; use rowan::TextRange; use syntax::{BuildError, bibtex, file_list::FileList, latex, latexmkrc::LatexmkrcData}; use url::Url; use crate::{Config, semantics}; #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Hash)] pub enum Owner { Client, Server, Distro, } #[derive(Debug)] pub struct DocumentParams<'a> { pub uri: Url, pub text: String, pub language: Language, pub owner: Owner, pub cursor: LineCol, pub config: &'a Config, } #[derive(Clone)] pub struct Document { pub uri: Url, pub dir: Option, pub path: Option, pub text: String, pub line_index: LineIndex, pub owner: Owner, pub cursor: LineCol, pub language: Language, pub data: DocumentData, } impl Document { pub fn parse(params: DocumentParams) -> Self { let DocumentParams { uri, text, .. } = params; let dir = uri.join(".").ok(); let path = if uri.scheme() == "file" { uri.to_file_path().ok() } else { None }; let line_index = LineIndex::new(&text); let data = match params.language { Language::Tex => { let green = parser::parse_latex(&text, ¶ms.config.syntax); let mut semantics = semantics::tex::Semantics::default(); semantics.process_root( ¶ms.config.syntax, &latex::SyntaxNode::new_root(green.clone()), ); DocumentData::Tex(TexDocumentData { green, semantics }) } Language::Bib => { let green = parser::parse_bibtex(&text); let mut semantics = semantics::bib::Semantics::default(); semantics.process_root(&bibtex::SyntaxNode::new_root(green.clone())); DocumentData::Bib(BibDocumentData { green, semantics }) } Language::Aux => { let green = parser::parse_latex(&text, ¶ms.config.syntax); let mut semantics = semantics::auxiliary::Semantics::default(); semantics.process_root(&latex::SyntaxNode::new_root(green.clone())); DocumentData::Aux(AuxDocumentData { green, semantics }) } Language::Log => { let errors = parser::parse_build_log(&text).errors; DocumentData::Log(LogDocumentData { errors }) } Language::Root => DocumentData::Root, Language::Latexmkrc => { 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, Language::FileList => DocumentData::FileList(parser::parse_file_list(&text)), }; Self { uri, dir, path, text, line_index, owner: params.owner, cursor: params.cursor, language: params.language, data, } } } impl std::fmt::Debug for Document { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_tuple("Document").field(&self.uri.as_str()).finish() } } impl std::borrow::Borrow for Document { fn borrow(&self) -> &Url { &self.uri } } impl std::borrow::Borrow for Document { fn borrow(&self) -> &str { self.uri.as_str() } } impl PartialEq for Document { fn eq(&self, other: &Self) -> bool { self.uri == other.uri } } impl Eq for Document {} impl std::hash::Hash for Document { fn hash(&self, state: &mut H) { self.uri.hash(state) } } #[derive(Debug, Clone)] pub enum DocumentData { Tex(TexDocumentData), Bib(BibDocumentData), Aux(AuxDocumentData), Log(LogDocumentData), Root, Latexmkrc(LatexmkrcData), Tectonic, FileList(FileList), } impl DocumentData { pub fn as_tex(&self) -> Option<&TexDocumentData> { if let DocumentData::Tex(data) = self { Some(data) } else { None } } pub fn as_bib(&self) -> Option<&BibDocumentData> { if let DocumentData::Bib(data) = self { Some(data) } else { None } } pub fn as_aux(&self) -> Option<&AuxDocumentData> { if let DocumentData::Aux(data) = self { Some(data) } else { None } } pub fn as_log(&self) -> Option<&LogDocumentData> { if let DocumentData::Log(data) = self { Some(data) } else { None } } pub fn as_latexmkrc(&self) -> Option<&LatexmkrcData> { if let DocumentData::Latexmkrc(data) = self { Some(data) } else { None } } pub fn as_file_list(&self) -> Option<&FileList> { if let DocumentData::FileList(data) = self { Some(data) } else { None } } } #[derive(Debug, Clone)] pub struct TexDocumentData { pub green: rowan::GreenNode, pub semantics: semantics::tex::Semantics, } impl TexDocumentData { pub fn root_node(&self) -> latex::SyntaxNode { latex::SyntaxNode::new_root(self.green.clone()) } } #[derive(Debug, Clone)] pub struct BibDocumentData { pub green: rowan::GreenNode, pub semantics: semantics::bib::Semantics, } impl BibDocumentData { pub fn root_node(&self) -> bibtex::SyntaxNode { bibtex::SyntaxNode::new_root(self.green.clone()) } } #[derive(Debug, Clone)] pub struct LogDocumentData { pub errors: Vec, } #[derive(Debug, Clone)] pub struct AuxDocumentData { pub green: rowan::GreenNode, pub semantics: semantics::auxiliary::Semantics, } #[derive(Debug, Clone)] pub struct DocumentLocation<'a> { pub document: &'a Document, pub range: TextRange, } impl<'a> DocumentLocation<'a> { pub fn new(document: &'a Document, range: TextRange) -> Self { Self { document, range } } fn eq_key(&self) -> (&Url, TextRange) { (&self.document.uri, self.range) } } impl<'a> PartialEq for DocumentLocation<'a> { fn eq(&self, other: &Self) -> bool { self.eq_key() == other.eq_key() } } impl<'a> Eq for DocumentLocation<'a> {} impl<'a> std::hash::Hash for DocumentLocation<'a> { fn hash(&self, state: &mut H) { self.eq_key().hash(state) } } texlab-5.24.0/crates/base-db/src/lib.rs000066400000000000000000000011101510221113200175170ustar00rootroot00000000000000mod config; pub mod data; pub mod deps; mod document; pub mod semantics; pub mod util; mod workspace; pub use self::{config::*, document::*, workspace::*}; #[derive(Debug)] pub struct FeatureParams<'a> { pub document: &'a Document, pub project: deps::Project<'a>, pub workspace: &'a Workspace, } impl<'a> FeatureParams<'a> { pub fn new(workspace: &'a Workspace, document: &'a Document) -> Self { let project = deps::Project::from_child(workspace, document); Self { document, project, workspace, } } } texlab-5.24.0/crates/base-db/src/semantics.rs000066400000000000000000000026371510221113200207560ustar00rootroot00000000000000use rowan::{TextLen, TextRange}; pub mod auxiliary; pub mod bib; pub mod tex; #[derive(PartialEq, Eq, Clone, Hash)] pub struct Span { pub text: String, pub range: rowan::TextRange, } impl Span { pub fn new(text: String, range: rowan::TextRange) -> Self { Self { text, range } } pub fn empty(offset: rowan::TextSize) -> Self { Self { text: String::new(), range: rowan::TextRange::empty(offset), } } pub fn command(token: &rowan::SyntaxToken) -> Self { let range = token.text_range(); let range = TextRange::new(range.start() + "\\".text_len(), range.end()); let text = String::from(&token.text()[1..]); Self::new(text, range) } } impl std::fmt::Debug for Span { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_tuple("Span") .field(&self.text) .field(&self.range) .finish() } } impl From<&syntax::latex::Key> for Span { fn from(key: &syntax::latex::Key) -> Self { Self { text: key.to_string(), range: syntax::latex::small_range(key), } } } impl From<&rowan::SyntaxToken> for Span { fn from(token: &rowan::SyntaxToken) -> Self { Self { text: token.text().into(), range: token.text_range(), } } } texlab-5.24.0/crates/base-db/src/semantics/000077500000000000000000000000001510221113200204005ustar00rootroot00000000000000texlab-5.24.0/crates/base-db/src/semantics/auxiliary.rs000066400000000000000000000046431510221113200227640ustar00rootroot00000000000000use rowan::ast::AstNode; use rustc_hash::FxHashMap; use syntax::latex::{self, HasCurly}; #[derive(Debug, Clone, Default)] pub struct Semantics { pub label_numbers: FxHashMap, pub section_numbers: FxHashMap, } impl Semantics { pub fn process_root(&mut self, root: &latex::SyntaxNode) { for node in root.descendants() { self.process_node(&node); } } fn process_node(&mut self, node: &latex::SyntaxNode) { if let Some(label_number) = latex::LabelNumber::cast(node.clone()) { self.process_label_number(&label_number); } if let Some(toc_line) = latex::TocContentsLine::cast(node.clone()) { self.process_toc_line(&toc_line); } } fn process_label_number(&mut self, label_number: &latex::LabelNumber) -> Option<()> { let name = label_number .name() .and_then(|group| group.key()) .map(|key| key.to_string())?; let group = label_number.text()?; let group = group .syntax() .children() .filter_map(latex::CurlyGroup::cast) .find_map(|group| { latex::Text::cast(group.syntax().first_child()?)?; Some(group) })?; let text = group.content_text()?.replace(['{', '}'], ""); self.label_numbers.insert(name, text); Some(()) } fn process_toc_line(&mut self, toc_line: &latex::TocContentsLine) -> Option<()> { let unit = toc_line.unit().and_then(|u| u.content_text())?.to_string(); if [ "part", "chapter", "section", "subsection", "subsubsection", "paragraph", "subparagraph", ] .contains(&unit.as_str()) { let line = toc_line.line()?; let name = line.syntax().children().find_map(|child| { latex::Text::cast(child.clone())?; Some(child) })?; let name = name.to_string(); let num_line = line .syntax() .children() .find_map(|child| latex::TocNumberLine::cast(child.clone()))?; let number = num_line.number()?; let number = number.content_text()?.replace(['{', '}'], ""); self.section_numbers.insert(name, number); } Some(()) } } texlab-5.24.0/crates/base-db/src/semantics/bib.rs000066400000000000000000000053351510221113200215100ustar00rootroot00000000000000use bibtex_utils::field::text::TextFieldData; use itertools::Itertools; use rowan::{TextRange, ast::AstNode}; use rustc_hash::FxHashMap; use syntax::bibtex::{self, HasName, HasType, HasValue}; use crate::data::{BibtexEntryType, BibtexEntryTypeCategory}; use super::Span; #[derive(Debug, Clone, Default)] pub struct Semantics { pub entries: Vec, pub strings: Vec, /// Map from string definition keys to their expanded values. pub expanded_defs: FxHashMap, } impl Semantics { pub fn process_root(&mut self, root: &bibtex::SyntaxNode) { for node in root.children() { if let Some(entry) = bibtex::Entry::cast(node.clone()) { self.process_entry(entry); } else if let Some(string) = bibtex::StringDef::cast(node) { self.process_string_def(string); } } } fn process_entry(&mut self, entry: bibtex::Entry) { if let Some(name) = entry.name_token() { let type_token = entry.type_token().unwrap(); let category = BibtexEntryType::find(type_token.text()) .map_or(BibtexEntryTypeCategory::Misc, |ty| ty.category); let field_values = entry.fields().filter_map(|field| { Some(TextFieldData::parse(&field.value()?, &self.expanded_defs)?.text) }); let keywords = [name.text().into(), type_token.text().into()] .into_iter() .chain(field_values) .join(" "); self.entries.push(Entry { name: Span { range: name.text_range(), text: name.text().into(), }, full_range: entry.syntax().text_range(), category, keywords, }); } } fn process_string_def(&mut self, string: bibtex::StringDef) { if let Some(name) = string.name_token() { self.strings.push(StringDef { name: Span { range: name.text_range(), text: name.text().into(), }, full_range: string.syntax().text_range(), }); if let Some(value) = string.value() { if let Some(data) = TextFieldData::parse(&value, &self.expanded_defs) { self.expanded_defs.insert(name.text().into(), data.text); } } } } } #[derive(Debug, PartialEq, Eq, Clone)] pub struct Entry { pub name: Span, pub full_range: TextRange, pub keywords: String, pub category: BibtexEntryTypeCategory, } #[derive(Debug, Clone)] pub struct StringDef { pub name: Span, pub full_range: TextRange, } texlab-5.24.0/crates/base-db/src/semantics/tex.rs000066400000000000000000000350051510221113200215510ustar00rootroot00000000000000use rowan::{TextRange, ast::AstNode}; use rustc_hash::FxHashSet; use syntax::latex::{self, HasBrack, HasCurly}; use titlecase::titlecase; use parser::SyntaxConfig; use super::Span; use crate::semantics::tex::latex::SyntaxToken; fn maybe_prepend_prefix( map: &Vec<(String, String)>, command: &Option, name: &Span, ) -> Span { match command { Some(x) => Span::new( map.iter() .find_map(|(k, v)| if k == &x.text()[1..] { Some(v) } else { None }) .unwrap_or(&String::new()) .to_owned() + &name.text, name.range, ), None => name.clone(), } } #[derive(Debug, Clone, Default)] pub struct Semantics { pub links: Vec, pub labels: Vec