SUMMARY I were playing around with Zig [1] and installed a corresponding language server [2] and a basic kde-syntax-highlighting zig.xml [3] my User Server Settings: { "servers": { "zig": { "command": ["/home/workaccount/Work/zls/main/zig-out/bin/zls"], "url": "https://github.com/zigtools/zls", "highlightingModeRegex": "^Zig$" } } } [1] https://github.com/ziglang/zig [2] https://github.com/zigtools/zls (ZLS) [3] https://github.com/ziglang/kde-syntax-highlighting/blob/master/zig.xml STEPS TO REPRODUCE 1. have ZLS options enable_ast_check_diagnostics and enable_autofix enabled/on 2. Open a .zig file 3. Save (Ctrl+S) (trigger a textDocument/didSave) ZLS sends a request with .id = .{ .String = "apply_edit" } https://github.com/zigtools/zls/blob/ac6353add7b1dc5fdee25333b02d8c52e589502a/src/Server.zig#L1771 OBSERVED RESULT Kate's LSP Client responds with ResponseMessage.id of 0 json { "id": 0, "jsonrpc": "2.0", "result": { "applied": false, "failureReason": "" } } EXPECTED RESULT a ResponseMessage with id "apply_edit" VSCodium(VSCode) for comparison: json {"jsonrpc":"2.0","id":"apply_edit","result":{"applied":true}} SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: 5.19.12, X11 (available in About System) KDE Plasma Version: 5.25.5 KDE Frameworks Version: 5.98.0 Qt Version: 5.15.6 ADDITIONAL INFORMATION The LSP spec does allow id to be string Thank You
I could be wrong, but for me it looks like Kate expect the id to be some integer id, no string. Btw., it would be great if somebody could upstream the zig hl file to syntax-highlighting and the language server spec to our kate.git. That would make testing a lot easier.
(In reply to Christoph Cullmann from comment #1) > I could be wrong, but for me it looks like Kate expect the id to be some > integer id, no string. Indeed, so it does at the moment. Will have a look at adjusting that.
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/943
Git commit bb551a06d537e56adf11d3c88b85c05cf4b23ec6 by Mark Nauwelaerts. Committed on 11/10/2022 at 14:46. Pushed by cullmann into branch 'master'. lspclient: handle server request with string id M +5 -4 addons/lspclient/lspclientserver.cpp https://invent.kde.org/utilities/kate/commit/bb551a06d537e56adf11d3c88b85c05cf4b23ec6