-
Notifications
You must be signed in to change notification settings - Fork 39
Migration guide
Here's the major changes in version v24
.
Automatically setting up hybrid mode callbacks. Hybrid mode can now be set up without changing the callback(s).
--- Before
{
modes = { "n", "v", "c", "nc" },
hybrid_modes = { "n" },
callbacks = {
on_enable = function (_, win)
vim.wo[win].conceallevel = 2;
vim.wo[win].concealcursor = "vc";
end
}
}
--- Now
{
--- "modes" is used for demonstration
--- purposes. In most cases you wouldn't
--- need to change this.
modes = { "n", "v", "c", "nc" },
hybrid_modes = { "n" }
}
Custom block quote option name changes,
-
callout_preview
→preview
. -
callout_preview_hl
→preview_hl
. -
custom_title
→title
. -
custom_icon
→icon
.
--- Before
block_quotes = {
callouts = {
{
callout_preview = "text",
callout_preview_hl = nil,
custom_title = true,
custom_icon = ""
}
}
}
--- Now
block_quotes = {
callouts = {
{
preview = "text",
preview_hl = nil,
title = true,
icon = ""
}
}
}
pending
checkbox state has been moved to custom
states.
checkboxes = {
--- Before
pending = {
icon = "◯",
hl = "CheckboxPending"
},
--- Now
custom = {
{
match_string = "-",
icon = "◯",
hl = "CheckboxPending"
}
}
}
Custom checkbox option name changes.
-
match
→match_string
.
--- Before
checkboxes = {
custom = {
{
match = "o"
}
}
}
--- Now
checkboxes = {
custom = {
{
match_string = "o"
}
}
}
Checkboxes now use nerd font
instead of Unicode symbols
.
If you prefer the old configuration, you can use the legacy
preset.
minimal
style has been deprecated.
Note
language
style has been renamed to block
.
--- Before
code_blocks = {
style = "minimal"
}
--- Now
code_blocks = {
style = "block"
}
github
heading style renamed to "decorated".
--- Before
setext_1 = {
style = "github"
}
--- Now
setext_1 = {
style = "decorated"
}
Old brackets
style has been deprecated.
--- Before
latex = {
brackets = {
opening = {},
closing = {},
scope = {}
}
}
--- Now
latex = {
brackets = {
hl = "@puntuation.brackets"
}
}
Custom links option name change.
-
match
→match_string
.
--- Before
links = {
hyperlinks = {
custom = {
match = "stackoverflow%.com"
}
}
}
--- Now
links = {
hyperlinks = {
custom = {
match_string = "stackoverflow%.com"
}
}
}
n)
style lists now have their own option.
--- Now
list_items = {
marker_parenthesis = {
add_padding = true
}
}
Table configuration structure has been changed.
Note
The parts
option has been renamed to text
.
The hl
option has been renamed to hls
.
--- Now
tables = {
text = {
top = { "╭", "─", "╮", "┬" },
header = { "│", "│", "│" },
separator = { "├", "┼", "┤", "─" },
row = { "│", "│", "│" },
bottom = { "╰", "─", "╯", "┴" },
overlap = { "├", "┼", "┤", "─" },
align_left = "╼",
align_right = "╾",
align_center = { "╴", "╶",}
}
}