Merge remote-tracking branch 'lePerdu/elm-lang-fixes'

This commit is contained in:
Maxime Coste 2019-11-17 09:50:33 +11:00
commit 090efcb1b1

View File

@ -25,6 +25,7 @@ hook -group elm-highlight global WinSetOption filetype=elm %{
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/elm }
}
provide-module elm %[
# Highlighters
@ -32,17 +33,19 @@ provide-module elm %[
add-highlighter shared/elm regions
add-highlighter shared/elm/code default-region group
add-highlighter shared/elm/multiline_string region '"""' '"""' fill string
add-highlighter shared/elm/string region '"' (?<!\\)(\\\\)*" fill string
add-highlighter shared/elm/line_comment region (--) $ fill comment
add-highlighter shared/elm/comment region -recurse \{- \{- -\} fill comment
add-highlighter shared/elm/code/ regex \b([A-Z]+[^\s]*)\b 0:type
add-highlighter shared/elm/code/ regex \b([a-z]+[^\s]*)\b 0:variable
add-highlighter shared/elm/code/ regex \b(^[a-z]+[^\s]*)\b 0:function
add-highlighter shared/elm/code/ regex \b[A-Z]\w*\b 0:type
add-highlighter shared/elm/code/ regex \b[a-z]\w*\b 0:variable
add-highlighter shared/elm/code/ regex ^[a-z]\w*\b 0:function
add-highlighter shared/elm/code/ regex "-?\b[0-9]*\.?[0-9]+" 0:value
add-highlighter shared/elm/code/ regex \B(\+|\+\+|\*|/|//|-|=|==|&&|\|\||<\||\|>)\B 0:operator
add-highlighter shared/elm/code/ regex \b(import|exposing|as|module|where)\b 0:meta
add-highlighter shared/elm/code/ regex (\b(type|alias|if|then|else|case|of|let|in|infix|_)\b)|(\B(->|:)\B) 0:keyword
add-highlighter shared/elm/code/ regex \B[-+<>!@#$%^&*=:/\\|]+\B 0:operator
add-highlighter shared/elm/code/ regex \b(import|exposing|as|module|port)\b 0:meta
add-highlighter shared/elm/code/ regex \b(type|alias|if|then|else|case|of|let|in|infix|_)\b) 0:keyword
add-highlighter shared/elm/code/ regex (?<![-+<>!@#$%^&*=:/\\|])(->|:|=|\|)(?![-+<>!@#$%^&*=:/\\|]) 0:keyword
# Commands
# ‾‾‾‾‾‾‾‾