Bug 470328 - LSP Client: Kate's LSP parser does not support codeDescription from a server
Summary: LSP Client: Kate's LSP parser does not support codeDescription from a server
Status: REPORTED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 22.12.3
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-27 10:01 UTC by Duncan
Modified: 2023-05-27 10:01 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan 2023-05-27 10:01:35 UTC
SUMMARY
Kate's LSP handler (https://github.com/KDE/kate/blob/master/addons/lspclient/lspclientserver.cpp#L829) does not handle a returned codeDescription attribute of a Diagnostic.


STEPS TO REPRODUCE
1. Use a LSP that returns a codeDescription for a diagnostic
2. Trigger a diagnostic that includes that codeDescription attribute

OBSERVED RESULT
No rendering of a codeDescription entry in the JSON diagnostic

EXPECTED RESULT
Kate is able to render the `href` attribute of the codeDescription as part of the diagnostic data, linking the user to documentation that explains the diagnostic in detail.

SOFTWARE/OS VERSIONS
Operating System: Kubuntu 23.04
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.8
Kernel Version: 6.2.12-060212-generic (64-bit)
Graphics Platform: X11
Processors: 24 × AMD Ryzen 9 5900X 12-Core Processor
Memory: 31.2 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3060 Ti/PCIe/SSE2

ADDITIONAL INFORMATION
Based on the linked source code, `relatedInformation` is processed, but this attribute of a Diagnostic is for "these other document locations are affected". I'm currently scratching an itch of having Meta's Pyre type checker integrated as a plugin for `python-lsp-server`, but have run into the stumbling block that Kate won't render a `codeDescription` attribute.

`codeDescription` was added in 2020 to the specification - https://microsoft.github.io/language-server-protocol/specifications/specification-3-16/#diagnostic