Advertisement
voyeg3r

Untitled

Feb 12th, 2023 (edited)
972
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  1. -- source: https://pastebin.com/7ZBeSgSy
  2. -- reddit: https://www.reddit.com/r/neovim/comments/nu8e0t/
  3. -- Enable conceallevel on neovim:
  4.  
  5. -- in your ~/.config/nvim/after/ftplugin/markdown.lua
  6.  
  7. vim.wo.conceallevel = 2
  8. vim.cmd([[syn region markdownLink matchgroup=markdownLinkDelimiter start="(" end=")" contains=markdownUrl keepend contained conceal]])
  9. vim.cmd([[syn region markdownLinkText matchgroup=markdownLinkTextDelimiter start="!\=\[\%(\%(\_[^][]\|\[\_[^][]*\]\)*]\%( \=[[(]\)\)\@=" end="\]\%( \=[[(]\)\@=" nextgroup=markdownLink,markdownId skipwhite contains=@markdownInline,markdownLineStart concealends]])
  10.  
  11.  
  12.  
  13.  
  14.  
Tags: lua nvim
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement