From 73f9322a9613c90501b346a25cea19c30bb40671 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 22 Nov 2024 21:18:22 +0100 Subject: [PATCH] nvim: Render markdown todo active and deleted state Additionally to the default states: - [ ] new/empty entry - [x] completed entry we render two more: - [-] active entry - [_] deleted/not applicable entry --- nvim/.config/nvim/lua/plugins/prose.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/nvim/.config/nvim/lua/plugins/prose.lua b/nvim/.config/nvim/lua/plugins/prose.lua index 76b0b45..602954f 100644 --- a/nvim/.config/nvim/lua/plugins/prose.lua +++ b/nvim/.config/nvim/lua/plugins/prose.lua @@ -69,14 +69,24 @@ local prose_plugs = { main = "render-markdown", opts = { file_types = { unpack(md_like) }, + render_modes = { "n", "c", "i" }, code = { sign = false, width = "block", right_pad = 1, }, + checkbox = { + custom = { + todo = { raw = "[-]", rendered = "󰡖 ", highlight = "RenderMarkdownTodo" }, + removed = { raw = "[_]", rendered = "󱋭 ", highlight = "RenderMarkdownTodo" }, + }, + }, }, 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 + dependencies = { + "nvim-treesitter/nvim-treesitter", + "nvim-tree/nvim-web-devicons", + }, ft = md_like, cmd = "RenderMarkdown", keys = {