Skip to content

1.Installation

yousefhadder edited this page Dec 25, 2025 · 2 revisions

Installation

Requirements

  • Neovim 0.11+ (uses modern Lua APIs)
  • No external dependencies

Installation Methods

Using lazy.nvim (Recommended)

Minimal configuration:

{
  "yousefhadder/markdown-plus.nvim",
  ft = "markdown",
  opts = {},  -- Required: calls setup() with default options
}

With custom options:

{
  "yousefhadder/markdown-plus.nvim",
  ft = "markdown",
  opts = {
    -- Configuration options (all optional)
    enabled = true,
    features = {
      list_management = true,  -- List management features
      text_formatting = true,  -- Text formatting features
      headers_toc = true,      -- Headers + TOC features
      links = true,            -- Link management features
      images = true,           -- Image link management features
      quotes = true,           -- Blockquote toggling feature
      callouts = true,         -- GFM callouts/admonitions feature
      code_block = true,       -- Code block conversion feature
      table = true,            -- Table support features
      footnotes = true,        -- Footnotes management features
    },
    footnotes = {        -- Footnotes configuration
      section_header = "Footnotes",  -- Header for footnotes section
      confirm_delete = true,         -- Confirm before deleting footnotes
    },
    keymaps = {
      enabled = true,  -- Enable default keymaps (<Plug> available for custom)
    },
    toc = {            -- TOC window configuration
      initial_depth = 2,
    },
    callouts = {       -- Callouts configuration
      default_type = "NOTE",
      custom_types = {},  -- Add custom types like { "DANGER", "SUCCESS" }
    },
    table = {          -- Table sub-configuration
      auto_format = true,
      default_alignment = "left",
      confirm_destructive = true,  -- Confirm before transpose/sort operations
      keymaps = {
        enabled = true,
        prefix = "<leader>t",
        insert_mode_navigation = true,  -- Alt+hjkl cell navigation
      },
    },
    filetypes = { "markdown" },  -- Filetypes to enable the plugin for
  },
}

Using with multiple filetypes:

{
  "yousefhadder/markdown-plus.nvim",
  ft = { "markdown", "text", "txt" },  -- When to load the plugin (plugin manager)
  opts = {
    filetypes = { "markdown", "text", "txt" },  -- When to activate features (for subsequent buffers)
  },
}

Note: Both ft and filetypes are needed when using multiple filetypes:

  • ft tells lazy.nvim when to load the plugin
  • filetypes tells the plugin which filetypes to activate on for subsequent buffers opened after the plugin loads

Using LuaRocks

# Install via LuaRocks
luarocks install markdown-plus.nvim

# Or install development version
luarocks install --server=https://luarocks.org/dev markdown-plus.nvim

Then add to your Neovim configuration:

-- No plugin manager needed, already installed via LuaRocks
require("markdown-plus").setup({
  -- Your configuration here
})

Using packer.nvim

use {
  "yousefhadder/markdown-plus.nvim",
  ft = "markdown",
  config = function()
    require("markdown-plus").setup()
  end,
}

Manual Installation

  1. Clone this repository to your Neovim configuration directory:
cd ~/.config/nvim
git clone https://github.com/yousefhadder/markdown-plus.nvim
  1. Add to your init.lua:
require("markdown-plus").setup()

Clone this wiki locally