feat(image): make math packages configurable. Closes #1295

This commit is contained in:
Folke Lemaitre 2025-02-19 06:48:02 +01:00
parent aaed4a9411
commit e27ba726b1
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
4 changed files with 20 additions and 3 deletions

View file

@ -103,6 +103,11 @@ local defaults = {
---@class snacks.image.convert.Config
convert = {
notify = true, -- show a notification on error
math = {
-- for latex documents, the doc packages are included automatically,
-- but you can add more packages here. Useful for markdown documents.
packages = { "amsmath", "amssymb", "amsfonts", "amscd", "mathtools", "physics", "siunitx", "mhchem" },
},
---@type snacks.image.args
mermaid = function()
local theme = vim.o.background == "light" and "neutral" or "dark"