-
Notifications
You must be signed in to change notification settings - Fork 7
3.Configuration
yousefhadder edited this page May 18, 2026
·
5 revisions
Important
v2.0 requires explicit setup. vim.g.markdown_plus is no longer supported.
require("markdown-plus").setup(){
"yousefhadder/markdown-plus.nvim",
ft = "markdown",
opts = {},
}require("markdown-plus").setup({
enabled = true,
features = {
list_management = true,
text_formatting = true,
thematic_break = true,
links = true,
images = true,
headers_toc = true,
quotes = true,
callouts = true,
code_block = true,
html_block_awareness = true,
table = true,
footnotes = true,
},
keymaps = {
enabled = true,
},
filetypes = { "markdown" },
toc = {
initial_depth = 2,
},
thematic_break = {
style = "---", -- "---" | "***" | "___"
},
callouts = {
default_type = "NOTE",
custom_types = {},
},
code_block = {
enabled = true,
fence_style = "backtick", -- "backtick" | "tilde"
languages = { "lua", "python", "javascript", "typescript", "bash", "json", "yaml", "markdown" },
},
table = {
enabled = true,
auto_format = true,
default_alignment = "left",
confirm_destructive = true,
width_mode = "literal", -- "literal" | "segment" set "segment" so cells
-- containing <br> don't inflate column width
wrap_break = "<br>", -- token used by wrap/break commands and the
-- cell-editor popup join
max_column_width = nil, -- integer ≥ 1 or nil width used by wrap-cell
-- and auto-wrap; nil prompts each time
auto_wrap = false, -- when true (and max_column_width is set), the
-- formatter auto-wraps cells exceeding the cap.
-- Per-table opt-out: place
-- <!-- markdown-plus: no-wrap --> on the line
-- immediately above the table
cell_editor = { -- floating popup for <localleader>te
enabled = true,
border = "rounded", -- nvim_open_win border style
width = 0.6, -- fraction of editor width, (0, 1]
height = 0.4, -- fraction of editor height, (0, 1]
},
keymaps = {
enabled = true,
prefix = "<localleader>t",
insert_mode_navigation = true,
},
},
footnotes = {
section_header = "Footnotes",
confirm_delete = true,
},
list = {
smart_outdent = true,
checkbox_completion = {
enabled = false,
format = "emoji", -- "emoji" | "comment" | "dataview" | "parenthetical"
date_format = "%Y-%m-%d",
remove_on_uncheck = true,
update_existing = true,
},
},
links = {
smart_paste = {
enabled = false,
timeout = 5, -- 1..30
},
},
})- Replace old
<leader>defaults with<localleader>. - If desired, set localleader before plugin setup:
vim.g.maplocalleader = "\\"- If you integrate with internal header parsing, update calls to:
require("markdown-plus.headers").parse_header(line, next_line)