2025-02-28 01:39:45 +03:00
|
|
|
require('render-markdown').setup({
|
2025-04-10 22:48:33 +03:00
|
|
|
debounce = 100,
|
|
|
|
-- render_modes = true,
|
2025-02-28 01:39:45 +03:00
|
|
|
heading = {
|
2025-03-16 19:00:46 +03:00
|
|
|
enabled = true,
|
2025-03-17 01:09:45 +03:00
|
|
|
icons = { "", },
|
2025-03-07 19:23:02 +03:00
|
|
|
position = 'inline',
|
2025-04-03 15:18:04 +03:00
|
|
|
border = { true, true, true, false, false, false},
|
|
|
|
border_virtual = true,
|
|
|
|
width = 'block',
|
2025-04-10 22:48:33 +03:00
|
|
|
right_pad = 1,
|
2025-04-03 15:18:04 +03:00
|
|
|
left_pad = 1,
|
2025-02-28 01:39:45 +03:00
|
|
|
},
|
2025-02-28 17:33:49 +03:00
|
|
|
sign = { enabled = false },
|
2025-03-13 23:13:32 +03:00
|
|
|
quote = { repeat_linebreak = true },
|
|
|
|
link = {
|
|
|
|
enabled = true,
|
|
|
|
render_modes = false,
|
|
|
|
footnote = {
|
|
|
|
superscript = false,
|
|
|
|
prefix = '',
|
|
|
|
suffix = '',
|
|
|
|
},
|
|
|
|
image = ' ',
|
|
|
|
email = ' ',
|
|
|
|
hyperlink = '',
|
|
|
|
highlight = 'RenderMarkdownLink',
|
|
|
|
wiki = {
|
|
|
|
icon = ' ',
|
|
|
|
body = function()
|
|
|
|
return nil
|
|
|
|
end,
|
|
|
|
highlight = 'RenderMarkdownWikiLink',
|
|
|
|
},
|
|
|
|
custom = {
|
|
|
|
web = { pattern = '^http', icon = ' ' },
|
|
|
|
discord = { pattern = 'discord%.com', icon = ' ' },
|
|
|
|
github = { pattern = 'github%.com', icon = ' ' },
|
|
|
|
gitlab = { pattern = 'gitlab%.com', icon = ' ' },
|
|
|
|
google = { pattern = 'google%.com', icon = ' ' },
|
|
|
|
neovim = { pattern = 'neovim%.io', icon = ' ' },
|
|
|
|
reddit = { pattern = 'reddit%.com', icon = ' ' },
|
|
|
|
stackoverflow = { pattern = 'stackoverflow%.com', icon = ' ' },
|
|
|
|
wikipedia = { pattern = 'wikipedia%.org', icon = ' ' },
|
|
|
|
youtube = { pattern = 'youtube%.com', icon = ' ' },
|
|
|
|
},
|
|
|
|
},
|
2025-03-16 19:00:46 +03:00
|
|
|
checkbox = {
|
|
|
|
unchecked = { icon = '✘ ' },
|
|
|
|
checked = { icon = '✔ ' },
|
|
|
|
},
|
|
|
|
bullet = { icons = { '•', '◦', '-',} },
|
2025-02-28 01:39:45 +03:00
|
|
|
})
|
2025-03-02 20:01:20 +03:00
|
|
|
|
2025-03-05 15:11:34 +03:00
|
|
|
|
2025-03-13 23:13:32 +03:00
|
|
|
|
|
|
|
|
|
|
|
-- переход по ссылкам
|
2025-03-05 15:11:34 +03:00
|
|
|
vim.keymap.set('n', 'gl', function() FindHttpOrWwwInLine() end, { silent = true })
|
|
|
|
|
|
|
|
function FindHttpOrWwwInLine()
|
|
|
|
local line = vim.api.nvim_get_current_line()
|
|
|
|
local start_pos, end_pos = line:find("http")
|
|
|
|
if start_pos then
|
|
|
|
local col = start_pos - 1
|
|
|
|
vim.api.nvim_win_set_cursor(0, {vim.fn.line('.'), col})
|
|
|
|
vim.cmd("normal! vE")
|
|
|
|
vim.fn.feedkeys("gx")
|
|
|
|
vim.api.nvim_input("<Esc>")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2025-03-13 23:13:32 +03:00
|
|
|
|