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
|
return {
'MeanderingProgrammer/render-markdown.nvim',
event = { 'BufReadPre', 'BufNewFile' },
keys = {
{ '<leader>mt', '<cmd>RenderMarkdown toggle<cr>' },
},
opts = {
render_modes = true,
sign = { enabled = false },
bullet = { icons = { '', '◆' } },
checkbox = {
unchecked = { icon = ' ' },
checked = { icon = ' ' },
},
},
config = function(_, opts)
local cwd = vim.fn.getcwd()
local project = vim.fn.expand('$HOME/projects/WorldBuilding/')
if cwd == project or cwd:sub(1, #project + 1) == project .. '/' then
opts.win_options = {
concealcursor = {
default = vim.api.nvim_get_option_value('concealcursor', {}),
rendered = 'n',
},
}
opts.anti_conceal = {
enabled = true,
disabled_modes = { 'n' },
}
end
require('render-markdown').setup(opts)
end,
}
|