summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/plugins/render-markdown.lua
blob: da9fe62be76dea12ad2dc746dfb2d3dedf3ea2ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
return {
  'MeanderingProgrammer/render-markdown.nvim',
  cmd = "RenderMarkdown",
  ft = { "markdown", "md" },
  lazy = true,
  -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-mini/mini.icons' }, -- if you use standalone mini plugins
  dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons

  ---@module 'render-markdown'
  ---@type render.md.UserConfig
  opts = {},
  config = function()
    require('render-markdown').setup({
      -- completions = { lsp = { enabled = true } },
      heading = {
        -- position = 'inline',
        icons = { '➤ ' },
        -- icons = { '󰼏 ', '󰎨 ' },
        -- icons = { '➤ ', '➢ ' },
        width = 'block',
        left_pad = 1,
        right_pad = 1,
      },
      bullet = {
        -- icons = { '▫️', '▪️' },
        icons = { '■', '□' },
      },
      code = {
        width = 'block',
        min_width = 45,
        left_pad = 0,
        right_pad = 2,
        language_pad = 0,
      },
    })
  end,
  -- fg = #b8bb26
  vim.api.nvim_set_hl(0, 'RenderMarkdownH1Bg', { fg = '#000000', bg = '#fabd2f' }),
  vim.api.nvim_set_hl(0, 'RenderMarkdownH2Bg', { bg = '#181818' }),
  vim.api.nvim_set_hl(0, 'RenderMarkdownH3Bg', { bg = '#242424' }),
  vim.api.nvim_set_hl(0, 'RenderMarkdownH4Bg', { bg = '#303030' }),
  vim.api.nvim_set_hl(0, 'RenderMarkdownH5Bg', { bg = '#3c3c3c' }),
  vim.api.nvim_set_hl(0, 'RenderMarkdownH6Bg', { bg = '#424242' }),
}