Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Fix highlighting of multiple function definitions on one line #6

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
6 changes: 3 additions & 3 deletions syntax/haskell.vim
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ sy region hs_InfixOpFunctionName start="^(" end=")\s*[^:`]\(\W\&\S\&[^'\"`()[\]{
\ contained keepend contains=hsInnerParen,hs_HlInfixOp

sy match hs_hlFunctionName "[a-z_]\(\S\&[^,\(\)\[\]]\)*" contained
sy match hs_FunctionName "^[a-z_]\(\S\&[^,\(\)\[\]]\)*" contained contains=hs_hlFunctionName
sy match hs_FunctionName "[a-z_]\(\S\&[^,\(\)\[\]]\)*" contained contains=hs_hlFunctionName
sy match hs_HighliteInfixFunctionName "`[a-z_][^`]*`" contained
sy match hs_InfixFunctionName "^\S[^=]*`[a-z_][^`]*`"me=e-1 contained contains=hs_HighliteInfixFunctionName,hsType,hsConSym,hsVarSym,hsString,hsCharacter
sy match hs_HlInfixOp "\(\W\&\S\&[^`(){}'[\]]\)\+" contained contains=hsString
Expand All @@ -101,8 +101,8 @@ sy region hs_Function start="^["'a-zA-Z_([{]\(\(.\&[^=]\)\|\(\n\s\)\)*=" end="\(

sy match hs_TypeOp "::"
sy match hs_TypeOp "∷"
sy match hs_DeclareFunction "^[a-z_(]\S*\(\s\|\n\)*\(∷\|::\)" contains=hs_FunctionName,hs_OpFunctionName,hs_TypeOp

sy match hs_DeclareFunction "^[a-z_(]\(\S\&[^,\(\)\[\]]\)*\(\s\|\n\)*\(,\(\s\|\n\)*[a-z_(]\(\S\&[^,\(\)\[\]]\)*\(\s\|\n\)*\)*\(∷\|::\)"
\ contains=hs_FunctionName,hs_OpFunctionName,hs_TypeOp
" hi hs_TypeOp guibg=red

" hi hs_InfixOpFunctionName guibg=yellow
Expand Down