Skip to content

fannheyward/coc-markdownlint

Repository files navigation

coc-markdownlint

markdownlint for Vim/Neovim, works as coc.nvim extension.

image

Features

  • Style lint
  • Autofix

<Plug>(coc-codeaction) on current diagnostic, you will find available codeAction, choose by number to fix.

autofix

Install

:CocInstall coc-markdownlint

Configurations

  • markdownlint.onOpen: lint on open a file, default true
  • markdownlint.onChange: lint on changing a file, default true
  • markdownlint.onSave: lint on saving a file, default true
  • markdownlint.config: configurations rules used by markdownlint, default {}

Commands

  • markdownlint.fixAll: fix all errors in current file found by markdownlint

CodeActions

Provides codeAction for current file or line to disable markdownlint, triggered by <Plug>(coc-codeaction) and <Plug>(coc-codeaction-line)

  • <!-- markdownlint-disable-file -->
  • <!-- markdownlint-disable-next-line -->

Rules

You can configures the markdownlint rules to use, for example:

{
  "default": true,
  "line_length": false
}

coc-markdownlint can read configurations from:

  1. Global configuration file that rc can find, for example $HOME/.markdownlintrc. Checkout rc for more examples.
  2. markdownlint.config section in coc-settings.json
  3. .markdownlint.{json, yaml} in local workspace root

License

MIT


This extension is created with create-coc-extension