From aed8ce9da277f5ecffe968b324f242c41c3b752a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 10:50:31 +0200 Subject: Adding upstream version 2:9.0.1378. Signed-off-by: Daniel Baumann --- runtime/syntax/elmfilt.vim | 58 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 runtime/syntax/elmfilt.vim (limited to 'runtime/syntax/elmfilt.vim') diff --git a/runtime/syntax/elmfilt.vim b/runtime/syntax/elmfilt.vim new file mode 100644 index 0000000..d995853 --- /dev/null +++ b/runtime/syntax/elmfilt.vim @@ -0,0 +1,58 @@ +" Vim syntax file +" Language: Elm Filter rules +" Maintainer: Charles E. Campbell +" Last Change: Aug 31, 2016 +" Version: 9 +" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_ELMFILT + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn cluster elmfiltIfGroup contains=elmfiltCond,elmfiltOper,elmfiltOperKey,,elmfiltNumber,elmfiltOperKey + +syn match elmfiltParenError "[()]" +syn match elmfiltMatchError "/" +syn region elmfiltIf start="\" end="\" contains=elmfiltParen,elmfiltParenError skipnl skipwhite nextgroup=elmfiltAction +syn region elmfiltParen contained matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=elmfiltParen,@elmfiltIfGroup,elmfiltThenError +syn region elmfiltMatch contained matchgroup=Delimiter start="/" skip="\\/" matchgroup=Delimiter end="/" skipnl skipwhite nextgroup=elmfiltOper,elmfiltOperKey +syn match elmfiltThenError "\" skipnl skipwhite nextgroup=elmfiltString +syn match elmfiltOperKey contained "\=\|!=\|<\|<\|=" skipnl skipwhite nextgroup=elmfiltString,elmfiltCond,elmfiltOperKey +syn region elmfiltString contained start='"' skip='"\(\\\\\)*\\["%]' end='"' contains=elmfiltArg skipnl skipwhite nextgroup=elmfiltOper,elmfiltOperKey,@Spell +syn region elmfiltString contained start="'" skip="'\(\\\\\)*\\['%]" end="'" contains=elmfiltArg skipnl skipwhite nextgroup=elmfiltOper,elmfiltOperKey,@Spell +syn match elmfiltSpaceError contained "\s.*$" + +" Define the default highlighting. +if !exists("skip_elmfilt_syntax_inits") + + hi def link elmfiltAction Statement + hi def link elmfiltArg Special + hi def link elmfiltComment Comment + hi def link elmfiltCond Statement + hi def link elmfiltIf Statement + hi def link elmfiltMatch Special + hi def link elmfiltMatchError Error + hi def link elmfiltNumber Number + hi def link elmfiltOper Operator + hi def link elmfiltOperKey Type + hi def link elmfiltParenError Error + hi def link elmfiltSpaceError Error + hi def link elmfiltString String + hi def link elmfiltThenError Error + +endif + +let b:current_syntax = "elmfilt" +" vim: ts=9 -- cgit v1.2.3