| 1 | ((comment) @injection.content |
| 2 | (#set! injection.language "comment")) |
| 3 | |
| 4 | ; https://git-scm.com/docs/gitattributes#_defining_a_custom_hunk_header |
| 5 | ; https://git-scm.com/docs/gitattributes#_customizing_word_diff |
| 6 | ; e.g. |
| 7 | ; ``` |
| 8 | ; [diff "tex"] |
| 9 | ; xfuncname = "^(\\\\(sub)*section\\{.*)$" |
| 10 | ; wordRegex = "\\\\[a-zA-Z]+|[{}]|\\\\.|[^\\{}[:space:]]+" |
| 11 | ; ``` |
| 12 | (variable |
| 13 | (name) @_var (#any-of? @_var "xfuncname" "wordRegex") |
| 14 | value: (string) @injection.content |
| 15 | (#set! injection.language "regex")) |