From 1e27d1c7b25e4d28a25c0fa2c4e6e33a66b9072e Mon Sep 17 00:00:00 2001 From: moxie Date: Tue, 30 Sep 2025 12:27:44 +0300 Subject: add nvim configs --- .config/nvim/lua/plugins/render-markdown.lua | 44 ++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .config/nvim/lua/plugins/render-markdown.lua (limited to '.config/nvim/lua/plugins/render-markdown.lua') 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' }), +} -- cgit v1.2.3