From ab091bcf69a612d52a4b31aaf907879c1d8e877c Mon Sep 17 00:00:00 2001 From: Guest0x0 Date: Fri, 14 Feb 2020 07:33:47 +0800 Subject: [PATCH] improve syntax highlighting --- rc/filetype/ocaml.kak | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/rc/filetype/ocaml.kak b/rc/filetype/ocaml.kak index af31001a3..f5b9a2e19 100644 --- a/rc/filetype/ocaml.kak +++ b/rc/filetype/ocaml.kak @@ -29,10 +29,33 @@ provide-module ocaml %{ add-highlighter shared/ocaml regions add-highlighter shared/ocaml/code default-region group add-highlighter shared/ocaml/string region (?/?]+ 0:operator + + # Macro # ‾‾‾‾‾ @@ -44,6 +67,7 @@ evaluate-commands %sh{ printf %s\\n "declare-option str-list ocaml_static_words ${keywords}" | tr '|' ' ' +# must be put at last, since we have highlighted some keywords ('type' in 'module type') to other things printf %s " add-highlighter shared/ocaml/code/ regex \b(${keywords})\b 0:keyword "