Skip to content

bug: diff code blocks not rendering properly in normal mode #110

@jjohnston-aims

Description

@jjohnston-aims

Neovim version (nvim -v)

NVIM v0.10.0

Operating system

Ubuntu 22.04

Terminal emulator / GUI

Default Terminal

Describe the bug

Diff code blocks are not being rendered properly in normal mode.
image

But they are in insert mode:
image

Expected behavior

I would expect to see in normal mode something like what I am seeing in edit mode for diff code blocks.

Healthcheck output

render-markdown: require("render-markdown.health").check()

markdown.nvim [neovim version] ~

  • OK Version >= 0.10

markdown.nvim [configuration] ~

  • OK valid

markdown.nvim [nvim-treesitter] ~

  • OK installed
  • OK markdown: parser installed
  • OK markdown: highlight enabled
  • OK markdown_inline: parser installed
  • OK markdown_inline: highlight enabled
  • WARNING latex: parser not installed
    • ADVICE:
      • Disable LaTeX support to avoid this warning by setting { latex = { enabled = false } }

markdown.nvim [executables] ~

  • WARNING latex2text: not installed
    • ADVICE:
      • Disable LaTeX support to avoid this warning by setting { latex = { enabled = false } }

markdown.nvim [conflicts] ~

  • OK headlines: not installed
  • OK obsidian: not installed

Plugin configuration

Default configuration for LazyVim

{
  "MeanderingProgrammer/markdown.nvim",
  opts = {
    file_types = { "markdown", "norg", "rmd", "org" },
    code = {
      sign = false,
      width = "block",
      right_pad = 1,
    },
    heading = {
      sign = false,
      icons = {},
    },
  },
  ft = { "markdown", "norg", "rmd", "org" },
  config = function(_, opts)
    require("render-markdown").setup(opts)
    LazyVim.toggle.map("<leader>um", {
      name = "Render Markdown",
      get = function()
        return require("render-markdown.state").enabled
      end,
      set = function(enabled)
        local m = require("render-markdown")
        if enabled then
          m.enable()
        else
          m.disable()
        end
      end,
    })
  end,
}

Confirmations

  • I have provided markdown text for any screenshots used in my description & understand that my issue will be closed if I have not

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions