From 8e7e3ed8b854cbdc26729974e909dddc96950c25 Mon Sep 17 00:00:00 2001 From: Vangelis Tasoulas Date: Tue, 17 Dec 2024 23:58:30 +0100 Subject: [PATCH] Highlight comment blocks (/* ... */) Works with single line or multi line comment blocks that look like this: ``` /** * This is my * comment */ ``` --- syntax/monkey-c.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/syntax/monkey-c.vim b/syntax/monkey-c.vim index bcfb472..1d90e9a 100644 --- a/syntax/monkey-c.vim +++ b/syntax/monkey-c.vim @@ -37,6 +37,7 @@ syntax match monkeyCNumber "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>" syntax match monkeyCNumber "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>" syntax match monkeyCLabel ":\w\+" syntax match monkeyCComment "\v//.*$" +syntax region monkeyCCommentBlock start="/\*" end="*/" highlight link monkeyCString String highlight link monkeyCCharacter Character @@ -54,6 +55,6 @@ highlight link monkeyCOperator Operator highlight link monkeyCNumber Number highlight link monkeyCLabel Label highlight link monkeyCComment Comment +highlight link monkeyCCommentBlock Comment let b:current_syntax = "monkey-c" -