emacs-lsp / lsp-haskell

lsp-mode :heart: haskell
https://emacs-lsp.github.io/lsp-haskell
GNU General Public License v3.0
227 stars 56 forks source link

Please, can inferred types be copied to clipboard #139

Closed Anton-Latukha closed 2 years ago

Anton-Latukha commented 2 years ago

Currently, there are numerous cases when types that are inferred (for instance declarations, for local functions, for typed holes) are shown in floating minibuffer, but can not be copied to search information on them.

Screenshot-2021-11-19-22:02:56

As a regular user I need to manually remember, & retype IOEnv (Env TcGblEnv TcLclElv) a -> IO a in a separate virtual monitor to websearch.

If something - I know where are the inferred type signatures are in the HLS. But seems like that info is provided into Emacs & also can be retrieved in it.

An inferred signature retrieval key combination would be of immense help.

yyoncho commented 2 years ago

FYI there is M-x lsp-describe-thing-at-point which will open a buffer supporting copying.

Anton-Latukha commented 2 years ago

Yup. Writing a report - thought same thing (somebody would tell me to configure/open static buffer).

It is hidden in Spacemacs in h (help) submenu (, h h).

Good enough for me. But separate function would been even awesomer (*sic). It asks to exist when project would have #129 ability.

yyoncho commented 2 years ago

JFYI you can use K in spacemacs as well.

Anton-Latukha commented 2 years ago

Never knew of these short key combinations, K is not in the Spacemacs development Haskell layer docs nor in development LSP layer docs & idk how to search/see all currently loaded Emacs keybinds in the keymap (seems to be describe-bindings).

yyoncho commented 2 years ago

It is in top level spacemacs convention. K = ,hh; gd = ,gg