perf(markdown): prevent headlines.nvim slowing down initial rendering with nvim README.md

This commit is contained in:
Folke Lemaitre
2023-10-25 15:40:57 +02:00
parent 1e1b68d633
commit b651560ad0

View File

@ -79,5 +79,12 @@ return {
return opts
end,
ft = { "markdown", "norg", "rmd", "org" },
config = function(_, opts)
-- PERF: schedule to prevent headlines slowing down opening a file
vim.schedule(function()
require("headlines").setup(opts)
require("headlines").refresh()
end)
end,
},
}