feat(nvim): add keybind to toggle markview in markdown files
Some checks failed
Check Formatting of Files / Check-Formatting (push) Has been cancelled
Some checks failed
Check Formatting of Files / Check-Formatting (push) Has been cancelled
This commit is contained in:
parent
83b2a10daa
commit
75ba42519c
@ -4,15 +4,26 @@ vim.opt_local.textwidth = 0
|
||||
|
||||
vim.keymap.set("n", "<leader>fr", "<cmd>GithubPreviewToggle<CR>", {
|
||||
buffer = true,
|
||||
desc = "Preview Markdown in Browser"
|
||||
desc = "Preview Markdown in Browser",
|
||||
})
|
||||
|
||||
local markview = require("markview")
|
||||
vim.keymap.set("n", "<leader>ff", function()
|
||||
vim.cmd("Markview hybridToggle")
|
||||
local hybrid_state = require("markview").state.hybrid_mode and "Enabled" or "Disabled"
|
||||
markview.state.hybrid_mode = not markview.state.hybrid_mode
|
||||
local hybrid_state = markview.state.hybrid_mode and "Enabled" or "Disabled"
|
||||
vim.notify(("%s Markview Hybrid Mode"):format(hybrid_state), vim.log.levels.INFO, { title = "Markview" })
|
||||
end, {
|
||||
buffer = true,
|
||||
desc = "Toggle Markview Hybrid Mode"
|
||||
desc = "Toggle Markview Hybrid Mode",
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>ft", function()
|
||||
vim.cmd("Markview toggle")
|
||||
local mview_state = markview.state.enabled and "Enabled" or "Disabled"
|
||||
vim.notify(("Markview %s"):format(mview_state), vim.log.levels.INFO, { title = "Markview" })
|
||||
end, {
|
||||
buffer = true,
|
||||
desc = "Toggle Markview",
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<C-Space>", function()
|
||||
|
Loading…
Reference in New Issue
Block a user