diff options
Diffstat (limited to '.config/nvim/lua/plugins/render-markdown.lua')
| -rw-r--r-- | .config/nvim/lua/plugins/render-markdown.lua | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/.config/nvim/lua/plugins/render-markdown.lua b/.config/nvim/lua/plugins/render-markdown.lua new file mode 100644 index 0000000..da9fe62 --- /dev/null +++ b/.config/nvim/lua/plugins/render-markdown.lua @@ -0,0 +1,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' }), +} |
