diff options
| -rw-r--r-- | mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/markdown.lua | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/markdown.lua b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/markdown.lua index 0b5fb5c..dc96a9e 100644 --- a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/markdown.lua +++ b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/markdown.lua @@ -1,3 +1,16 @@ +local sysname = vim.loop.os_uname().sysname +local backend, build, processor + +if sysname == "Darwin" then + backend = "kitty" + processor = "magick_cli" + build = false +else + backend = "ueberzug" + processor = "magick_rock" + build = true +end + -- Select the current cell local function select_cell() local bufnr = vim.api.nvim_get_current_buf() @@ -337,11 +350,12 @@ return { { "benlubas/image-save.nvim", cmd = "SaveImage" }, { "3rd/image.nvim", + build = build, dependencies = { "leafo/magick", "vhyrro/luarocks.nvim" }, config = function() require("image").setup({ - backend = "ueberzug", -- or "kitty", whatever backend you would like to use - processor = "magick_rock", -- or "magick_cli" + backend = backend, -- "ueberzug" or "kitty", whatever backend you would like to use + processor = processor, -- "magick_rock" or "magick_cli" integrations = { markdown = { enabled = true, |
