Bug 492063 - garbage text sometimes gets spammed into the LSP plugin popup box after it's been opened
Summary: garbage text sometimes gets spammed into the LSP plugin popup box after it's ...
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (other bugs)
Version First Reported In: 24.08.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-23 04:51 UTC by Adam Fontenot
Modified: 2024-08-23 20:55 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
screenshot of the issue (60.66 KB, image/png)
2024-08-23 04:51 UTC, Adam Fontenot
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Fontenot 2024-08-23 04:51:22 UTC
Created attachment 172868 [details]
screenshot of the issue

SUMMARY

Often I'll be sitting and looking at an open popup box from the LSP plugin, and while I'm looking at it, garbage text gets slowly added to the box every couple of seconds.

This seems to occur when the LSP gets some unexpected text and it spirals into trouble trying to deal with it.

In the screenshot, it's adding backslashes before what appears to be a Markdown representation of a link. It started with one or two slashes, and the rest had appeared by the time I took the screenshot. This *does not* happen every time I open the popup on the `String` type, in fact trying it again just now I see that the Markdown link is actually clickable now!

Also, the response from the rust-analyzer LSP should probably not be syntax highlighting the plain text in the response. Maybe that has something to do with the issue.

STEPS TO REPRODUCE
1. Hover over some objects in a LSP file, maybe ones where the response contains a link. (I think I've seen it with other stuff too though.) I'm using Rust code for this.

OBSERVED RESULT

See summary.

Operating System: Arch Linux 
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Kernel Version: 6.10.5-arch1-1 (64-bit)
Graphics Platform: Wayland


ADDITIONAL DETAILS

By the way, I've filed a few Kate bugs now against the new version, 24.08, but to be clear none of them are regressions. This is behavior I've noticed on 24.05 and am just now getting around to reporting.
Comment 1 Waqar Ahmed 2024-08-23 09:08:08 UTC
Wasn't able to reproduce with

rust-analyzer 1.79.0 (129f3b9 2024-06-10)

From the screenshot it seems like you are probably using a different version and maybe even have some custom settings for the lsp?

Seems like something is trying to escape the [ bracket repeatedly.
Comment 2 Adam Fontenot 2024-08-23 11:30:47 UTC
I'm using

Release: 2024-08-19 (v0.3.2078)

Which is provided by my distribution (Arch Linux) repositories. I've made no changes to the LSP settings for rust-analyzer.

Keep in mind it doesn't do this every time, and when it starts doing it, repeated activations of the popup (which I can do easily because of the hover-to-focus bug) add additional brackets every time.
Comment 3 Waqar Ahmed 2024-08-23 18:34:26 UTC
Can you try to reproduce with latest master?
Comment 4 Adam Fontenot 2024-08-23 20:55:37 UTC
I'm thinking this is probably the same issue as https://bugs.kde.org/show_bug.cgi?id=492081 because I can't reproduce it now. I'll close this one as fixed and reopen if I see it again.

Thanks for working on all these LSP issues!