Skip to content

Commit

Permalink
Add support for ConTeXt
Browse files Browse the repository at this point in the history
  • Loading branch information
valentjn committed Nov 28, 2021
1 parent 5799fc7 commit 4be4e47
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
[![open issues](https://badgen.net/github/open-issues/valentjn/ltex-ls?label=open/closed%20issues&color=blue)](https://github.com/valentjn/ltex-ls/issues) [![closed issues](https://badgen.net/github/closed-issues/valentjn/ltex-ls?label=)](https://github.com/valentjn/ltex-ls/issues)

<!-- #if TARGET == 'vscode' -->
**LT<sub>E</sub>X** provides offline grammar checking of various markup languages in Visual Studio Code using [LanguageTool (LT)](https://languagetool.org/). LT<sub>E</sub>X currently supports BibT<sub>E</sub>X, L<sup>A</sup>T<sub>E</sub>X, Markdown, Org, reStructuredText, R Sweave, and XHTML documents. In addition, LT<sub>E</sub>X can check comments in many popular programming languages (optional, opt-in).
**LT<sub>E</sub>X** provides offline grammar checking of various markup languages in Visual Studio Code using [LanguageTool (LT)](https://languagetool.org/). LT<sub>E</sub>X currently supports BibT<sub>E</sub>X, ConT<sub>E</sub>Xt, L<sup>A</sup>T<sub>E</sub>X, Markdown, Org, reStructuredText, R Sweave, and XHTML documents. In addition, LT<sub>E</sub>X can check comments in many popular programming languages (optional, opt-in).
<!-- #elseif TARGET == 'coc.nvim' -->
<!-- **LT<sub>E</sub>X** provides offline grammar checking of various markup languages in Vim/Neovim using [LanguageTool (LT)](https://languagetool.org/) and [coc.nvim](https://github.com/neoclide/coc.nvim). LT<sub>E</sub>X currently supports BibT<sub>E</sub>X, L<sup>A</sup>T<sub>E</sub>X, Markdown, Org, reStructuredText, R Sweave, and XHTML documents. In addition, LT<sub>E</sub>X can check comments in many popular programming languages (optional, opt-in). -->
<!-- **LT<sub>E</sub>X** provides offline grammar checking of various markup languages in Vim/Neovim using [LanguageTool (LT)](https://languagetool.org/) and [coc.nvim](https://github.com/neoclide/coc.nvim). LT<sub>E</sub>X currently supports BibT<sub>E</sub>X, ConT<sub>E</sub>Xt, L<sup>A</sup>T<sub>E</sub>X, Markdown, Org, reStructuredText, R Sweave, and XHTML documents. In addition, LT<sub>E</sub>X can check comments in many popular programming languages (optional, opt-in). -->
<!-- #endif -->

The difference to regular spell checkers is that LT<sub>E</sub>X not only detects spelling errors, but also many grammar and stylistic errors such as:
Expand All @@ -49,7 +49,7 @@ LT<sub>E</sub>X 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)

- **Supported markup languages:** BibT<sub>E</sub>X, L<sup>A</sup>T<sub>E</sub>X, Markdown, Org, reStructuredText, R Sweave, XHTML
- **Supported markup languages:** BibT<sub>E</sub>X, ConT<sub>E</sub>Xt, L<sup>A</sup>T<sub>E</sub>X, Markdown, Org, reStructuredText, R Sweave, XHTML
- Comment checking in **many popular programming languages** (optional, opt-in)
- Comes with **everything included,** no need to install Java or LanguageTool
- **Offline checking:** Does not upload anything to the internet
Expand Down
3 changes: 3 additions & 0 deletions changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
</properties>
<body>
<release version="13.1.0" date="upcoming">
<action type="add" issue="ltex-ls#120">
Add support for ConTeXt
</action>
<action type="add" issue="ltex-ls#123">
Add support for strikethrough as in [GitHub Flavored Markdown](https://github.github.com/gfm/#strikethrough-extension-)
</action>
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
"onCommand:_ltex.openMarkdownExample",
"onCommand:_ltex.openLatexExample",
"onLanguage:bibtex",
"onLanguage:context",
"onLanguage:context.tex",
"onLanguage:html",
"onLanguage:latex",
"onLanguage:markdown",
Expand Down Expand Up @@ -151,6 +153,8 @@
"scope": "window",
"default": [
"bibtex",
"context",
"context.tex",
"html",
"latex",
"markdown",
Expand Down
10 changes: 10 additions & 0 deletions src/CommandHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ export default class CommandHandler {

private static readonly _defaultCodeLanguageIds: string[] = [
'bibtex',
'context',
'context.tex',
'html',
'latex',
'markdown',
Expand Down Expand Up @@ -330,6 +332,14 @@ export default class CommandHandler {
enabledFileExtensions.add('cs');
break;
}
case 'context': {
enabledFileExtensions.add('tex');
break;
}
case 'context.tex': {
enabledFileExtensions.add('tex');
break;
}
case 'dart': {
enabledFileExtensions.add('dart');
break;
Expand Down

0 comments on commit 4be4e47

Please sign in to comment.