Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>LaTeX grammar checkNew to Visual Studio Code? Get it now.
LaTeX grammar check

LaTeX grammar check

connor

|
2 installs
| (1) | Free
Use Trinka/sapling Grammar Check API to review selected English paragraphs in Markdown and LaTeX files and apply suggestions.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

LaTeX Grammar Checker

A VS Code extension that checks selected English paragraphs in Markdown and LaTeX files using either Trinka or Sapling grammar APIs, shows suggestions as diagnostics, and provides quick fixes to apply or reject suggestions.

Features

  • Select a paragraph in a Markdown or LaTeX file and run a grammar check.
  • Choose between two providers: trinka or sapling.
  • Status bar shows the current provider and allows toggling.
  • Suggestions appear in Problems as diagnostics with quick actions to apply or reject.
  • Configurable supported languages, file extensions, default provider, API keys, and default keybindings.

Quick Start

  1. Build and run the extension in the Extension Development Host:
npm install
npm run build
# Press F5 in VS Code to launch the extension host
  1. Configure API keys (Settings -> Extensions -> Grammar Extension Settings):
  • grammer.trinkaApiKey — your Trinka API key
  • grammer.saplingApiKey — your Sapling API key
  1. Optionally set default provider:
  • grammer.defaultProvider — sapling or trinka (default: sapling)
  1. Select a paragraph in a .md or .tex file and run the command:
  • Command Palette: Grammar: Check Selection (or use the status bar button)

Commands

  • Grammar: Check Selection (grammer.checkSelection) — Run grammar check using the configured default provider.
  • Grammar: Toggle Provider (grammer.toggleProvider) — Toggle between Trinka and Sapling and update the setting.
  • Provider-specific: trinka.checkSelection, sapling.checkSelection (for explicit provider checks).

Configuration

Configuration keys (Settings → Extensions → Grammar Extension Settings):

  • grammer.supportedLanguages — array of language IDs that will show the status bar (default: ["markdown","latex","tex"]).
  • grammer.supportedExtensions — array of file extensions (including dot) to show status bar (default: [".md",".tex"]).
  • grammer.defaultProvider — default provider ("sapling" or "trinka", default: sapling).
  • grammer.trinkaApiKey — Trinka API key (string).
  • grammer.saplingApiKey — Sapling API key (string).
  • grammer.keybindings.checkSelection — preferred keybinding string (for documentation only).
  • grammer.keybindings.toggleProvider — preferred keybinding string (for documentation only).

Keybindings

The extension contributes default keybindings:

  • shift+alt+c — Grammar: Check Selection (when editor has focus)
  • shift+alt+t — Grammar: Toggle Provider

To customize, open your keybindings.json and add or change entries:

{
	"key": "ctrl+alt+g",
	"command": "grammer.checkSelection",
	"when": "editorTextFocus"
}

Notes & Security

  • API keys are stored in workspace/user settings as plain text in this implementation. For improved security, consider storing them in context.secrets and use a command to set them securely.
  • The Sapling API response parsing attempts to compute absolute offsets. Some edge cases (sentence offsets vs paragraph offsets) may produce slightly off ranges; if so, check the suggestions list and apply manually.

Development

  • The source code is in src/. TypeScript is used; build with npm run build.
  • To run extension in debug host press F5.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft