https://bugs.kde.org/show_bug.cgi?id=510863
Bug ID: 510863
Summary: LSP Client does not do url encode to the value of
rootUri
Classification: Applications
Product: kate
Version First 25.08.2
Reported In:
Platform: Arch Linux
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
SUMMARY
Kate's LSP Client does not do url encode to the value of `rootUri`, which may
break some LSP servers when there contains non-ascii characters.
STEPS TO REPRODUCE
1. Setup [zuban](https://github.com/zubanls/zuban), a Python LSP server
implementation.
2. Launch kate and open a python project which has non-ascii characters in the
path. For example, `/home/zhanghua/文档/repositories/git/github.com/aumir` is my
project root.
3. See zuban failed to start.
OBSERVED RESULT
zuban failed to start, only this is in the server output:
Failed to deserialize InitializeParams: unexpected character at index 22;
{"capabilities":{"textDocument":{"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["quickfix","refactor","source"]}}},"completion":{"completionItem":{"resolveSupport":{"properties":["additionalTextEdits","documentation"]},"snippetSupport":true}},"documentSymbol":{"hierarchicalDocumentSymbolSupport":true},"hover":{"contentFormat":["markdown","plaintext"]},"inlayHint":{"dynamicRegistration":false},"publishDiagnostics":{"relatedInformation":true},"selectionRange":{"dynamicRegistration":false},"semanticTokens":{"formats":["relative"],"requests":{"full":{"delta":true},"range":true},"tokenModifiers":[],"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator"]},"synchronization":{"didSave":true}},"window":{"showMessage":{"messageActionItem":{"additionalPropertiesSupport":true}},"workDoneProgress":true}},"processId":67782,"rootPath":"/home/zhanghua/文档/repositories/git/github.com/aumir","rootUri":"file:///home/zhanghua/文档/repositories/git/github.com/aumir"}
EXPECTED RESULT
zuban starts successfully.
SOFTWARE/OS VERSIONS
Windows: N/A
macOS: N/A
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma:
KDE Plasma Version: 6.4.5
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0
ADDITIONAL INFORMATION
You can use this Kate user LSP configuration to setup zuban:
{
"python": {
"command": ["zuban", "server"],
"rootIndicationFilePatterns": ["setup.py", "pyproject.toml",
"poetry.lock", "pdm.lock" , "uv.lock"],
"url": "https://zubanls.com/",
"highlightingModeRegex": "^Python$"
}
}
If I move my project to a path without any non-ascii characters, like
`/home/zhanghua/aumir`, the server starts successfully.
See also: https://github.com/zubanls/zuban/issues/104
--
You are receiving this mail because:
You are watching all bug changes.