diff --git a/CHANGELOG.md b/CHANGELOG.md
index fc616368..852f90d1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@
## 10.1.0 (upcoming)
+- Add basic support for reStructuredText (fixes [#32](https://github.com/valentjn/vscode-ltex/issues/32))
- Add [`LTeX: Reset and Restart`](https://valentjn.github.io/vscode-ltex/docs/commands.html#ltex-reset-and-restart) command to reset the extension and restart LTEX LS (equivalent to reloading the VS Code window)
- Fix inconsistent titles of German commands
- Hide internal commands in table of keyboard shortcuts to prevent confusion (see [#282](https://github.com/valentjn/vscode-ltex/issues/282))
diff --git a/README.md b/README.md
index 5f1667d5..091013e8 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
-# LTEX Extension for VS Code: Grammar/Spell Checker with LanguageTool and LATEX/Markdown Support
+# LTEX Extension for VS Code: Grammar/Spell Checker Using LanguageTool with Support for LATEX, Markdown, and Others
[![latest release](https://badgen.net/badge/-/release/585858?label=)![version number](https://badgen.net/vs-marketplace/v/valentjn.vscode-ltex?label=)![release date](https://badgen.net/github/last-commit/valentjn/vscode-ltex/release?label=)][website]
[![installs](https://badgen.net/vs-marketplace/i/valentjn.vscode-ltex)][website]
@@ -41,9 +41,10 @@ LTEX is a successor (since it's a fork) of the abandoned [LanguageToo
![Grammar/Spell Checker for VS Code with LanguageTool and LaTeX Support](https://github.com/valentjn/vscode-ltex/raw/release/img/banner-ltex.png)
-- Checks **LATEX** and **Markdown** documents
+- **Supported markup languages:** LATEX, Markdown, reStructuredText, R Sweave
- Comes with **everything included,** no need to install Java or LanguageTool
-- Supports **over 20 languages**
+- **Offline checking:** Does not upload anything to the internet
+- Supports **over 20 languages:** English, French, German, Dutch, Chinese, Russian, etc.
- **Issue highlighting** with hover description
- **Replacement suggestions** via quick fixes
- **User dictionaries**
diff --git a/package.json b/package.json
index 2c6682d7..d3f1760d 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "vscode-ltex",
"displayName": "LTeX",
"version": "10.0.0",
- "description": "Grammar/spell checker with LanguageTool and LaTeX/Markdown support",
+ "description": "Grammar/spell checker using LanguageTool with support for LaTeX, Markdown, and others",
"icon": "img/logo-ltex.png",
"author": "Julian Valentin",
"publisher": "valentjn",
@@ -52,6 +52,7 @@
"onLanguage:bibtex",
"onLanguage:latex",
"onLanguage:markdown",
+ "onLanguage:restructuredtext",
"onLanguage:rsweave"
],
"extensionKind": [
@@ -79,6 +80,7 @@
"bibtex",
"latex",
"markdown",
+ "restructuredtext",
"rsweave"
],
"markdownDescription": "%ltex.i18n.configuration.ltex.enabled.markdownDescription%"
diff --git a/package.nls.de.json b/package.nls.de.json
index 1a8d9316..ecc7bce3 100644
--- a/package.nls.de.json
+++ b/package.nls.de.json
@@ -377,7 +377,7 @@
"ltex.i18n.commands.ltex.checkCurrentDocument.title": "Aktuelles Dokument prüfen",
"ltex.i18n.commands.ltex.checkCurrentDocument.fullMarkdownDescription": "Löst eine Prüfung des aktiven Dokuments aus.\n\nDas aktive Dokument ist dasjenige, dessen Editor momentan den Fokus besitzt, oder, falls kein Editor den Fokus besitzt, welches als letztes geändert wurde.\n\nEs ist normalerweise nicht nötig, diesen Befehl auszuführen, da LTeX alle unterstützten Dokumente prüft, wenn sie geöffnet oder geändert werden.",
"ltex.i18n.commands.ltex.checkAllDocumentsInWorkspace.title": "Alle Dokumente im Arbeitsbereich prüfen",
- "ltex.i18n.commands.ltex.checkAllDocumentsInWorkspace.fullMarkdownDescription": "Löst eine Prüfung aller Markdown- und LaTeX-Dokumente im Arbeitsbereich aus.\n\nDies führt eine Dateisuche nach `*.bib`-, `*.tex`- und `*.md`-Dateien in allen Ordnern des Arbeitsbereiches durch, je nachdem, für welche Dateitypen LTeX aktiviert wurde (siehe `ltex.enabled`). Unbenannte und ungespeicherte Dokumente werden nicht überprüft. Die Dokumenttypen werden anhand der Dateinamen-Erweiterungen erkannt.\n\nDie Dokumente müssen in der UTF-8-Kodierung vorliegen. Dies funktioniert nicht, falls keine Ordner im Arbeitsbereich geöffnet sind.",
+ "ltex.i18n.commands.ltex.checkAllDocumentsInWorkspace.fullMarkdownDescription": "Löst eine Prüfung aller Markdown- und LaTeX-Dokumente im Arbeitsbereich aus.\n\nDies führt eine Dateisuche nach `*.bib`-, `*.md`-, `*.rst`- und `*.tex`-Dateien in allen Ordnern des Arbeitsbereiches durch, je nachdem, für welche Dateitypen LTeX aktiviert wurde (siehe `ltex.enabled`). Unbenannte und ungespeicherte Dokumente werden nicht überprüft. Die Dokumenttypen werden anhand der Dateinamen-Erweiterungen erkannt.\n\nDie Dokumente müssen in der UTF-8-Kodierung vorliegen. Dies funktioniert nicht, falls keine Ordner im Arbeitsbereich geöffnet sind.",
"ltex.i18n.commands.ltex.clearDiagnosticsInCurrentDocument.title": "Schreibfehler in aktuellem Dokument löschen",
"ltex.i18n.commands.ltex.clearDiagnosticsInCurrentDocument.fullMarkdownDescription": "Löscht alle durch LTeX gemeldeten Schreibfehler im aktiven Dokument.\n\nDas aktive Dokument ist dasjenige, dessen Editor momentan den Fokus besitzt, oder, falls kein Editor den Fokus besitzt, welches als letztes geändert wurde.",
"ltex.i18n.commands.ltex.clearAllDiagnostics.title": "Alle Schreibfehler löschen",
diff --git a/package.nls.json b/package.nls.json
index 5aed6417..e04017e8 100644
--- a/package.nls.json
+++ b/package.nls.json
@@ -378,7 +378,7 @@
"ltex.i18n.commands.ltex.checkCurrentDocument.title": "Check Current Document",
"ltex.i18n.commands.ltex.checkCurrentDocument.fullMarkdownDescription": "Triggers a check of the active document.\n\nThe active document is the one whose editor currently has focus, or, if none has focus, the one which was changed most recently.\n\nIt is usually not necessary to run this command as LTeX automatically checks supported documents when being opened or changed.",
"ltex.i18n.commands.ltex.checkAllDocumentsInWorkspace.title": "Check All Documents in Workspace",
- "ltex.i18n.commands.ltex.checkAllDocumentsInWorkspace.fullMarkdownDescription": "Triggers a check of all Markdown and LaTeX documents in the workspace.\n\nThis does a file search for `*.bib`, `*.tex`, and `*.md` files in all folders of the workspace, depending on for which file types LTeX has been enabled (see `ltex.enabled`). Untitled and unsaved documents are not checked. The types of the documents are recognized by their file extensions.\n\nThe documents must be in UTF-8 encoding. This does not work if no folders are opened in the workspace.",
+ "ltex.i18n.commands.ltex.checkAllDocumentsInWorkspace.fullMarkdownDescription": "Triggers a check of all Markdown and LaTeX documents in the workspace.\n\nThis does a file search for `*.bib`, `*.md`, `*.rst`, and `*.tex` files in all folders of the workspace, depending on for which file types LTeX has been enabled (see `ltex.enabled`). Untitled and unsaved documents are not checked. The types of the documents are recognized by their file extensions.\n\nThe documents must be in UTF-8 encoding. This does not work if no folders are opened in the workspace.",
"ltex.i18n.commands.ltex.clearDiagnosticsInCurrentDocument.title": "Clear Diagnostics in Current Document",
"ltex.i18n.commands.ltex.clearDiagnosticsInCurrentDocument.fullMarkdownDescription": "Clears all LTeX diagnostics in the active document.\n\nThe active document is the one whose editor currently has focus, or, if none has focus, the one which was changed most recently.",
"ltex.i18n.commands.ltex.clearAllDiagnostics.title": "Clear All Diagnostics",
diff --git a/src/CommandHandler.ts b/src/CommandHandler.ts
index 20f9479a..0de7ae63 100644
--- a/src/CommandHandler.ts
+++ b/src/CommandHandler.ts
@@ -223,7 +223,8 @@ export default class CommandHandler {
let enabledCodeLanguageIds: string[];
if ((enabled === true) || (enabled === false)) {
- enabledCodeLanguageIds = (enabled ? ['bibtex', 'latex', 'markdown', 'rsweave'] : []);
+ enabledCodeLanguageIds = (enabled
+ ? ['bibtex', 'latex', 'markdown', 'restructuredtext', 'rsweave'] : []);
} else {
enabledCodeLanguageIds = enabled;
}
@@ -245,6 +246,10 @@ export default class CommandHandler {
enabledFileExtensions.add('md');
break;
}
+ case 'restructuredtext': {
+ enabledFileExtensions.add('rst');
+ break;
+ }
}
}
diff --git a/src/extension.ts b/src/extension.ts
index b9a2a01d..aae8abe7 100644
--- a/src/extension.ts
+++ b/src/extension.ts
@@ -90,7 +90,8 @@ async function startLanguageClient(context: Code.ExtensionContext,
let enabledCodeLanguageIds: string[];
if ((enabled === true) || (enabled === false)) {
- enabledCodeLanguageIds = (enabled ? ['bibtex', 'latex', 'markdown', 'rsweave'] : []);
+ enabledCodeLanguageIds = (enabled
+ ? ['bibtex', 'latex', 'markdown', 'restructuredtext', 'rsweave'] : []);
} else {
enabledCodeLanguageIds = enabled;
}