An implementation of the Language Server Protocol for LaTeX
Find a file
2023-03-24 21:55:28 +01:00
.github/workflows Use sparse crates registry in CI 2023-03-12 09:11:06 +01:00
benches Simplify db module imports 2022-12-18 22:15:17 +01:00
data Allow extending special environments from options 2023-03-12 09:11:06 +01:00
images Link to GitHub wiki in README 2022-10-21 21:07:43 +02:00
src Classify citation tokens depending of entry type 2023-03-24 21:55:28 +01:00
tests/lsp Add a test case for #864 2023-03-11 09:05:57 +01:00
.gitattributes Remove obsolete Travis configuration 2022-02-26 09:04:19 +01:00
.gitignore Repair textDocument/foldingRange request 2022-11-20 21:31:21 +01:00
Cargo.lock Add semantic tokens for undef and unused labels 2023-03-20 17:23:18 +01:00
Cargo.toml Add semantic tokens for undef and unused labels 2023-03-20 17:23:18 +01:00
CHANGELOG.md Do not return empty document symbols 2023-03-20 17:19:20 +01:00
CONTRIBUTING.md Update contribution process file 2023-01-28 14:14:26 +01:00
LICENSE Change license to GPLv3 2019-11-27 17:40:27 +01:00
README.md Bump MSRV to Rust 1.65 2023-03-09 21:49:17 +01:00
texlab.tex Bump version to v4.1.0 2022-06-12 16:25:38 +02:00

CI Coverage Wiki

GitHub release crates.io CTAN

TexLab

A cross-platform implementation of the Language Server Protocol providing rich cross-editing support for the LaTeX typesetting system. The server may be used with any editor that implements the Language Server Protocol.

Demo

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 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:

Packaging status

Requirements

A TeX distribution is not strictly required to use the server but TexLab cannot compile your documents without one. TexLab supports compiling using Tectonic. For an example configuration, please see here.

On Windows, you may need to install Microsoft Visual C++ Redistributable for Visual Studio 2015.

Building from Source

You will need to install the following dependencies to compile the server:

  • A recent, stable version of Rust

Then run the following command in the project folder:

cargo build --release

Alternatively, you can install texlab from crates.io and run

cargo install texlab

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 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 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

cargo test

in the project folder.

Contributing

See CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.