refactor(nvim): replace markdown-preview.nvim with github-preview.nvim

This commit is contained in:
Price Hiller 2024-11-06 15:51:29 -06:00
parent 40356fcebd
commit 11c4cbd722
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB
2 changed files with 19 additions and 6 deletions

View File

@ -2,8 +2,9 @@ vim.opt_local.tabstop = 2
vim.opt_local.shiftwidth = 2
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,
desc = "Preview Markdown in Browser"
})
vim.keymap.set("n", "<leader>ff", function()
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" })
end, {
buffer = true,
desc = "Toggle Markview Hybrid Mode"
})
vim.keymap.set("n", "<C-Space>", function()

View File

@ -1,10 +1,21 @@
return {
{
"iamcco/markdown-preview.nvim",
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
ft = { "markdown" },
build = function()
vim.fn["mkdp#util#install"]()
"wallpants/github-preview.nvim",
ft = "markdown",
cmd = {
"GithubPreviewToggle",
"GithubPreviewStart",
"GithubPreviewStop",
},
config = function()
local gpreview = require("github-preview")
gpreview.setup({
-- theme = {
-- "dark"
-- }
})
end,
},
{
"OXY2DEV/markview.nvim",
ft = "markdown",