Giter Site home page Giter Site logo

Comments (4)

iquiw avatar iquiw commented on July 20, 2024

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))

from company-ghc.

lengstrom avatar lengstrom commented on July 20, 2024

Awesome thanks a lot!

On Wednesday, July 6, 2016, Iku Iwasa [email protected] 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
#31 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAucIbAIdGUO6cAoZO-ZP7sBvNHUTZzrks5qS7ulgaJpZM4JFVVV
.

from company-ghc.

freckletonj avatar freckletonj commented on July 20, 2024

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)))

from company-ghc.

infinity0 avatar infinity0 commented on July 20, 2024

@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.

from company-ghc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.