v8.0.0
·
209 commits
to main
since this release
8.0.0 (2025-02-06)
⚠ BREAKING CHANGES
This release includes only a single change which breaks any function values in user configurations. Rather than passing a list of arguments to the functions we now provide a single context table with the same information (591e256).
The fix to any errors is straightforward as the fields of the context continue to have the same names. So if you have an existing function like:
function(param1, param2)
vim.print(param1)
vim.print(param2)
endThe fixed version would be:
function(ctx)
vim.print(ctx.param1)
vim.print(ctx.param2)
endIf you use the same parameters many times in the function and don't want to add the ctx. prefix everywhere you can add a line at the top to define local variables with the same name as before and keep the rest of the function body unchanged:
function(ctx)
local param1, param2 = ctx.param1, ctx.param2
vim.print(param1)
vim.print(param2)
endThe fields impacted are:
- The
parsefunctions incustom_handlers:buf->ctx.bufroot->ctx.root
- The callbacks in
on:on.attach&on.render:buf->ctx.buf
bullet.icons&bullet.ordered_iconsif a non-default function was set:level->ctx.levelindex->ctx.indexvalue->ctx.value
heading.iconsif a function was set:sections->ctx.sections