nvim: Exchange headlines plugin for markdown.nvim

To render markdown highlights and a few other things (list items, code
blocks, callouts, etc) we switched from headlines.nvim to markdown.nvim
(internally ralled render-markdown).
This now also enables quick switching between showing the rendered
output and raw markdown (`<leader>pp`).
This commit is contained in:
Marty Oehme 2024-07-26 15:33:43 +02:00
parent 32e743edba
commit 7af5fca62a
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A
2 changed files with 20 additions and 7 deletions

View file

@ -33,7 +33,6 @@
"git-conflict.nvim": { "branch": "main", "commit": "bfd9fe6fba9a161fc199771d85996236a0d0faad" }, "git-conflict.nvim": { "branch": "main", "commit": "bfd9fe6fba9a161fc199771d85996236a0d0faad" },
"gitsigns.nvim": { "branch": "main", "commit": "0b04035bb7b3c83e999b9676e2fb46fd0aa9f910" }, "gitsigns.nvim": { "branch": "main", "commit": "0b04035bb7b3c83e999b9676e2fb46fd0aa9f910" },
"glance.nvim": { "branch": "master", "commit": "51059bcf21016387b6233c89eed220cf47fca752" }, "glance.nvim": { "branch": "master", "commit": "51059bcf21016387b6233c89eed220cf47fca752" },
"headlines.nvim": { "branch": "master", "commit": "618ef1b2502c565c82254ef7d5b04402194d9ce3" },
"image.nvim": { "branch": "master", "commit": "da64ce69598875c9af028afe129f916b02ccc42e" }, "image.nvim": { "branch": "master", "commit": "da64ce69598875c9af028afe129f916b02ccc42e" },
"img-clip.nvim": { "branch": "main", "commit": "fc30500c35663aa1762697f5aba31d43b86028f0" }, "img-clip.nvim": { "branch": "main", "commit": "fc30500c35663aa1762697f5aba31d43b86028f0" },
"jupytext.nvim": { "branch": "main", "commit": "c8baf3ad344c59b3abd461ecc17fc16ec44d0f7b" }, "jupytext.nvim": { "branch": "main", "commit": "c8baf3ad344c59b3abd461ecc17fc16ec44d0f7b" },
@ -76,6 +75,7 @@
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" }, "popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
"quarto-nvim": { "branch": "main", "commit": "09fabb62d414e56ee3245c558aaedbdc662b6493" }, "quarto-nvim": { "branch": "main", "commit": "09fabb62d414e56ee3245c558aaedbdc662b6493" },
"rainbow-delimiters.nvim": { "branch": "master", "commit": "12b1a1e095d968887a17ef791c2edb78d7595d46" }, "rainbow-delimiters.nvim": { "branch": "master", "commit": "12b1a1e095d968887a17ef791c2edb78d7595d46" },
"render-markdown": { "branch": "main", "commit": "3578523f497a8ad3b4a356d1e54e609838ce0922" },
"smartcolumn.nvim": { "branch": "main", "commit": "d01b99355c7fab13233f48d0f28dc097e68a03f7" }, "smartcolumn.nvim": { "branch": "main", "commit": "d01b99355c7fab13233f48d0f28dc097e68a03f7" },
"stickybuf.nvim": { "branch": "master", "commit": "2160fcd536d81f5fa43f7167dba6634e814e3154" }, "stickybuf.nvim": { "branch": "master", "commit": "2160fcd536d81f5fa43f7167dba6634e814e3154" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },

View file

@ -40,12 +40,24 @@ local prose_plugs = {
}, },
}, },
}, },
-- displays prettier headlines mimicking the ones in emacs orgmode -- displays prettier md rendering
{ {
"lukas-reineke/headlines.nvim", "MeanderingProgrammer/markdown.nvim",
dependencies = "nvim-treesitter/nvim-treesitter", main = "render-markdown",
config = true, opts = {},
name = "render-markdown", -- Only needed if you have another plugin named markdown.nvim
dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons" }, -- if you prefer nvim-web-devicons
ft = writing_ft, ft = writing_ft,
keys = {
{
"<leader>pp",
function()
require("render-markdown").toggle()
end,
silent = true,
desc = "toggle md rendering",
},
},
}, },
-- generate an auto-updating html preview for md files -- generate an auto-updating html preview for md files
-- uses the very nice peek if deno is available, otherwise falls back to markdown-preview -- uses the very nice peek if deno is available, otherwise falls back to markdown-preview
@ -84,7 +96,7 @@ local prose_plugs = {
}, },
cmd = { "PasteImage" }, cmd = { "PasteImage" },
keys = { keys = {
{ "<leader>pp", "<cmd>PasteImage<cr>", desc = "Paste image from system clipboard" }, { "<leader>pi", "<cmd>PasteImage<cr>", desc = "Paste image from system clipboard" },
}, },
ft = writing_ft, ft = writing_ft,
}, },
@ -184,6 +196,7 @@ local prose_plugs = {
"barreiroleo/ltex_extra.nvim", "barreiroleo/ltex_extra.nvim",
branch = "dev", branch = "dev",
}, },
{ "let-def/texpresso.vim", ft = { "tex" } },
} }
return prose_plugs return prose_plugs