vim-lambdify icon indicating copy to clipboard operation
vim-lambdify copied to clipboard

Support Purescript

Open oblitum opened this issue 8 years ago • 3 comments

Ended up here from https://github.com/purescript/purescript/issues/2289. Your plugin seems like a nice idea for me :-) So I'm opening this feature request.

oblitum avatar Aug 26 '16 21:08 oblitum

I've tried to add support locally since it should have been a trivial copy of the Haskell/Elm implementation but it seems to enter in conflict with the well known https://github.com/raichoo/purescript-vim and there's no lambdification.

oblitum avatar Aug 26 '16 22:08 oblitum

I've discovered there's a new fix for such cases of wishing to apply conceal over syntax groups through :call matchadd('Conceal', '\\', 10, 99, {'conceal': 'λ'}), for example, Maybe it should be adopted in the implementation of the functionality of this plugin.

oblitum avatar Aug 27 '16 07:08 oblitum

FYI, this is how I'm applying the lambda conceal on my .vimrc now:

set conceallevel=2
au FileType purescript set concealcursor=vin
au WinEnter,BufEnter,BufRead,FileType,Colorscheme *
    \ if exists('w:lambda_conceal')                                                                  |
    \     call matchdelete(w:lambda_conceal)                                                         |
    \     unlet w:lambda_conceal                                                                     |
    \ endif                                                                                          |
    \ if &ft == 'purescript'                                                                         |
    \     let w:lambda_conceal = matchadd('Conceal', '\\\%([^\\]\+→\)\@=', 10, -1, {'conceal': 'λ'}) |
    \     hi! link Conceal Operator                                                                  |
    \ endif

oblitum avatar Aug 27 '16 22:08 oblitum