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

rust types displayed in minibuffer are truncated #4437

Open
3 tasks done
Ngoguey42 opened this issue Apr 22, 2024 · 2 comments
Open
3 tasks done

rust types displayed in minibuffer are truncated #4437

Ngoguey42 opened this issue Apr 22, 2024 · 2 comments
Labels

Comments

@Ngoguey42
Copy link

Ngoguey42 commented Apr 22, 2024

Thank you for the bug report

  • I am using the latest version of lsp-mode related packages.
  • I checked FAQ and Troubleshooting sections
  • You may also try reproduce the issue using clean environment using the following command: M-x lsp-start-plain

Bug description

Putting the cursor on a rust variable shows the type in the minibuffer:
image

Recently this stopped working correctly for some types:
image

When I run lsp-describe-thing-at-point on this problematic type I see 2 lines:
image

My understanding is that only the first line is shown in the minibuffer.

Steps to reproduce

  1. cargo init --name main to create a dummy project

  2. open main.rs with emacs

  3. answer i to the prompt that offers to import the project root

  4. Add an let i = 0; line in the code.

  5. Put the cursor on i and witness the problem in the minibuffer

Expected behavior

The type of the variable should be shown

Which Language Server did you use?

emacs

GNU Emacs 29.3

RA

rust-analyzer 0.3.1932-standalone (47a901b9b 2024-04-21)

lsp-mode
commit f2b9ab5e2b64a996ca093206a2adf54c578febc2 (HEAD, origin/master, origin/HEAD)
Author: Muir Manders <[email protected]>
Date:   Sun Apr 21 20:34:08 2024 -0700
    Co-authored-by: Muir Manders <[email protected]>

OS

MacOS

Error callstack

No response

Anything else?

No response

@Ngoguey42 Ngoguey42 added the bug label Apr 22, 2024
@Ngoguey42
Copy link
Author

I was able to mitigate this problem using (setq lsp-eldoc-render-all t)

@gagbo
Copy link
Contributor

gagbo commented May 14, 2024

It’s probably part of this PR/discussion #1740, which iirc didn’t get merged because the parsing/matching was too brittle and dependant on RA unspecified implementations that could change version to version

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

No branches or pull requests

2 participants