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:
@@ -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 =====
|
||||
|
||||
Reference in New Issue
Block a user