From 177a29e83dbf2f53dd422d8725e97d7372ffe646 Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Tue, 4 Nov 2025 23:49:23 +0100 Subject: [PATCH] add markdown render --- modules/nvim.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/modules/nvim.nix b/modules/nvim.nix index 6ff19db..c537f19 100644 --- a/modules/nvim.nix +++ b/modules/nvim.nix @@ -196,6 +196,7 @@ in cmp-dictionary plenary-nvim # Required dependency for telescope jupytext-nvim # Jupyter notebook viewing/editing support + render-markdown-nvim # Inline markdown rendering with conceals ]; # Keymaps @@ -261,6 +262,14 @@ in action = ":lua open_file_with_system_app()"; options = { desc = "Open file with system default app"; }; } + + # Markdown rendering + { + mode = "n"; + key = "m"; + action = ":RenderMarkdown toggle"; + options = { desc = "Toggle markdown rendering"; }; + } ]; # Additional Lua configuration for plugins that need custom setup @@ -380,6 +389,13 @@ in end end + -- Render-markdown setup (off by default, toggle with +m) + require("render-markdown").setup({ + enabled = false, -- Off by default, use +m to toggle + file_types = { "markdown" }, + render_modes = { "n", "c" }, -- Render in normal and command mode + }) + ''; }; }