commit d39adb911efacf74a7e2f1b17d7a723a374edd86 Author: rhiannon morris Date: Wed Mar 16 03:17:04 2022 +0100 first diff --git a/ftdetect/maude.vim b/ftdetect/maude.vim new file mode 100644 index 0000000..a04d92b --- /dev/null +++ b/ftdetect/maude.vim @@ -0,0 +1 @@ +autocmd BufRead,BufNewFile *.maude,*.fm setfiletype maude diff --git a/syntax/maude.vim b/syntax/maude.vim new file mode 100644 index 0000000..dadc0df --- /dev/null +++ b/syntax/maude.vim @@ -0,0 +1,68 @@ +" Maude syntax file. + +if exists('b:current_syntax') + finish +endif +let b:current_syntax = 'maude' + +" also most other things... +setlocal iskeyword+=- + +setlocal commentstring=***%s comments=b:***,b:--- + + +syn keyword maudeModule mod endm fmod endfm th endth fth endfth is +hi def link maudeModule Structure + +syn keyword maudeView view from to endv +hi def link maudeView maudeModule + +syn keyword maudeImport protecting pr including inc extending ex +hi def link maudeImport Include + +syn keyword maudeSort sort sorts subsort subsorts +hi def link maudeSort StorageClass + + +syn keyword maudeOp op ops +hi def link maudeOp Constant + +syn keyword maudeVar var vars +hi def link maudeVar Identifier + +syn keyword maudeEq eq ceq +hi def link maudeEq Function + +syn keyword maudeRl rl crl +hi def link maudeRl maudeEq + +syn keyword maudeMb mb cmb +hi def link maudeMb maudeEq + +syn keyword maudeIf if +syn match maudeIf '/\\' +hi def link maudeIf Conditional + +syn match maudeUnderscore '_' +hi def link maudeUnderscore Special + +syn match maudePunc '\%(^\|\s\)\zs\%(::\?\|->\|=>\|=\%(=\|/=\)\?\)\ze\%(\s\|$\)' +hi def link maudePunc Operator + +syn match maudeDelim '[{}\[\](),]\|\%(^\|\s\)\zs\.\ze\%(\s\|$\)' +hi def link maudeDelim Delimiter + + +syn keyword maudeCommand reduce red rewrite rew load set quit +hi def link maudeCommand Special + + +syn region maudeComment start='\%(^\|\s\)\zs\%(\*\*\*\|---\)' end='$' + \ contains=maudeCommentP,maudeTodo +hi def link maudeComment Comment +syn region maudeCommentP contained start='(' end=')' + \ contains=maudeCommentP,maudeTodo +hi def link maudeCommentP maudeComment + +syn keyword maudeTodo contained TODO FIXME XXX +hi def link maudeTodo Todo