Skip to content

Commit fb6a2f6

Browse files
committed
Readded after/syntax/markdown.vim
1 parent f77392a commit fb6a2f6

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

after/syntax/markdown.vim

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
vim9script
2+
3+
# Other possible options: 0x2B1C (white empty box)
4+
# 0x2705 Green checkbox
5+
# 0x2714 Only checkbox
6+
var use_nerd_fonts = true
7+
8+
if exists('g:markdown_extras_config') != 0
9+
&& has_key(g:markdown_extras_config, 'use_nerd_fonts')
10+
&& g:markdown_extras_config['use_nerd_fonts']
11+
use_nerd_fonts = g:markdown_extras_config['use_nerd_fonts']
12+
endif
13+
14+
if use_nerd_fonts
15+
exe 'syntax match todoCheckbox ''\v\s*-\s\[\s*\]''hs=e-4 conceal cchar='
16+
.. nr2char(0x25A1)
17+
exe 'syntax match todoCheckbox ''\v\s*-\s\[x\]''hs=e-4 conceal cchar='
18+
.. nr2char(0x2714)
19+
hi def link todoCheckbox Todo
20+
endif

doc/markdown_extras.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,5 @@ filling it with he various keys.
4747
"use_prettier" Set to `true` if you want to use `prettier` formatter.
4848
`prettier` needs to be installed separately.
4949
Default `true`.
50-
"localleader" Set the value of the `b:localleader`. Default ','.
50+
"use_nerd_fonts" To set eye-candy check-boxes. Require some nerd-font
51+
installed. Default false.

0 commit comments

Comments
 (0)