Bug 470328

Summary: LSP Client: Kate's LSP parser does not support codeDescription from a server
Product: [Applications] kate Reporter: Duncan <kde.bugs>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: REPORTED ---    
Severity: wishlist    
Priority: NOR    
Version First Reported In: 22.12.3   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

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