iquiw / company-ghc

Company-mode completion back-end for haskell-mode via ghc-mod
125 stars 6 forks source link

Show type info in annotation #22

Open user471 opened 9 years ago

user471 commented 9 years ago

Is there any reason to not showing type info in completion annotation? Similar to company-ghc-show-module but company-ghc-show-type-info It could be very useful.

iquiw commented 9 years ago

Previously, it was inefficient since it is necessary to call one ghc-mod command per a type.

Now since v1.0.0, all types in a module can be got by one ghc-mod browse. So it is possible but I am afraid some types are too long.

I will consider to add an option for it.

user471 commented 9 years ago

So it is possible but I am afraid some types are too long.

I don't think it would be a problem for big monitors. If someone will have a problem you could add an option something like type-info-max-length.

iquiw commented 9 years ago

Committed initial attempt to custom-annotation branch.

user471 commented 9 years ago

@iquiw Should it already work? It isn't working for me.

iquiw commented 9 years ago

Yes, it should. Note that it is not on MELPA, but in custom-annotation branch on Github.

There may be some work and incompatible changes before merging it to master.

user471 commented 9 years ago

I just downloaded https://raw.githubusercontent.com/iquiw/company-ghc/custom-annotation/company-ghc.el and replaced my local version.