ported the lua, port is complete, I think.
This commit is contained in:
parent
7c9d33f7bb
commit
24a7f2cda3
26 changed files with 810 additions and 868 deletions
19
lua/plugins/preview/markdown.lua
Normal file
19
lua/plugins/preview/markdown.lua
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
return {
|
||||
"markdown-preview.nvim",
|
||||
-- NOTE: for_cat is a custom handler that just sets enabled value for us,
|
||||
-- based on result of nixCats('cat.name') and allows us to set a different default if we wish
|
||||
-- it is defined in luaUtils template in lua/nixCatsUtils/lzUtils.lua
|
||||
-- you could replace this with enabled = nixCats('cat.name') == true
|
||||
-- if you didnt care to set a different default for when not using nix than the default you already set
|
||||
for_cat = 'markdown',
|
||||
cmd = { "MarkdownPreview", "MarkdownPreviewStop", "MarkdownPreviewToggle", },
|
||||
ft = "markdown",
|
||||
keys = {
|
||||
{ "<leader>Pmp", "<cmd>MarkdownPreview <CR>", mode = { "n" }, noremap = true, desc = "markdown preview" },
|
||||
{ "<leader>Pms", "<cmd>MarkdownPreviewStop <CR>", mode = { "n" }, noremap = true, desc = "markdown preview stop" },
|
||||
{ "<leader>Pmt", "<cmd>MarkdownPreviewToggle <CR>", mode = { "n" }, noremap = true, desc = "markdown preview toggle" },
|
||||
},
|
||||
before = function()
|
||||
vim.g.mkdp_auto_close = 0
|
||||
end,
|
||||
}
|
||||
14
lua/plugins/preview/typst.lua
Normal file
14
lua/plugins/preview/typst.lua
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
return {
|
||||
"typst-preview.nvim",
|
||||
for_cat = "typst",
|
||||
ft = "typst",
|
||||
cmd = { "TypstPreview", "TypstPreviewStop", "TypstPreviewToggle", },
|
||||
keys = {
|
||||
{ "<leader>ptp", "<cmd>TypstPreview <CR>", mode = { "n" }, noremap = true, desc = "typst preview" },
|
||||
{ "<leader>pts", "<cmd>TypstPreviewStop <CR>", mode = { "n" }, noremap = true, desc = "typst preview stop" },
|
||||
{ "<leader>ptt", "<cmd>TypstPreviewToggle <CR>", mode = { "n" }, noremap = true, desc = "typst preview toggle" },
|
||||
},
|
||||
after = function()
|
||||
require('typst-preview').setup {}
|
||||
end
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue