aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax/haskell.vim
diff options
context:
space:
mode:
authorBruno Michel <bmichel@menfin.info>2018-10-12 21:24:54 +0200
committerBruno Michel <bmichel@menfin.info>2018-10-12 21:28:32 +0200
commit942f3587c38a83cf6486a0b779765b54a1648493 (patch)
tree60311f05c09a16115538496aa0b8d67746a0e06f /runtime/syntax/haskell.vim
parent15a71338e3cc14ac194228256f7069451953ea17 (diff)
downloadrneovim-942f3587c38a83cf6486a0b779765b54a1648493.tar.gz
rneovim-942f3587c38a83cf6486a0b779765b54a1648493.tar.bz2
rneovim-942f3587c38a83cf6486a0b779765b54a1648493.zip
vim-patch:25a6e8a769aa
Small runtime update https://github.com/vim/vim/commit/25a6e8a769aa1c0d308b5f871132961f37986d0a
Diffstat (limited to 'runtime/syntax/haskell.vim')
-rw-r--r--runtime/syntax/haskell.vim20
1 files changed, 10 insertions, 10 deletions
diff --git a/runtime/syntax/haskell.vim b/runtime/syntax/haskell.vim
index e398085ba8..e5128a12ab 100644
--- a/runtime/syntax/haskell.vim
+++ b/runtime/syntax/haskell.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Haskell
" Maintainer: Haskell Cafe mailinglist <haskell-cafe@haskell.org>
-" Last Change: 2017 Jun 04
+" Last Change: 2018 Mar 29 by Marcin Szamotulski
" Original Author: John Williams <jrw@pobox.com>
"
" Thanks to Ryan Crumley for suggestions and John Meacham for
@@ -38,8 +38,8 @@ if exists("b:current_syntax")
endif
" (Qualified) identifiers (no default highlighting)
-syn match ConId "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=\<[A-Z][a-zA-Z0-9_']*\>"
-syn match VarId "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=\<[a-z][a-zA-Z0-9_']*\>"
+syn match ConId "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=\<[A-Z][a-zA-Z0-9_']*\>" contains=@NoSpell
+syn match VarId "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=\<[a-z][a-zA-Z0-9_']*\>" contains=@NoSpell
" Infix operators--most punctuation characters and any (qualified) identifier
" enclosed in `backquotes`. An operator starting with : is a constructor,
@@ -56,18 +56,18 @@ syn match hsDelimiter "(\|)\|\[\|\]\|,\|;\|_\|{\|}"
syn match hsSpecialChar contained "\\\([0-9]\+\|o[0-7]\+\|x[0-9a-fA-F]\+\|[\"\\'&\\abfnrtv]\|^[A-Z^_\[\\\]]\)"
syn match hsSpecialChar contained "\\\(NUL\|SOH\|STX\|ETX\|EOT\|ENQ\|ACK\|BEL\|BS\|HT\|LF\|VT\|FF\|CR\|SO\|SI\|DLE\|DC1\|DC2\|DC3\|DC4\|NAK\|SYN\|ETB\|CAN\|EM\|SUB\|ESC\|FS\|GS\|RS\|US\|SP\|DEL\)"
syn match hsSpecialCharError contained "\\&\|'''\+"
-syn region hsString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=hsSpecialChar
+syn region hsString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=hsSpecialChar,@NoSpell
syn match hsCharacter "[^a-zA-Z0-9_']'\([^\\]\|\\[^']\+\|\\'\)'"lc=1 contains=hsSpecialChar,hsSpecialCharError
syn match hsCharacter "^'\([^\\]\|\\[^']\+\|\\'\)'" contains=hsSpecialChar,hsSpecialCharError
-syn match hsNumber "\<[0-9]\+\>\|\<0[xX][0-9a-fA-F]\+\>\|\<0[oO][0-7]\+\>"
-syn match hsFloat "\<[0-9]\+\.[0-9]\+\([eE][-+]\=[0-9]\+\)\=\>"
+syn match hsNumber "\v<[0-9]%(_*[0-9])*>|<0[xX]_*[0-9a-fA-F]%(_*[0-9a-fA-F])*>|<0[oO]_*%(_*[0-7])*>|<0[bB]_*[01]%(_*[01])*>"
+syn match hsFloat "\v<[0-9]%(_*[0-9])*\.[0-9]%(_*[0-9])*%(_*[eE][-+]?[0-9]%(_*[0-9])*)?>|<[0-9]%(_*[0-9])*_*[eE][-+]?[0-9]%(_*[0-9])*>|<0[xX]_*[0-9a-fA-F]%(_*[0-9a-fA-F])*\.[0-9a-fA-F]%(_*[0-9a-fA-F])*%(_*[pP][-+]?[0-9]%(_*[0-9])*)?>|<0[xX]_*[0-9a-fA-F]%(_*[0-9a-fA-F])*_*[pP][-+]?[0-9]%(_*[0-9])*>"
" Keyword definitions. These must be patterns instead of keywords
" because otherwise they would match as keywords at the start of a
" "literate" comment (see lhs.vim).
syn match hsModule "\<module\>"
-syn match hsImport "\<import\>.*"he=s+6 contains=hsImportMod,hsLineComment,hsBlockComment
-syn match hsImportMod contained "\<\(as\|qualified\|hiding\)\>"
+syn match hsImport "\<import\>.*"he=s+6 contains=hsImportMod,hsLineComment,hsBlockComment,@NoSpell
+syn match hsImportMod contained "\<\(as\|qualified\|hiding\)\>" contains=@NoSpell
syn match hsInfix "\<\(infix\|infixl\|infixr\)\>"
syn match hsStructure "\<\(class\|data\|deriving\|instance\|default\|where\)\>"
syn match hsTypedef "\<\(type\|newtype\)\>"
@@ -97,8 +97,8 @@ endif
" Comments
-syn match hsLineComment "---*\([^-!#$%&\*\+./<=>\?@\\^|~].*\)\?$"
-syn region hsBlockComment start="{-" end="-}" contains=hsBlockComment
+syn match hsLineComment "---*\([^-!#$%&\*\+./<=>\?@\\^|~].*\)\?$" contains=@Spell
+syn region hsBlockComment start="{-" end="-}" contains=hsBlockComment,@Spell
syn region hsPragma start="{-#" end="#-}"
" C Preprocessor directives. Shamelessly ripped from c.vim and trimmed