Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unusual characters in Ionide tooltip #1939

Closed
Darkle opened this issue Oct 1, 2023 · 4 comments · Fixed by ionide/FsAutoComplete#1265
Closed

Unusual characters in Ionide tooltip #1939

Darkle opened this issue Oct 1, 2023 · 4 comments · Fixed by ionide/FsAutoComplete#1265
Labels
bug up for grabs Good first issues

Comments

@Darkle
Copy link

Darkle commented Oct 1, 2023

Describe the bug

Unusual characters are appearing in the vscode tooltips when using Ionide.

Steps to reproduce

  1. Type something like asd in your code
  2. Hover over it
  3. You should see odd characters in the tooltip

Screenshots

  • ss-vsc
  • Discord user Christian's screenshot: image

Machine info

  • OS: debian linux bullseye
  • .NET SDK version: 7.0.401
  • Ionide version: v7.12.4
  • vscode 1.82.2

Additional context

https://discord.com/channels/196693847965696000/524660202864377896/1157997202128519188

@TheAngryByrd TheAngryByrd added bug up for grabs Good first issues labels Oct 4, 2023
@Martin521
Copy link

I would consider this a compiler bug. Some new error message are "semi-formatted" (including newlines). I don't think they should be.

@Darkle
Copy link
Author

Darkle commented Apr 16, 2024

Some additional context; it doesn't seem to happen in .fsx files: https://discord.com/channels/196693847965696000/524660202864377896/1229726085546119200

@MrLuje
Copy link

MrLuje commented Apr 16, 2024

The character is a UnicodeCategory.ParagraphSeparator so I guess, it is a preformatted diagnostic as stated by @Martin521
On fs files it is a ParagraphSeparator but a regular \n on fsi files.

From what I see, it's directly coming from "F# Compiler" diagnostics
https://github.com/ionide/FsAutoComplete/blob/bc827fb748e9b38615dda6f51732072e56bfdb1f/src/FsAutoComplete/LspServers/AdaptiveServerState.fs#L485-L488

A few questions :

@baronfel
Copy link
Contributor

Good investigation @MrLuje! I think we can approach this in a few places:

  • Do the newline replacement on the message in FSAC
  • Raise an issue/discussion on dotnet/fsharp for clarification about the intent here
  • Longer term, this particular event could be moved to the new infrastructure that @nojaf and others have created where the diagnostic can contain data that would provide the suggestions directly instead of us having to format the new lines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug up for grabs Good first issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants