Remark plugins

Configure Remark plugins for editor customizations.

The Motif editor is based on Monaco, which is the same editor that powers Visual Studio Code. Thanks to its plugin architecture, it is possible to customize it extensively. Motif supports Remark plugins, which allow you to add features like spell checking, readability warnings and stylistic errors to the editing experience. You can also create your own plugins.

To configure the editor using Remark plugins, simply add a file named .remarkrc.js at the root of your project. Here is an example configuration:

// This is your remark configuration file. It’s used for validating your
// Markdown and MDX files. Note that they’re not used for transforming your
// files.
// Typically remark plugins catch stylistic errors in the Markdown syntax,
// whereas retext plugins catch writing problems.
// Find more remark-lint plugins at
// Find more retext plugins at
import dictionary from 'dictionary-en'
import retextContractions from 'retext-contractions'
import retextDiacretics from 'retext-diacritics'
import retextEnglish from 'retext-english'
import retextEquality from 'retext-equality'
import retextIndefiniteArticle from 'retext-indefinite-article'
import retextProfanities from 'retext-profanities'
import retextQuotes from 'retext-quotes'
import retextReadability from 'retext-readability'
import retextRedundantAcronyms from 'retext-redundant-acronyms'
import retextRepeatedWords from 'retext-repeated-words'
import retextSimplify from 'retext-simplify'
import retextSpell from 'retext-spell'
import retextSyntaxUrls from 'retext-syntax-urls'
import { unified } from 'unified'
// This is your personal dictionary. This allows you to define words that would
// otherwise be reported by retext-spell. Each word is defined on its own line.
// It may either be a word, or or be of the form “new word/similar word”. The
// latter means the new word follows the same rules as the similar word.
const personal = `
// retext plugins must be specified using a unified pipeline
const retext = unified()
.use(retextSpell, { dictionary, personal })
export default {
settings: {
listItemIndent: 'one',
plugins: [
// Possible Errors
// Stylistic issues
['remark-lint-checkbox-character-style', { checked: 'x', unchecked: ' ' }],
['remark-lint-emphasis-marker', '_'],
['remark-lint-strikethrough-marker', '~~'],
['remark-lint-strong-marker', '*'],
// Content issues
['remark-retext', retext],