Code Languages

Markup Languages

LTEX+ supports checking grammar and spelling in the following markup languages. These markup languages are exactly those languages for which LTEX+ is enabled by default, so no further configuration is necessary. Change ltex.enabled to manually configure for which languages LTEX+ is enabled/disabled.

Language Language ID LTEX+ support
BibTEX bibtex ∗ Basic
ConTEXt context ∗ Advanced
LATEX latex ∗ Extensive
Markdown markdown Advanced
MDX mdx ∗ Basic
Typst typst ∗ Good
AsciiDoc asciidoc ∗ Basic
Neorg neorg ∗ Basic
Org org ∗ Good
Quarto quarto ∗ Basic
reStructuredText restructuredtext ∗ Good
R Sweave rsweave ∗ Good
XHTML html Basic

Language ID” denotes the code language identifier that has to be used when changing ltex.enabled. An asterisk (∗) indicates that the language is not supported by VS Code out-of-the-box, and an additional extension that adds support for the language has to be installed in order for vscode-ltex-plus to work (e.g., LaTeX Workshop Extension for VS Code for LATEX).

Programming Languages

In addition to markup languages, LTEX+ can also check comments in many popular programming languages. This is disabled by default, as LTEX+ is currently not able to reliably detect if a comment is source code that has been commented out. To enable checking for programming languages, add the respective code language identifier to ltex.enabled.

A line comment is only checked if its start delimiter is only preceded by whitespace on the same line and followed by a whitespace character. A block comment is only checked if its start delimiter is only preceded by whitespace on the same line and followed by a whitespace character, and its end delimiter is preceded by a whitespace character and only followed by whitespace on the same line. These rules try to minimize the amount of false positives, accounting for both comment delimiters inside code (e.g., strings) and commented out code. If you comment out code that should not be checked by LTEX+, don’t insert whitespace after the start delimiter.

LTEX+ assumes comments are written in Markdown, except for Python, where reStructuredText is used.

There is a list of all supported programming languages below. Again, an asterisk (∗) indicates that the language is not supported by VS Code out-of-the-box, and an additional extension that adds support for the language has to be installed in order for vscode-ltex-plus to work (e.g., MATLAB Extension for VS Code for MATLAB).

Bash/Shell Script (shellscript), C (c), C# (csharp), C++ (cpp), Clojure (clojure), CoffeeScript (coffeescript), Dart (dart), Elixir (elixir ∗), Elm (elm ∗), Erlang (erlang ∗), F# (fsharp), FORTRAN (fortran-modern ∗), Go (go), Groovy (groovy), Haskell (haskell ∗), Java (java), JavaScript (javascript), JavaScript React (javascriptreact), Julia (julia), Kotlin (kotlin ∗), Lisp (lisp ∗), Lua (lua), MATLAB (matlab ∗), Perl (perl), Perl 6 (perl6), PHP (php), PowerShell (powershell), Puppet (puppet ∗), Python (python), R (r), Ruby (ruby), Rust (rust), Scala (scala ∗), SQL (sql), Swift (swift), TypeScript (typescript), TypeScript React (typescriptreact), Verilog (verilog ∗), Visual Basic (vb)

Natural Languages

Apart from code languages like markup and programming languages, there is also the notion of natural languages. Natural languages are the languages in which the contents of documents can be written, like English or German.

By default, LTEX+ uses American English (en-US) when checking documents. If your documents are written in a different language, change ltex.language to the BCP-47 code that best matches your text (e.g., en-US, fr-FR, de-DE, ca-ES-valencia). There are also ways to change the checking language in the middle of documents. For details, see the questions “How can I check multiple languages at once?” and “Why does LTEX+ check in a different language than expected?” in the FAQ.

The natural languages supported by LTEX+ are identical to those supported by LanguageTool, which is LTEX+’s backend. Therefore, the supported languages (and how well they are supported) might change if a new LTEX+ version comes with an updated version of LanguageTool.

The modern fully-spelled codes fr-FR, it-IT, es-ES, nl-NL, sv-SE, and fa-IR require ltex-ls-plus 18.7.x or newer; on earlier releases these specific codes were rejected, while most other extended codes such as en-US, en-GB, de-DE, de-CH, and de-AT already worked. For a best-effort description of how language codes were handled on those versions, see Language Codes in Older Versions. Current versions still accept the legacy bare codes (fr, it, de, en, …) for backward compatibility but they are no longer advertised below and should not be used in new configurations.

Two annotations may appear in the list below. (also accepts: <code>) marks a LanguageTool alias — an alternative spelling of a canonical entry that resolves to the same checker (for example, no is treated as nb, so the two codes are interchangeable). (only on api.languagetoolplus.com) marks a code recognized only by LanguageTool’s own hosted API. The bundled checker and self-hosted instances of the open-source LanguageTool server share the same code set and do not recognize these codes — even when reached via ltex.languageToolHttpServerUri.

The following languages are currently supported:

Arabic (ar), Asturian (ast-ES), Belarusian (be-BY), Breton (br-FR), Catalan (ca-ES), Catalan (Balearic) (ca-ES-balear), Catalan (Valencian) (ca-ES-valencia), Chinese (zh-CN), Crimean Tatar (crh-UA), Danish (da-DK), Dutch (nl-NL), Dutch (Belgium) (nl-BE), English (Australian) (en-AU), English (Canadian) (en-CA), English (GB) (en-GB), English (New Zealand) (en-NZ), English (South African) (en-ZA), English (US) (en-US), Esperanto (eo), French (fr-FR), French (Belgium) (fr-BE), French (Canada) (fr-CA), French (Switzerland) (fr-CH), Galician (gl-ES), German (Austria) (de-AT), German (Germany) (de-DE), German (Swiss) (de-CH), Greek (el-GR), Irish (ga-IE), Italian (it-IT), Japanese (ja-JP), Khmer (km-KH), Norwegian (Bokmål) (nb, also accepts: no, only on api.languagetoolplus.com), Persian (fa-IR), Polish (pl-PL), Portuguese (Angola preAO) (pt-AO), Portuguese (Brazil) (pt-BR), Portuguese (Moçambique preAO) (pt-MZ), Portuguese (Portugal) (pt-PT), Romanian (ro-RO), Russian (ru-RU), Simple German (de-DE-x-simple-language, also accepts: de-DE-x-simple-language-DE), Slovak (sk-SK), Slovenian (sl-SI), Spanish (es-ES), Spanish (voseo) (es-AR), Swedish (sv-SE), Tagalog (tl-PH), Tamil (ta-IN), Ukrainian (uk-UA)