diff options
| author | Michał Kruszewski <mkru@protonmail.com> | 2021-02-25 15:16:17 +0100 |
|---|---|---|
| committer | Michał Kruszewski <mkru@protonmail.com> | 2021-02-25 20:18:10 +0100 |
| commit | b7def7350cddbc69c0bf03692e6add7bf043182b (patch) | |
| tree | d6a74dc70f838faafe13db9ec503bc6ef719861b | |
| parent | 7c321e121d5910a9316cd04a6c596c1fe95b8bde (diff) | |
Add comment highlighter for troff files.
Add comment highlighter for troff files.
Also highlight the end of the macro definition.
| -rw-r--r-- | rc/filetype/troff.kak | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rc/filetype/troff.kak b/rc/filetype/troff.kak index 44645010..59dd7794 100644 --- a/rc/filetype/troff.kak +++ b/rc/filetype/troff.kak @@ -23,11 +23,15 @@ provide-module troff %{ # ‾‾‾‾‾‾‾‾‾‾‾‾ add-highlighter shared/troff group + +add-highlighter shared/troff/ regex '(^\.)?\\".*?\n' 0:comment + add-highlighter shared/troff/ regex '\\f[A-Z]' 0:attribute add-highlighter shared/troff/ regex '\\fB(.+?)\\f[A-Z]' 1:+b add-highlighter shared/troff/ regex '\\fI(.+?)\\f[A-Z]' 1:+i add-highlighter shared/troff/ regex '^\.[a-zA-Z]{1,2}\b' 0:meta +add-highlighter shared/troff/ regex '^\.\.$' 0:meta add-highlighter shared/troff/ regex '^\.TH\s+[^\n]+' 0:title add-highlighter shared/troff/ regex '^\.SH\s+[^\n]+' 0:header add-highlighter shared/troff/ regex '^\.IR\s+(\S+)' 1:+i |
