Skip to content

Configuration

Patrick Förster edited this page Jul 8, 2024 · 18 revisions

This page describes the configuration settings that the server will query from the LSP client.


texlab.build.executable

Defines the executable of the LaTeX build tool.

Type: string

Default value: latexmk


texlab.build.args

Defines additional arguments that are passed to the configured LaTeX build tool. Note that flags and their arguments need to be separate elements in this array. To pass the arguments -foo bar to a build tool, latex.build.args needs to be ["-foo", "bar"]. The placeholder %f will be replaced by the server.

Placeholders:

  • %f: The path of the TeX file to compile.

Type: string[]

Default value: ["-pdf", "-interaction=nonstopmode", "-synctex=1", "%f"]


texlab.build.forwardSearchAfter

Set this property to true if you want to execute a forward search after a build.

Type: boolean

Default value: false


texlab.build.onSave

Set this property to true if you want to compile the project after saving a file.

Type: boolean

Default value: false


texlab.build.useFileList

When set to true, the server will use the .fls files produced by the TeX engine as an additional input for the project detection.

Note that enabling this property might have an impact on performance.

Type: boolean

Default value: false


texlab.build.auxDirectory

When not using latexmk, provides a way to define the directory containing the .aux files. Note that you need to set the aux directory in latex.build.args too.

When using a latexmkrc file, texlab will automatically infer the correct setting.

Type: string

Default value: . (the same directory as the root directory)


texlab.build.logDirectory

When not using latexmk, provides a way to define the directory containing the build log files. Note that you need to change the output directory in your build arguments too.

When using a latexmkrc file, texlab will automatically infer the correct setting.

Type: string

Default value: . (the same directory as the root directory)


texlab.build.pdfDirectory

When not using latexmk, provides a way to define the directory containing the output files. Note that you need to set the output directory in latex.build.args too.

When using a latexmkrc file, texlab will automatically infer the correct setting.

Type: string

Default value: . (the same directory as the root directory)


(DEPRECATED) texlab.auxDirectory

Defines the directory containing the build artifacts. Note that you need to set the output directory in latex.build.args too, if you want to change the build directory. In this case, use the -outdir flag for latexmk.

Type: string

Default value: . (the same directory as the TeX file)


texlab.forwardSearch.executable

Defines the executable of the PDF previewer. The previewer needs to support SyncTeX.

Type: string | null

Default value: null


texlab.forwardSearch.args

Defines additional arguments that are passed to the configured previewer to perform the forward search. The placeholders %f, %p, %l will be replaced by the server.

Placeholders:

  • %f: The path of the current TeX file.
  • %p: The path of the current PDF file.
  • %l: The current line number.

Type: string[] | null

Default value: null


texlab.chktex.onOpenAndSave

Lint using chktex after opening and saving a file.

Type: boolean

Default value: false


texlab.chktex.onEdit

Lint using chktex after editing a file.

Type: boolean

Default value: false


texlab.chktex.additionalArgs

Additional command line arguments that are passed to chktex after editing a file. Don't redefine the -I and -f flags as they are set by the server.

Type: string[]

Default value: []


texlab.diagnosticsDelay

Delay in milliseconds before reporting diagnostics.

Type: integer

Default value: 300


texlab.diagnostics.allowedPatterns

A list of regular expressions used to filter the list of reported diagnostics. If specified, only diagnostics that match at least one of the specified patterns are sent to the client.

See also texlab.diagnostics.ignoredPatterns.

Hint: If both allowedPatterns and ignoredPatterns are set, then allowed patterns are applied first. Afterwards, the results are filtered with the ignored patterns.

Type: string[]

Default value: []


texlab.diagnostics.ignoredPatterns

A list of regular expressions used to filter the list of reported diagnostics. If specified, only diagnostics that match none of the specified patterns are sent to the client.

See also texlab.diagnostics.allowedPatterns.

Type: string[]

Default value: []


texlab.symbols.allowedPatterns

A list of regular expressions used to filter the list of reported document symbols. If specified, only symbols that match at least one of the specified patterns are sent to the client. Symbols are filtered recursively so nested symbols can still be sent to the client even though the parent node is removed from the results.

