markdown: move to live-preview nvim for less dependencies
This commit is contained in:
parent
b97e4d2118
commit
e9c282a185
|
@ -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" },
|
||||
|
|
|
@ -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,
|
||||
-- },
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue