summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/plugins/render-markdown.lua
diff options
context:
space:
mode:
authormoxie <moxie.git@posteo.net>2025-09-30 12:27:44 +0300
committermoxie <moxie.git@posteo.net>2025-09-30 12:27:44 +0300
commit1e27d1c7b25e4d28a25c0fa2c4e6e33a66b9072e (patch)
tree7169509b4d5dfce3ed25fe333cc506a40f5c90f2 /.config/nvim/lua/plugins/render-markdown.lua
parent51797f743fe74d1723ca62085f92e8c5e953038b (diff)
add nvim configs
Diffstat (limited to '.config/nvim/lua/plugins/render-markdown.lua')
-rw-r--r--.config/nvim/lua/plugins/render-markdown.lua44
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' }),
+}