refactor(nvim): replace markdown-preview.nvim
with github-preview.nvim
This commit is contained in:
parent
40356fcebd
commit
11c4cbd722
@ -2,8 +2,9 @@ vim.opt_local.tabstop = 2
|
|||||||
vim.opt_local.shiftwidth = 2
|
vim.opt_local.shiftwidth = 2
|
||||||
vim.opt_local.textwidth = 0
|
vim.opt_local.textwidth = 0
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>fr", "<cmd>MarkdownPreview<CR>", {
|
vim.keymap.set("n", "<leader>fr", "<cmd>GithubPreviewToggle<CR>", {
|
||||||
buffer = true,
|
buffer = true,
|
||||||
|
desc = "Preview Markdown in Browser"
|
||||||
})
|
})
|
||||||
vim.keymap.set("n", "<leader>ff", function()
|
vim.keymap.set("n", "<leader>ff", function()
|
||||||
vim.cmd("Markview hybridToggle")
|
vim.cmd("Markview hybridToggle")
|
||||||
@ -11,6 +12,7 @@ vim.keymap.set("n", "<leader>ff", function()
|
|||||||
vim.notify(("%s Markview Hybrid Mode"):format(hybrid_state), vim.log.levels.INFO, { title = "Markview" })
|
vim.notify(("%s Markview Hybrid Mode"):format(hybrid_state), vim.log.levels.INFO, { title = "Markview" })
|
||||||
end, {
|
end, {
|
||||||
buffer = true,
|
buffer = true,
|
||||||
|
desc = "Toggle Markview Hybrid Mode"
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.keymap.set("n", "<C-Space>", function()
|
vim.keymap.set("n", "<C-Space>", function()
|
||||||
|
@ -1,10 +1,21 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"iamcco/markdown-preview.nvim",
|
"wallpants/github-preview.nvim",
|
||||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
ft = "markdown",
|
||||||
ft = { "markdown" },
|
cmd = {
|
||||||
build = function()
|
"GithubPreviewToggle",
|
||||||
vim.fn["mkdp#util#install"]()
|
"GithubPreviewStart",
|
||||||
|
"GithubPreviewStop",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local gpreview = require("github-preview")
|
||||||
|
gpreview.setup({
|
||||||
|
-- theme = {
|
||||||
|
-- "dark"
|
||||||
|
-- }
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"OXY2DEV/markview.nvim",
|
"OXY2DEV/markview.nvim",
|
||||||
ft = "markdown",
|
ft = "markdown",
|
||||||
|
Loading…
Reference in New Issue
Block a user