https://bugs.kde.org/show_bug.cgi?id=492076

            Bug ID: 492076
           Summary: LSP plugin output from rust-analyzer has incorrect
                    syntax highlighting
    Classification: Applications
           Product: kate
           Version: 24.08.0
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: kwrite-bugs-n...@kde.org
          Reporter: adam.m.fontenot+...@gmail.com
  Target Milestone: ---

Created attachment 172874
  --> https://bugs.kde.org/attachment.cgi?id=172874&action=edit
screenshot of the issue

Incidentally, it might be useful if we had a lsp-plugin component for reporting
issues. Maybe a Bugzilla admin could add one?

SUMMARY

If you hover over a String type in Kate, you get broken syntax highlighting in
the output. (Same for most other types with extensive documentation.)

Have a look at https://doc.rust-lang.org/1.80.1/src/alloc/string.rs.html to see
the raw documentation that is supposed to be shown.  The portions of the
documentation that are code are clearly delineated in the source by backticks -
this is a Markdown variant.

I'm not sure if it's possible to debug language server responses within Kate,
but my reading of the spec is that responses to "hover information" requests
are supposed to be Markdown documents, so my guess is that Kate is receiving
something more-or-less exactly like what is shown in the raw Rust language
documentation.

This means that Kate must be failing to parse the Markdown correctly since it's
applying syntax highlighting to the wrong elements.

rust-analyzer 2024-08-19 (v0.3.2078)

STEPS TO REPRODUCE
1. Hover over the word "String" (representing a Rust std String) in a document
with the rust-analyzer server enabled for the LSP plugin

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

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to