Open parsonsmatt opened 8 years ago
The capturing of the first name is implemented thanks to code reuse from ghcmod-vim.
Currently, there is :InteroType
which is the specific type at point, and InteroGenericType
which gets the name and finds the more general type.
Being able to expand the expression to get type information for would indeed be fantastic. That is something I am missing from ghc-mod ;)
@gilligan I’m guessing that you’ve already noticed this, but if you’re using the mappings from the README (namely, using map
instead of nmap
), you should be able to manually select an entire expression in visual mode and get its type. It’s not quite as good as a single key to walk up to the next largest expression, but its close.
intero
is able to provide more information to the:type-at
depending on the name given to the identifier. For instance, getting the type of show inshow 3
using the nameit
givesInteger -> String
, while:type-at Main x y x y show
returnsShow a => a -> String
.Additionally, it'd be nice if it would expand the selection, like
ghcmod-vim
does.