feat(vim): conceal markup delimiters when conceallevel=2

Set conceallevel=2 and concealcursor=nc on .wiki buffers and add
contained `conceal` matches for the bold/italic/code delimiters and
wikilink brackets/targets. The static-fallback rendering now mirrors
what the Neovim semantic-token path produced: *bold* shows as bold
without the asterisks, [[target|desc]] shows just "desc", etc.

The wikilink region uses an inline `contains=` (no line continuation)
because some Vim builds (notably Homebrew Vim 9.2) raise E10 on the
leading `\\ contains=...` form even though the surrounding region
parses fine.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-26 22:01:55 -03:00
parent 2aec51274e
commit 8f8c2884a9
2 changed files with 19 additions and 5 deletions
+3 -1
View File
@@ -18,8 +18,10 @@ setlocal comments=:%%
setlocal formatoptions+=ron
setlocal suffixesadd=.wiki
setlocal iskeyword+=-
setlocal conceallevel=2
setlocal concealcursor=nc
let b:undo_ftplugin = 'setlocal commentstring< comments< formatoptions< suffixesadd< iskeyword<'
let b:undo_ftplugin = 'setlocal commentstring< comments< formatoptions< suffixesadd< iskeyword< conceallevel< concealcursor<'
if !has('nvim')
" ===== Plain Vim path =====