return {
  {
    "MeanderingProgrammer/render-markdown.nvim",
    dependencies = {
      "nvim-treesitter/nvim-treesitter",
      "nvim-tree/nvim-web-devicons",
    },
    ft = { "markdown" },
    opts = {
      -- File types to enable rendering
      file_types = { "markdown" },

      -- Code block configuration
      code = {
        -- Show language name and icon
        enabled = true,
        -- Position: 'left', 'right', 'language'
        sign = true,
        -- Style for code blocks
        style = "full",
        -- Position of language name (left or right)
        position = "left",
        -- Disable if you don't want the background
        disable_background = false,
        -- Width of code block
        width = "full",
        -- Language icon on the right
        right_pad = 1,
        left_pad = 1,
        -- Border around code blocks
        border = "thin",
        -- Highlight for the language label
        highlight = "RenderMarkdownCode",
        highlight_inline = "RenderMarkdownCodeInline",
      },

      -- Heading configuration
      heading = {
        enabled = true,
        sign = true,
        icons = { "󰲡 ", "󰲣 ", "󰲥 ", "󰲧 ", "󰲩 ", "󰲫 " },
        backgrounds = {
          "RenderMarkdownH1Bg",
          "RenderMarkdownH2Bg",
          "RenderMarkdownH3Bg",
          "RenderMarkdownH4Bg",
          "RenderMarkdownH5Bg",
          "RenderMarkdownH6Bg",
        },
        foregrounds = {
          "RenderMarkdownH1",
          "RenderMarkdownH2",
          "RenderMarkdownH3",
          "RenderMarkdownH4",
          "RenderMarkdownH5",
          "RenderMarkdownH6",
        },
      },

      -- Checkbox configuration
      checkbox = {
        enabled = true,
        render_modes = false,
        bullet = false,
        left_pad = 0,
        right_pad = 1,
        unchecked = {
          icon = "󰄱 ",
          highlight = "RenderMarkdownUnchecked",
          scope_highlight = nil,
        },
        checked = {
          icon = "󰱒 ",
          highlight = "RenderMarkdownChecked",
          scope_highlight = nil,
        },
        -- Custom checkbox states
        custom = {
          urgent = {
            raw = "[!]",
            rendered = "󰀦 ",
            highlight = "RenderMarkdownUrgent",
          },
        },
      },

      -- Block Quotes
      quote = {
        enabled = true,
        render_modes = false,
        icon = "▋",
        repeat_linebreak = false,
        highlight = {
          "RenderMarkdownQuote1",
          "RenderMarkdownQuote2",
          "RenderMarkdownQuote3",
          "RenderMarkdownQuote4",
          "RenderMarkdownQuote5",
          "RenderMarkdownQuote6",
        },
      },
      -- Table configuration
      pipe_table = {
        enabled = true,
        style = "full",
        cell = "padded",
        border = {
          "┌",
          "┬",
          "┐",
          "├",
          "┼",
          "┤",
          "└",
          "┴",
          "┘",
          "│",
          "─",
        },
      },
      config = function(_, opts)
        require("render-markdown").setup(opts)

        -- Function to apply colors
        local function apply_colors()
          local colors = {
            -- Heading colors (gradient from red to blue)
            h1 = { fg = "#ff6b6b", bg = "#3d1f1f" },
            h2 = { fg = "#ffa07a", bg = "#3d2a1f" },
            h3 = { fg = "#ffd700", bg = "#3d3d1f" },
            h4 = { fg = "#98fb98", bg = "#1f3d1f" },
            h5 = { fg = "#87ceeb", bg = "#1f2a3d" },
            h6 = { fg = "#dda0dd", bg = "#2a1f3d" },

            -- Code block colors
            code = { bg = "#1e1e2e" },

            -- Checkbox colors
            checked = { fg = "#a6e3a1" },
            unchecked = { fg = "#6c7086" },
            urgent = { fg = "#f38ba8" },
          }

          -- Apply heading colors
          for i = 1, 6 do
            local h = "h" .. i
            vim.api.nvim_set_hl(0, "RenderMarkdownH" .. i, { fg = colors[h].fg, bold = true })
            vim.api.nvim_set_hl(0, "RenderMarkdownH" .. i .. "Bg", { bg = colors[h].bg })
          end

          -- Apply code block colors
          vim.api.nvim_set_hl(0, "RenderMarkdownCode", { bg = colors.code.bg })
          vim.api.nvim_set_hl(0, "RenderMarkdownCodeInline", { bg = colors.code.bg })

          -- Apply checkbox colors with force
          vim.api.nvim_set_hl(0, "RenderMarkdownChecked", { fg = colors.checked.fg, default = false })
          vim.api.nvim_set_hl(0, "RenderMarkdownUnchecked", { fg = colors.unchecked.fg, default = false })
          vim.api.nvim_set_hl(0, "RenderMarkdownUrgent", { fg = colors.urgent.fg, bold = true, default = false })
        end

        -- Apply colors immediately
        apply_colors()

        -- Re-apply colors after colorscheme changes
        vim.api.nvim_create_autocmd("ColorScheme", {
          pattern = "*",
          callback = apply_colors,
        })
      end,
    },
  },
}
