Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax: Add elm module group #177

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion syntax/elm.vim
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ endif
syn keyword elmConditional else if of then
syn keyword elmAlias alias
syn keyword elmTypedef contained type port
syn keyword elmImport exposing as import module where
syn keyword elmImport contained exposing as import module where

" Operators
syn match elmOperator contained "\([-!#$%`&\*\+./<=>\?@\\^|~:]\|\<_\>\)"
Expand All @@ -17,6 +17,10 @@ syn match elmOperator contained "\([-!#$%`&\*\+./<=>\?@\\^|~:]\|\<_\>\)"
syn match elmType "\<[A-Z][0-9A-Za-z_'-]*"
syn keyword elmNumberType number

" Modules
syn match elmModule "\<\([A-Z][0-9A-Za-z_'-\.]*\)\+\.[A-Za-z]"me=e-2
syn match elmModule "^\(module\|import\)\s\+[A-Z][0-9A-Za-z_'-\.]*\(\s\+as\s\+[A-Z][0-9A-Za-z_'-\.]*\)\?\(\s\+exposing\)\?" contains=elmImport

" Delimiters
syn match elmDelimiter "[,;]"
syn match elmBraces "[()[\]{}]"
Expand Down Expand Up @@ -73,6 +77,7 @@ hi def link elmAlias Delimiter
hi def link elmOperator Operator
hi def link elmType Identifier
hi def link elmNumberType Identifier
hi def link elmModule Type

syn sync minlines=500

Expand Down