fsharp / emacs-fsharp-mode

F# Emacs mode
Apache License 2.0
205 stars 62 forks source link

Eldoc truncated examples #339

Open ettomatic opened 3 months ago

ettomatic commented 3 months ago

Description

I am learning F# on Emacs and my experience has been great. Thank you for your work!

A little annoyance (at least for a F# newbie) is that documentation examples get truncated by Eldoc:

This seems to come from FsAutoComplete but I am not sure what causes it. I appreciate taht this could not be due to this project, in case an hint on what could be the root case could be helpful.

If this can help, I tried installing Ionide on VScode and the examples section seems to appear in the documentation.

Repro steps

Please provide the steps required to reproduce the problem

  1. hover a function (like 'Map.find)
  2. invoke eldoc-doc-buffer
  3. the documentation appear as expected but the examples section is truncated with a link and a message. Open the documentation to see the truncated examples

Related information

Linux Emacs 29.2 Dotnet 8.0.3

baronfel commented 3 months ago

What you're seeing is the result of a design decision to render minimal tooltips inline in favor of rendering something more full in the Info Panel display.

Unfortunately this display is only available on VSCode - what we should do is instead use the information that the client sends us during the Initialize LSP call to determine how we should format tooltips. This would allow us to customize the rendering for different clients based on client capabilities or client names.

Would you mind opening an issue on FsAutocomplete that links to this one so we can track the request more easily?