This commit is contained in:
Adam Stankiewicz
2016-05-13 15:54:46 +02:00
parent 22f6f3b6d3
commit 84593f2d7f
4 changed files with 17 additions and 8 deletions

View File

@@ -319,7 +319,10 @@ function! GetHaskellIndent()
" foo " foo
" >>{ " >>{
if l:line =~ '^\s*{' && l:prevline !~ '^{' if l:line =~ '^\s*{' && l:prevline !~ '^{'
return match(l:prevline, '\S') + &shiftwidth let l:s = match(l:prevline, '\S')
if l:s >= 0
return l:s + &shiftwidth
endif
endif endif
" in foo " in foo

View File

@@ -42,7 +42,7 @@ syn region cryString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=crySpecial
syn region cryString start=+``+ skip=+\\\\\|\\"+ end=+``+ contains=hsSpecialChar syn region cryString start=+``+ skip=+\\\\\|\\"+ end=+``+ contains=hsSpecialChar
syn match cryCharacter "[^a-zA-Z0-9_']'\([^\\]\|\\[^']\+\|\\'\)'"lc=1 contains=crySpecialChar,crySpecialCharError syn match cryCharacter "[^a-zA-Z0-9_']'\([^\\]\|\\[^']\+\|\\'\)'"lc=1 contains=crySpecialChar,crySpecialCharError
syn match cryCharacter "^'\([^\\]\|\\[^']\+\|\\'\)'" contains=crySpecialChar,crySpecialCharError syn match cryCharacter "^'\([^\\]\|\\[^']\+\|\\'\)'" contains=crySpecialChar,crySpecialCharError
syn match cryNumber "\<[0-9]\+\>\|\<0[xX][0-9a-fA-F]\+\>\|\<0[oO][0-7]\+\>" syn match cryNumber "\<[0-9]\+\>\|\<0[b][01]\+\>\|\<0[x][0-9a-fA-F]\+\>\|\<0[o][0-7]\+\>"
" Keyword definitions. " Keyword definitions.
@@ -61,10 +61,12 @@ syn keyword cryPrimitive error parity lg2 pmod pdiv pmult format
syn keyword cryPrimitive join split groupBy take drop min max negate reverse syn keyword cryPrimitive join split groupBy take drop min max negate reverse
syn keyword cryPrimitive project tail width syn keyword cryPrimitive project tail width
syn keyword cryPrimitive ASSERT syn keyword cryPrimitive ASSERT
syn keyword cryPrimitive module import private
" Comments " Comments
syn match cryLineComment "//.*" syn keyword cryTodo contained TODO FIXME XXX
syn region cryBlockComment start="/\*" end="\*/" contains=cryBlockComment syn match cryLineComment "//.*" contains=cryTodo
syn region cryBlockComment start="/\*" end="\*/" contains=cryBlockComment,cryTodo
if !exists("cry_minlines") if !exists("cry_minlines")
let cry_minlines = 50 let cry_minlines = 50
@@ -103,6 +105,7 @@ if version >= 508 || !exists("did_cry_syntax_inits")
hi link cryBoolean Boolean hi link cryBoolean Boolean
hi link cryType Type hi link cryType Type
hi link cryProp Keyword hi link cryProp Keyword
hi link cryTodo Todo
delcommand HiLink delcommand HiLink
endif endif

View File

@@ -83,7 +83,10 @@ syn region markdownLink matchgroup=markdownLinkDelimiter start="(" end=")" conta
syn region markdownId matchgroup=markdownIdDelimiter start="\[" end="\]" keepend contained syn region markdownId matchgroup=markdownIdDelimiter start="\[" end="\]" keepend contained
syn region markdownAutomaticLink matchgroup=markdownUrlDelimiter start="<\%(\w\+:\|[[:alnum:]_+-]\+@\)\@=" end=">" keepend oneline syn region markdownAutomaticLink matchgroup=markdownUrlDelimiter start="<\%(\w\+:\|[[:alnum:]_+-]\+@\)\@=" end=">" keepend oneline
let s:concealends = has('conceal') ? ' concealends' : '' let s:concealends = ''
if has('conceal') && get(g:, 'markdown_syntax_conceal', 1) == 1
let s:concealends = ' concealends'
endif
exe 'syn region markdownItalic matchgroup=markdownItalicDelimiter start="\S\@<=\*\|\*\S\@=" end="\S\@<=\*\|\*\S\@=" keepend contains=markdownLineStart' . s:concealends exe 'syn region markdownItalic matchgroup=markdownItalicDelimiter start="\S\@<=\*\|\*\S\@=" end="\S\@<=\*\|\*\S\@=" keepend contains=markdownLineStart' . s:concealends
exe 'syn region markdownItalic matchgroup=markdownItalicDelimiter start="\S\@<=_\|_\S\@=" end="\S\@<=_\|_\S\@=" keepend contains=markdownLineStart' . s:concealends exe 'syn region markdownItalic matchgroup=markdownItalicDelimiter start="\S\@<=_\|_\S\@=" end="\S\@<=_\|_\S\@=" keepend contains=markdownLineStart' . s:concealends
exe 'syn region markdownBold matchgroup=markdownBoldDelimiter start="\S\@<=\*\*\|\*\*\S\@=" end="\S\@<=\*\*\|\*\*\S\@=" keepend contains=markdownLineStart,markdownItalic' . s:concealends exe 'syn region markdownBold matchgroup=markdownBoldDelimiter start="\S\@<=\*\*\|\*\*\S\@=" end="\S\@<=\*\*\|\*\*\S\@=" keepend contains=markdownLineStart,markdownItalic' . s:concealends

View File

@@ -64,9 +64,9 @@ syntax match swiftNumber "\v<\d+>"
syntax match swiftNumber "\v<(\d+_+)+\d+(\.\d+(_+\d+)*)?>" syntax match swiftNumber "\v<(\d+_+)+\d+(\.\d+(_+\d+)*)?>"
syntax match swiftNumber "\v<\d+\.\d+>" syntax match swiftNumber "\v<\d+\.\d+>"
syntax match swiftNumber "\v<\d*\.?\d+([Ee]-?)?\d+>" syntax match swiftNumber "\v<\d*\.?\d+([Ee]-?)?\d+>"
syntax match swiftNumber "\v<0x\x+([Pp]-?)?\x+>" syntax match swiftNumber "\v<0x[[:xdigit:]_]+([Pp]-?)?\x+>"
syntax match swiftNumber "\v<0b[01]+>" syntax match swiftNumber "\v<0b[01_]+>"
syntax match swiftNumber "\v<0o\o+>" syntax match swiftNumber "\v<0o[0-7_]+>"
" BOOLs " BOOLs
syntax keyword swiftBoolean syntax keyword swiftBoolean