If you write documentation in Visual Studio Code, watching Grammarly treat your YAML metadata and Python snippets like misspelled English is infuriating. Every camelCase variable gets a red squiggly line. Every frontmatter tag triggers an alert.
Here is the direct answer: in the legacy community extension znck.grammarly, you suppress code blocks and inline syntax by adding AST ignore rules to settings.json. But 365Finds must give you the unvarnished commercial reality first: Grammarly officially discontinued its developer SDK in 2024, leaving community VS Code extensions archived, while the system-level Grammarly Desktop app cannot parse Markdown AST at all.
Below is how to configure the ignore syntax if you maintain an existing setup, how to silence Grammarly Desktop's intrusive overlays in VS Code, and what 365Finds recommends technical writing teams actually deploy instead.
1. Configuring AST Node Suppression in settings.json
The primary extension that brought Grammarly directly into VS Code was Rahul Kadyan’s znck.grammarly. It utilized a tree-sitter Markdown parser to separate prose from underlying syntax.
To stop the extension from flagging fenced code blocks and inline backticks, add the grammarly.diagnostics block to your user or workspace settings.json:
{
"grammarly.diagnostics": {
"[markdown]": {
"ignore": [
"code",
"inlineCode"
]
}
},
"grammarly.files.include": [
"**/*.md",
"**/*.markdown"
],
"grammarly.files.exclude": [
"**/node_modules/**",
"**/.git/**"
]
}
What These Keys Do
"code": Instructs the language server to skip multi-line fenced code blocks (```)."inlineCode": Skips single-backtick expressions (`my_variable`) within paragraphs.grammarly.files.exclude: Prevents the engine from scanning generated files or dependency directories.
The Problem with YAML Frontmatter
The tree-sitter grammar inside znck.grammarly never handled YAML frontmatter cleanly. Frontmatter headers—the block bounded by --- at the top of Jekyll, Hugo, Astro, or Docusaurus files—contain key-value pairs (layout: doc, slug: /api-v1).
Because the parser frequently interprets frontmatter as raw text rather than an ignored structural node, syntax properties like tags: or unquoted titles continue to trigger grammar false positives. You cannot reliably pass "frontmatter" or "yaml" to ignore in unpatched versions of the extension.
2. Dealing with Grammarly Desktop in VS Code
Many technical writers do not run an extension at all; they run the Grammarly Desktop client for macOS or Windows.
Grammarly Desktop injects a floating widget into active text fields across your operating system. In VS Code, it sees an open Markdown document as an enormous plain-text buffer. It has zero awareness of Markdown abstract syntax trees (AST). It flags indented shell commands, underlines YAML keys, and tries to "correct" URL fragments inside Markdown links.
365Finds strongly advises against letting Grammarly Desktop hook into VS Code. The cognitive noise destroys developer flow.
How to Blacklist VS Code in Grammarly Desktop:
- Open the Grammarly Desktop application from your system tray or menu bar.
- Navigate to Settings (or Preferences).
- Select the Blocked Applications tab (or Turn Off Grammarly in...).
- Add Visual Studio Code (
Code.exeon Windows,Visual Studio Code.appon macOS) to the blocked list.
This silences the floating overlay and stops the client from fighting your code editor.
3. The Structural Breakdown: Why Grammarly Fails Technical Writers
At 365Finds, our assessment is straightforward: Grammarly was engineered for continuous linear prose—emails, corporate memos, academic essays, and Google Docs. It operates on statistical natural language models that expect punctuation, full sentences, and standard capitalization.
Markdown files for technical documentation are not linear prose. They are hybrid documents containing:
- Document metadata (YAML/TOML frontmatter)
- Syntactic structures (fenced code, inline literals)
- Custom markup components (MDX tags, callout directives)
When Grammarly’s developer SDK was active, community developers attempted to bridge this gap by parsing the AST and stripping non-prose nodes before sending text to Grammarly’s API. When Grammarly sunset its Text Editor SDK in January 2024 to consolidate resources on its proprietary enterprise apps, that bridge collapsed. The znck/grammarly repository was archived in May 2024.
4. The 365Finds Recommended Setup for VS Code Documentation
If your team is trying to force Grammarly to behave inside VS Code, 365Finds recommends abandoning the workaround. Running archived extensions with broken authentication or enduring a blind desktop widget is a waste of engineering time.
Technical writing teams should implement a two-tier architecture:
┌────────────────────────────────────────────────────────┐
│ VS Code Workspace │
│ │
│ ┌─────────────────────┐ ┌─────────────────────┐ │
│ │ Vale │ │ LTeX+ │ │
│ │ (Prose Style & AST) │ │ (Grammar/Syntax) │ │
│ └──────────┬──────────┘ └──────────┬──────────┘ │
└──────────────┼──────────────────────────┼──────────────┘
▼ ▼
Native AST Ignores: Native AST Ignores:
• Fenced Code Blocks • YAML Frontmatter
• Inline Backticks • Code Blocks
• Frontmatter Keys • Raw HTML/MDX
Option A: Vale (The Gold Standard for Docs Teams)
Vale is an open-source prose linter built from the ground up for technical writers. It parses Markdown AST natively.
- Automatically ignores YAML frontmatter without configuration.
- Automatically skips code blocks and inline backticks.
- Allows you to enforce custom style guides (Google Developer Documentation Style Guide, Microsoft Writing Style Guide).
- Installs via the VS Code extension
errata-ai.vale-vscode.
Option B: LTeX+ (For Real-Time Offline Grammar Checking)
If you want real-time grammar checking that feels like Grammarly without the syntax interference, install LTeX+ (the maintained community fork of vscode-ltex using LanguageTool).
- Natively recognizes CommonMark and GitHub Flavored Markdown.
- Ignores code fences, inline syntax, and YAML headers out of the box.
- Runs locally on your machine via a bundled Java language server, ensuring no proprietary documentation is sent to third-party cloud servers.
When Grammarly Still Has a Role
If your organization requires Grammarly Premium for final executive review, do not run it inside VS Code. Write and lint your Markdown files in VS Code using Vale or LTeX+. Once the document reaches the review or staging phase, copy the rendered HTML preview or text output into Grammarly Web for a final polish.