tacahiroy / ctrlp-funky

A super simple function navigator for ctrlp.vim
http://www.vim.org/scripts/script.php?script_id=4592
MIT License
396 stars 71 forks source link

Added support for the Elm language #90

Closed lorenzo closed 8 years ago

tacahiroy commented 8 years ago

Thanks for this. Although I'm not familiar with elm language, according to a sample in the official site, the regexp in the filter function doesn't seem to extract function definitions, but it extracts caller of functions. http://elm-lang.org/examples/zip

lorenzo commented 8 years ago

I've bene using this for a while already, and even though it is not flawless, it catches the big majority of cases, provided there is a function signature provided. Here's a screenshot:

screen shot 2016-07-15 at 12 00 10

lorenzo commented 8 years ago

@tacahiroy I pushed another commit that fixes the quirkiness I was experiencing before and also adds support for custom operators definition such as (~>) : List a -> List a -> a

What this does not cover, is finding functions without a signature header (function names without a colon).

For example, this is extracted:

find : String -> List String -> Bool 
find needle haystak =
    ...

But this will not be, as it is missing the function header:

find needle haystak =
    ...
tacahiroy commented 8 years ago

Thanks for your code. confirmed behaviour with http://elm-lang.org/examples/form