Open lengstrom opened 8 years ago
It is just not implemented.
company-ghc
scans module import statements and browse the modules (ghc-modi browse
).
There is no logic to scan or browse functions in the current file.
company-dabbrev-code
with grouped backend can complete identifiers in the current file, thought it does not show the type signature.
e.g.
(add-to-list 'company-backends '(company-ghc :with company-dabbrev-code))
Awesome thanks a lot!
On Wednesday, July 6, 2016, Iku Iwasa notifications@github.com wrote:
It is just not implemented. company-ghc scans module import statements and browse the modules (ghc-modi browse). There is no logic to scan or browse functions in the current file.
company-dabbrev-code with grouped backend can complete identifiers in the current file, thought it does not show the type signature. e.g.
(add-to-list 'company-backends '(company-ghc :with company-dabbrev-code))
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/iquiw/company-ghc/issues/31#issuecomment-230789172, or mute the thread https://github.com/notifications/unsubscribe/AAucIbAIdGUO6cAoZO-ZP7sBvNHUTZzrks5qS7ulgaJpZM4JFVVV .
I would contribute a PR if I had the skills, but I'm a bit new to Haskell. I spent an hour looking for this feature, and would also love if it existed!
The following didn't work for me:
(with-eval-after-load 'company
;(setq ghc-debug t)
(add-to-list 'company-backends '(company-ghc :with company-dabbrev-code)))
@freckletonj as you can see from C-h f
, with-eval-after-load
takes a FILE not a function name. So you want "company"
instead of 'company
, like this:
(with-eval-after-load "company"
(add-to-list 'company-backends '(company-ghc :with company-dabbrev-code)))
Depending on what other things you have, you might want to wrap the whole thing in a (with-eval-after-load "ghc" [as above])
as well. That works for me anyway.
Hi,
company-ghc
works great for autocompleting candidates in Prelude and other modules I import, but for some reason doesn't autocomplete candidates in the file I'm working in. To make a contrived example, when I have the code:When I write "las", there's no completion for
lastDigit
:Is this by design or am I doing something wrong? Thanks in advance for the help, other than with this problem I'm loving
company-ghc
:)