File tree 2 files changed +16
-1
lines changed
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ command -bar -nargs=0 CheatSheetFloat lua require'cheatsheet'.show_cheats_float(
2
2
command - bar -nargs =0 CheatSheetTelescope lua require' cheatsheet.telescope' .pick_cheat ()
3
3
4
4
highlight default link cheatComment Comment
5
+ highlight default link cheatMetadataComment Comment
6
+ highlight default link cheatMetadataTag Include
7
+ highlight default link cheatMetadataSection Structure
8
+
5
9
highlight default link cheatDescription String
6
10
highlight default link cheatSeparator Keyword
7
11
highlight default link cheatCode Statement
Original file line number Diff line number Diff line change @@ -7,7 +7,18 @@ let b:current_syntax = "cheatsheet"
7
7
syn clear
8
8
syn sync fromstart
9
9
10
- syn match cheatComment / #.*$/
10
+ syn region cheatComment start =/ \v #[^#]/ end =/ $/ keepend
11
+
12
+ " ## plugin-name @tag @tag
13
+ " ^^ ^^^^^^^^^^^ ^^^^
14
+ " metadata-comment section tag
15
+ syn match cheatMetadataSection / ##\s\+\S\+ / ms =s + 2 skipwhite nextgroup =cheatMetadataTag contained
16
+ syn match cheatMetadataTag / @\S\+ / contained
17
+ syn region cheatMetadataComment start =/ ##/ end =/ $/ keepend skipwhite contains =cheatMetadataSection,cheatMetadataTag
18
+
19
+ " Some useful text | :Command
20
+ " ^^^^^^^^^^^^^^^^ ^ ^^^^^^^^
21
+ " description separator cheatcode
11
22
syn match cheatDescription / \v ^[^\# ][^|]*/ contained skipwhite nextgroup =cheatSeparator
12
23
syn match cheatSeparator ' |' nextgroup =cheatCode skipwhite contained
13
24
syn match cheatCode ' .*' contained
You can’t perform that action at this time.
0 commit comments