plugins.markdown-preview.settings

The configuration options for markdown-preview without the mkdp_ prefix.

Example: To set mkdp_foo_bar to 1, write

  settings = {
    foo_bar = true;
  };

Type: attribute set of anything

Default: { }

Example:

{
  auto_close = true;
  auto_start = true;
  browser = "firefox";
  echo_preview_url = true;
  highlight_css = {
    __raw = "vim.fn.expand('~/highlight.css')";
  };
  markdown_css = "/Users/username/markdown.css";
  page_title = "「\${name}」";
  port = "8080";
  preview_options = {
    disable_filename = true;
    disable_sync_scroll = true;
    sync_scroll_type = "middle";
  };
  theme = "dark";
}

Declared by:

plugins.markdown-preview.settings.auto_close

Auto close current preview window when change from markdown buffer to another buffer.

Type: null or boolean or raw lua code

Default: null

Plugin default: true

Declared by:

plugins.markdown-preview.settings.auto_start

Open the preview window after entering the markdown buffer.

Type: null or boolean or raw lua code

Default: null

Plugin default: false

Declared by:

plugins.markdown-preview.settings.browser

The browser to open the preview page.

Type: null or string or raw lua code

Default: null

Plugin default: ""

Declared by:

plugins.markdown-preview.settings.browser_func

A custom vim function name to open preview page. This function will receive url as param.

Type: null or string or raw lua code

Default: null

Plugin default: ""

Declared by:

plugins.markdown-preview.settings.combine_preview

Combine preview window. If enable it will reuse previous opened preview window when you preview markdown file. Ensure to set auto_close = false if you have enable this option.

Type: null or boolean or raw lua code

Default: null

Plugin default: false

Declared by:

plugins.markdown-preview.settings.combine_preview_auto_refresh

Auto refetch combine preview contents when change markdown buffer only when combine_preview is true.

Type: null or boolean or raw lua code

Default: null

Plugin default: true

Declared by:

plugins.markdown-preview.settings.command_for_global

Enable markdown preview for all files (by default, the plugin is only enabled for markdown files).

Type: null or boolean or raw lua code

Default: null

Plugin default: false

Declared by:

plugins.markdown-preview.settings.echo_preview_url

Echo preview page url in command line when opening the preview page.

Type: null or boolean or raw lua code

Default: null

Plugin default: false

Declared by:

plugins.markdown-preview.settings.filetypes

Recognized filetypes. These filetypes will have MarkdownPreview... commands.

Type: null or (list of (string or raw lua code))

Default: null

Plugin default: ["markdown"]

Declared by:

plugins.markdown-preview.settings.highlight_css

Custom highlight style. Must be an absolute path like “/Users/username/highlight.css” or {__raw = "vim.fn.expand('~/highlight.css')";}.

Type: null or string or raw lua code

Default: null

Plugin default: ""

Declared by:

plugins.markdown-preview.settings.images_path

Use a custom location for images.

Type: null or string or raw lua code

Default: null

Plugin default: ""

Declared by:

plugins.markdown-preview.settings.markdown_css

Custom markdown style. Must be an absolute path like "/Users/username/markdown.css" or {__raw = "vim.fn.expand('~/markdown.css')";}.

Type: null or string or raw lua code

Default: null

Plugin default: ""

Declared by:

plugins.markdown-preview.settings.open_ip

Custom IP used to open the preview page. This can be useful when you work in remote vim and preview on local browser. For more detail see: https://github.com/iamcco/markdown-preview.nvim/pull/9.

Type: null or string or raw lua code

Default: null

Plugin default: ""

Declared by:

plugins.markdown-preview.settings.open_to_the_world

Make the preview server available to others in your network. By default, the server listens on localhost (127.0.0.1).

Type: null or boolean or raw lua code

Default: null

Plugin default: false

Declared by:

plugins.markdown-preview.settings.page_title

Preview page title. $${name} will be replaced with the file name.

Type: null or string or raw lua code

Default: null

Plugin default: "「\${name}」"

Declared by:

plugins.markdown-preview.settings.port

Custom port to start server or empty for random.

Type: null or string or raw lua code

Default: null

Plugin default: ""

Declared by:

plugins.markdown-preview.settings.refresh_slow

Refresh markdown when save the buffer or leave from insert mode, default false is auto refresh markdown as you edit or move the cursor.

Type: null or boolean or raw lua code

Default: null

Plugin default: false

Declared by:

plugins.markdown-preview.settings.theme

Default theme (dark or light). By default the theme is define according to the preferences of the system.

Type: null or one of “dark”, “light”

Default: null

Declared by: