From 0d63047fda70ad0cacfe31bf0f903e17ca7399aa Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Sun, 1 Jun 2025 16:08:51 +0900 Subject: modified plugins/markdown.lua --- .../TheSiahxyz/lua/thesiahxyz/plugins/markdown.lua | 32 ++++++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/markdown.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/markdown.lua index be3ee1d..82346b5 100644 --- a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/markdown.lua +++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/markdown.lua @@ -190,9 +190,35 @@ return { }) end, keys = { - { "mp", "MarkdownPreview", desc = "Markdown Preview" }, - { "mx", "MarkdownPreviewStop", desc = "Markdown Stop" }, - { "md", "MarkdownPreviewToggle", desc = "Markdown Toggle" }, + { "mp", "MarkdownPreview", desc = "Markdown preview" }, + { "mx", "MarkdownPreviewStop", desc = "Markdown stop" }, + { "md", "MarkdownPreviewToggle", desc = "Markdown toggle" }, + }, + }, + { + "brianhuster/live-preview.nvim", + dependencies = { + -- You can choose one of the following pickers + "nvim-telescope/telescope.nvim", + -- "ibhagwan/fzf-lua", + -- "echasnovski/mini.pick", + }, + cmd = { "LivePreview start", "LivePreview close", "LivePreview pick", "LivePreview help" }, + init = function() + if vim.fn.executable("npx") then + vim.g.mkdp_filetypes = { "markdown" } + end + local wk = require("which-key") + wk.add({ + mode = { "n", "v" }, + { "ml", group = "Markdown live" }, + }) + end, + keys = { + { "mlp", "LivePreview start", desc = "Markdown live preview" }, + { "mlx", "LivePreview close", desc = "Markdown live close" }, + { "mlc", "LivePreview pick", desc = "Markdown live pick" }, + { "mlh", "LivePreview help", desc = "Markdown live help" }, }, }, { -- cgit v1.2.3