require('render-markdown').setup({ heading = { enabled = true, icons = { "", }, position = 'inline', backgrounds = { }, }, dash = { icon = '------ ' }, sign = { enabled = false }, 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 = '󰗃 ' }, }, }, checkbox = { unchecked = { icon = '✘ ' }, checked = { icon = '✔ ' }, }, bullet = { icons = { '•', '◦', '-',} }, }) -- переход по ссылкам 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("") end end