From 8a42b15192a6b8db7417ecebd3608d095bc7e3a5 Mon Sep 17 00:00:00 2001 From: xav-ie Date: Mon, 6 Jan 2025 16:06:57 -0500 Subject: [PATCH] feat(render-markdown): add --- config/plugins/default.nix | 1 + config/plugins/render-markdown.nix | 39 ++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 config/plugins/render-markdown.nix diff --git a/config/plugins/default.nix b/config/plugins/default.nix index 22434e9..325753e 100644 --- a/config/plugins/default.nix +++ b/config/plugins/default.nix @@ -28,6 +28,7 @@ ./ollama.nix # ./orgmode.nix # ./org-roam-nvim.nix # buggy as hell + ./render-markdown.nix ./tabscope.nix ./telescope ./treesitter.nix diff --git a/config/plugins/render-markdown.nix b/config/plugins/render-markdown.nix new file mode 100644 index 0000000..20eb24e --- /dev/null +++ b/config/plugins/render-markdown.nix @@ -0,0 +1,39 @@ +_: { + config = { + # https://nix-community.github.io/nixvim/plugins/render-markdown + # https://github.com/MeanderingProgrammer/render-markdown.nvim + plugins.render-markdown = { + enable = true; + settings = { + sign.enabled = false; + heading.border = true; + # heading.border_virtual = true; + heading.position = "inline"; + pipe_table.preset = "round"; + }; + }; + highlight = + let + headerBg = "#200030"; + headerFg = "#9a5feb"; + in + { + # Prevent colors from changing when switching between editing + # and concealing + RenderMarkdownBullet.fg = "#E07153"; + RenderMarkdownCode.bg = "#200020"; + RenderMarkdownH1Bg.bg = headerBg; + RenderMarkdownH2Bg.bg = headerBg; + RenderMarkdownH3Bg.bg = headerBg; + RenderMarkdownH4Bg.bg = headerBg; + RenderMarkdownH5Bg.bg = headerBg; + RenderMarkdownH6Bg.bg = headerBg; + RenderMarkdownH1Bg.fg = headerFg; + RenderMarkdownH2Bg.fg = headerFg; + RenderMarkdownH3Bg.fg = headerFg; + RenderMarkdownH4Bg.fg = headerFg; + RenderMarkdownH5Bg.fg = headerFg; + RenderMarkdownH6Bg.fg = headerFg; + }; + }; +}