Skip to content

🔌 Beautify markdown code with Remark for VS Code.

Notifications You must be signed in to change notification settings

asbjornu/vscode-remark

 
 

Repository files navigation

vscode-remark

Beautify markdown code with Remark.

vscode-remark

Install

  • Press F1 and select Extensions: Install Extensions.
  • Search for and select remark.

See the extension installation guide for details.

Usage

  • You can use global keyboard shortcut ALT+SHIFT+F or right-click context menu Format code.
  • Or press F1 and run the command named Remark: Beautify markdown code.

Supported languages

  • Markdown

Supported settings

remark.format

  • Type: Object
  • Default: {}

Plugin configuration.

remark.format.plugins

  • Type: Array
  • Default: []
  • Example: ["github", "first-heading"]

A list globally or locally installed plugins that will be used with Remark (without remark- prefix).

See remark/plugins.

About first run with this option

When you first run the plugin is looking for an installed plugins. Therefore, the first run may take a long time. Subsequent runs are much faster.

remark.format.rules

  • Type: Object
  • Default: {}
  • Example: { "closeAtx": true }

Remark formatter rules.

See remark/options or use intellisense in VS Code:

2016-09-25_14-47-36

remark.format.plugin-name-without-prefix

  • Type: Object
  • Default: null
  • Example: "github": { "repository": "https://github.com/mmrlnc/vscode-remark" }

Configurations for plugins, if they are needed.

About error handling

Unfortunately, some plugins do not give correct errors. So when you see the following error (see image), then most likely a bug in the wrong settings of any of the plugins.

{
	"remark.format": {
		"plugins": [
			"first-heading"
		],
		"first-heading": {
			"heading": 123
		}
	}
}

image

Many plugins correctly give an error. For example:

{
	"remark.format": {
		"plugins": [
			"github"
		]
	}
}

image

Therefore, if you are experiencing problems with this extension, please create issue on GitHub repository.

Tip

You can see a detailed error report in the Developer Tools (Help -> Toggle Developer Tools). Please do not forget to attach it to your issue.

Keyboard shortcuts

For changes keyboard shortcuts, create a new rule in File -> Preferences -> Keyboard Shortcuts:

{
  "key": "ctrl+shift+c",
  "command": "remark.reformat"
}

Changelog

See the Releases section of our GitHub project for changelogs for each release version.

License

This software is released under the terms of the MIT license.

About

🔌 Beautify markdown code with Remark for VS Code.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 100.0%