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

Basic support for UnicodeSyntax. #48

Merged
merged 1 commit into from
Mar 9, 2013
Merged
Show file tree
Hide file tree
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 autoload/vim2hs/haskell/editing.vim
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ function! vim2hs#haskell#editing#tabular() " {{{
AddTabularPattern! colon /^[^:]*\zs:/
AddTabularPattern! haskell_bindings /^[^=]*\zs=\ze[^[:punct:]]/
AddTabularPattern! haskell_comments /--.*/l2
AddTabularPattern! haskell_do_arrows / <- /l0r0
AddTabularPattern! haskell_do_arrows / \(<-\|←\) /l0r0
AddTabularPattern! haskell_imports /^[^(]*\zs(.*\|\<as\>.*/
AddTabularPattern! haskell_pattern_arrows / -> /l0r0
AddTabularPattern! haskell_types / :: /l0r0
AddTabularPattern! haskell_pattern_arrows / \(->\|→\) /l0r0
AddTabularPattern! haskell_types / \(::\|∷\) /l0r0
endfunction " }}}
6 changes: 3 additions & 3 deletions autoload/vim2hs/haskell/syntax.vim
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ function! vim2hs#haskell#syntax#keywords(conceal_wide, conceal_enumerations, con

if !a:conceal_wide
syntax match hsStructure
\ "[[:punct:]]\@<!\%(->\|<-\|::\)[[:punct:]]\@!"
\ "[[:punct:]]\@<!\%(->\|→\|<-\|←\|::\|∷\)[[:punct:]]\@!"
\ display
endif

if !a:conceal_bad
syntax match hsStructure
\ "[[:punct:]]\@<!\%(=>\|-<<\?\)[[:punct:]]\@!"
\ "[[:punct:]]\@<!\%(=>\|⇒\|-<<\?\)[[:punct:]]\@!"
\ display
endif

Expand Down Expand Up @@ -85,7 +85,7 @@ endfunction " }}}

function! vim2hs#haskell#syntax#types() " {{{
syntax match hsType
\ "^\(\s*\)\%(default\s\+\)\?\%(\k\+\|([^[:alnum:]]\+)\)\_s*::.*\%(\n\1\s.*\)*"
\ "^\(\s*\)\%(default\s\+\)\?\%(\k\+\|([^[:alnum:]]\+)\)\_s*\(::\|∷\).*\%(\n\1\s.*\)*"
\ contains=TOP,@Spell

highlight! link hsType Type
Expand Down