atom-haskell-archive / autocomplete-haskell

Atom autocomplete-plus provider for haskell
https://atom.io/packages/autocomplete-haskell
MIT License
23 stars 1 forks source link

Autocomplete function names? #12

Closed AriaFallah closed 8 years ago

AriaFallah commented 8 years ago

Given some function like this:

someFunc :: IO ()
someFunc = putStrLn "someFunc"

If I type some, it won't give me a completion option for someFunc is this intentional?

lierdakil commented 8 years ago

Sorry about the late answer. Long story short, local definitions (i.e. those defined in the same module) are collected using built-in symbol provider. It should give you suggestion for someFunc at the end of suggestion list.

ac-h-powered suggestions will always take precedence over built-in provider -- that's just how Atom's autocompletion is -- can't do much about that.

Feel free to let me know if it doesn't work as expected.

AriaFallah commented 8 years ago

@lierdakil

Hey I had stopped working with Haskell when you replied, but this is actually still a problem. It's not that I get a suggestion at the bottom of what ac-h suggest, but no suggestions at all.

I made a small video of the problem: https://streamable.com/zjou

lierdakil commented 8 years ago

Check your autocomplete-plus settings then. Make sure 'Enable Built-In Provider' is turned on. If it is, try selecting 'Fuzzy' as 'Default Provider' (since 'Symbol' is relatively new, it can theoretically fail -- although it's a bit better at showing completions). While at it, you might also consider enabling locality bonus.

AriaFallah commented 8 years ago

It worked! The built in provider was not enabled. Thanks a lot.