local M = {} local function jump_link(direction) local flags = direction == 'next' and 'w' or 'bw' local msg = direction == 'next' and 'No more links' or 'No previous links' if vim.fn.search('\\[.\\{-}\\]', flags) == 0 then vim.notify(msg, vim.log.levels.INFO) end end function M.next_link() jump_link('next') end function M.prev_link() jump_link('prev') end return M