File tree Expand file tree Collapse file tree 3 files changed +26
-4
lines changed
Expand file tree Collapse file tree 3 files changed +26
-4
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ vim9script
33# Other possible options : 0x2B1C (white empty box)
44# 0x2705 Green checkbox
55# 0x2714 Only checkbox
6+ # 0x25A2 Big large empty square
67var use_nerd_fonts = true
78
89if exists (' g:markdown_extras_config' ) != 0
@@ -12,9 +13,22 @@ if exists('g:markdown_extras_config') != 0
1213endif
1314
1415if use_nerd_fonts
16+ var empty_checkbox = 0x25A2
17+ var marked_checkbox = 0x2714
18+
19+ if exists (' g:markdown_extras_config' ) != 0
20+ && has_key (g: markdown_extras_config , ' empty_checkbox' )
21+ empty_checkbox = g: markdown_extras_config [ ' empty_checkbox' ]
22+ endif
23+
24+ if exists (' g:markdown_extras_config' ) != 0
25+ && has_key (g: markdown_extras_config , ' marked_checkbox' )
26+ marked_checkbox = g: markdown_extras_config [ ' marked_checkbox' ]
27+ endif
28+
1529 exe ' syntax match todoCheckbox '' \v\s*-\s\[\s*\]'' hs=e-4 conceal cchar='
16- .. nr2char (0x25A1 )
30+ .. nr2char (empty_checkbox )
1731 exe ' syntax match todoCheckbox '' \v\s*-\s\[x\]'' hs=e-4 conceal cchar='
18- .. nr2char (0x2714 )
32+ .. nr2char (marked_checkbox )
1933 hi def link todoCheckbox Todo
2034endif
Original file line number Diff line number Diff line change @@ -49,3 +49,11 @@ filling it with he various keys.
4949 Default `true`.
5050 "use_nerd_fonts" To set eye-candy check-boxes. Require some nerd-font
5151 installed. Default false.
52+ "smart_textstyle" Whenever possible, text styles are kept
53+ consistent. Default `true`
54+ "empty_checkbox" Glyphs to display for empty checkboxes. Requires
55+ "use_nerdfonts" set to `true` and 'concealevel'
56+ greater than 0.
57+ "marked_checkbox" Glyphs to display for marked checkboxes. Requires
58+ "use_nerdfonts" set to `true` and 'concealevel'
59+ greater than 0.
Original file line number Diff line number Diff line change @@ -547,7 +547,7 @@ enddef
547547# TODO
548548export var Surround = SurroundSmart
549549if exists (' g:markdown_extras_config' )
550- && has_key (g: markdown_extras_config , ' smart_delimiters ' )
551- && g: markdown_extras_config [' smart_delimiters ' ]
550+ && has_key (g: markdown_extras_config , ' smart_textstyle ' )
551+ && g: markdown_extras_config [' smart_textstyle ' ]
552552 Surround = SurroundSimple
553553endif
You can’t perform that action at this time.
0 commit comments