Created
May 30, 2018 01:14
-
-
Save zbraniecki/eee482747954bb29f50b3d70234f23f2 to your computer and use it in GitHub Desktop.
Fluent VIM syntax highlighting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if exists("b:current_syntax") | |
finish | |
endif | |
syntax match fluentComment "\v#.*$" | |
syntax match fluentIdentifier "^\v[a-zA-Z-]+" nextgroup=fluentDelimiter | |
syntax match fluentDelimiter "\s*=\s*" contained skipnl nextgroup=fluentPattern | |
syntax region fluentPattern contained start="" end="\v^(( )@!|( +[\.\[\*\}])@=)" contains=fluentPlaceableExpression | |
syntax match fluentAttribute "\v\.[a-zA-Z-]+" nextgroup=fluentDelimiter | |
syntax region fluentPlaceableExpression contained matchgroup=fluentPlaceableBraces start=+{+ end=+}+ contains=@fluentExpression | |
syntax cluster fluentExpression contains=fluentBuiltin,fluentVariantEntry,fluentIdentifierExpression | |
syntax match fluentBuiltin contained "\v[A-Z]+(\()@=" | |
syntax match fluentVariantEntry contained "\v\*?\[[a-z]+\]" nextgroup=fluentPattern | |
syntax match fluentIdentifierExpression contained "\v[a-zA-Z-]+" | |
highlight link fluentComment Comment | |
highlight link fluentIdentifier Identifier | |
highlight link fluentPattern String | |
highlight link fluentAttribute Keyword | |
highlight link fluentBuiltin Keyword | |
highlight link fluentVariantEntry Keyword | |
highlight link fluentIdentifierExpression Identifier | |
let b:current_syntax = "fluent" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment