I’d like to know whether ocaml-lsp supports type-at-point feature? The point is to display to the user the type at point inferred by the compiler.
I think this functionality already exists in Merlin for a while: merlin-show-type-at-point, and I’ve read articles talking about people’s corresponding lsp-mode/merlin Emacs config.
How about VIM? Is it integrated in ocaml-lsp already? From looking on GitHub, it seems it’s not, but then how come people manage to integrate it in Emacs’ lsp-mode?
Thanks for your reply. I see that you use merlin directly in vim. I rely on a LSP client for all the languages I write code in (coc.nvim at the moment) and was using ocaml-lsp for OCaml. Merlin is a dependency of ocaml-lsp.
I guess I’ll just ditch LSP for now and opt for merlin directly.
Sorry, I had missed your message.
Indeed, I was using the exact same configuration, but did not realize ‘show_documentation()’ does show type inference… I feel silly. My bad!
Good to know I can still rely on LSP.
You probably figured this out already, but you can get equivalent of merlin’s type at point but triggering the hover request in vim. In vscode, that is done by hovering over the point with your mouse. In coc, this snippet should do the trick :call CocActionAsync('doHover')