See also texlab.symbols.ignoredPatterns.

Hint: If both allowedPatterns and ignoredPatterns are set, then allowed patterns are applied first. Afterwards, the results are filtered with the ignored patterns.

Type: string[]

Default value: []


texlab.symbols.ignoredPatterns

A list of regular expressions used to filter the list of reported document symbols. If specified, only symbols that match none of the specified patterns are sent to the client.

See also texlab.symbols.allowedPatterns.

Type: string[]

Default value: []


texlab.formatterLineLength

Defines the maximum amount of characters per line (0 = disable) when formatting BibTeX files.

Type: integer

Default value: 80


texlab.bibtexFormatter

Defines the formatter to use for BibTeX formatting. Possible values are either texlab or latexindent.

Type: string

Default value: texlab


texlab.latexFormatter

Defines the formatter to use for LaTeX formatting. Possible values are either texlab or latexindent. Note that texlab is not implemented yet.

Type: string

Default value: latexindent


texlab.latexindent.local

Defines the path of a file containing the latexindent configuration. This corresponds to the --local=file.yaml flag of latexindent. By default the configuration inside the project root directory is used.

Type: string

Default value: null


texlab.latexindent.modifyLineBreaks

Modifies linebreaks before, during, and at the end of code blocks when formatting with latexindent. This corresponds to the --modifylinebreaks flag of latexindent.

Type: boolean

Default value: false


texlab.completion.matcher

Modifies the algorithm used to filter the completion items returned to the client. Possibles values are:

  • fuzzy: Fuzzy string matching (case sensitive)
  • fuzzy-ignore-case: Fuzzy string matching (case insensitive)
  • prefix: Filter out items that do not start with the search text (case sensitive)
  • prefix-ignore-case: Filter out items that do not start with the search text (case insensitive)

Type: string

Default value: fuzzy-ignore-case


texlab.inlayHints.labelDefinitions

When enabled, the server will return inlay hints for \label-like commands.

Type: boolean

Default value: true


texlab.inlayHints.labelReferences

When enabled, the server will return inlay hints for \ref-like commands.

Type: boolean

Default value: true


texlab.experimental.followPackageLinks

If set to true, dependencies of custom packages are resolved and included in the dependency graph.

Type: boolean

Default value: false


texlab.experimental.mathEnvironments

Allows extending the list of environments which the server considers as math environments (for example align* or equation).

Type: string[]

Default value: []


texlab.experimental.enumEnvironments

Allows extending the list of environments which the server considers as enumeration environments (for example enumerate or itemize).

Type: string[]

Default value: []


texlab.experimental.verbatimEnvironments

Allows extending the list of environments which the server considers as verbatim environments (for example minted or lstlisting). This can be used to suppress diagnostics from environments that do not contain LaTeX code.

Type: string[]

Default value: []


texlab.experimental.citationCommands

Allows extending the list of commands which the server considers as citation commands (for example \cite).

Hint: Additional commands need to be written without a leading \ (e. g. foo instead of \foo).

Type: string[]

Default value: []


texlab.experimental.labelDefinitionCommands

Allows extending the list of \label-like commands.

Hint: Additional commands need to be written without a leading \ (e. g. foo instead of \foo).

Type: string[]

Default value: []


texlab.experimental.labelReferenceCommands

Allows extending the list of \ref-like commands.

Hint: Additional commands need to be written without a leading \ (e. g. foo instead of \foo).

Type: string[]

Default value: []


texlab.experimental.labelDefinitionPrefixes

Allows associating a label definition command with a custom prefix. Consider,

\newcommand{\thm}[1]{\label{thm:#1}}
\thm{foo}

Then setting texlab.experimental.labelDefinitionPrefixes to [["thm", "thm:"]] and adding "thm" to texlab.experimental.labelDefinitionCommands will make the server recognize the thm:foo label.

Type: (string, string)[]

Default value: []


texlab.experimental.labelReferencePrefixes

Allows associating a label reference command with a custom prefix. See texlab.experimental.labelDefinitionPrefixes for more details.

Type: (string, string)[]

Default value: []