From e9c282a185a40877e797d67dd88581fc02507613 Mon Sep 17 00:00:00 2001 From: Tigor Hutasuhut Date: Tue, 1 Oct 2024 22:24:51 +0700 Subject: [PATCH] markdown: move to live-preview nvim for less dependencies --- lazy-lock.json | 2 +- lua/plugins/markdown.lua | 54 ++++++++++++++++++++++------------------ 2 files changed, 31 insertions(+), 25 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index f6ae1c0..91fd936 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -73,9 +73,9 @@ "nvim-treesitter-textobjects": { "branch": "master", "commit": "3a3c6244553f13fdd92d312c82722b57ce6c4bec" }, "nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" }, "one-small-step-for-vimkind": { "branch": "main", "commit": "0f0d5bc67786c36edc2cb6fb5faa5c09dd1a6e10" }, - "peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" }, "persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" }, "plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" }, + "prelive.nvim": { "branch": "main", "commit": "40f52a31ffe7720f06b02eaa793468715f249836" }, "presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" }, "project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" }, "render-markdown": { "branch": "main", "commit": "2f9d4f0be8784ed4fef5960eb7b80bf60c5fdf56" }, diff --git a/lua/plugins/markdown.lua b/lua/plugins/markdown.lua index 19171d1..2d51591 100644 --- a/lua/plugins/markdown.lua +++ b/lua/plugins/markdown.lua @@ -8,30 +8,36 @@ return { end, }, { - "toppair/peek.nvim", + "brianhuster/live-preview.nvim", + cmd = { "LivePreview" }, ft = { "markdown" }, - cmd = { "Peek" }, - build = "deno task --quiet build:fast", - opts = function() - vim.api.nvim_create_autocmd("FileType", { - desc = "Create peek command on markdown ft", - pattern = "markdown", - callback = function(ev) - vim.api.nvim_buf_create_user_command(ev.buf, "Peek", function(ctx) - local peek = require "peek" - if peek.is_open() then - if ctx.bang then - peek.close() - end - return - end - peek.open() - end, { bang = true }) - end, - }) - return { - app = { "chromium", "--new-window" }, - } - end, + config = true, }, + -- { + -- "toppair/peek.nvim", + -- ft = { "markdown" }, + -- cmd = { "Peek" }, + -- build = "deno task --quiet build:fast", + -- opts = function() + -- vim.api.nvim_create_autocmd("FileType", { + -- desc = "Create peek command on markdown ft", + -- pattern = "markdown", + -- callback = function(ev) + -- vim.api.nvim_buf_create_user_command(ev.buf, "Peek", function(ctx) + -- local peek = require "peek" + -- if peek.is_open() then + -- if ctx.bang then + -- peek.close() + -- end + -- return + -- end + -- peek.open() + -- end, { bang = true }) + -- end, + -- }) + -- return { + -- app = { "chromium", "--new-window" }, + -- } + -- end, + -- }, }