Created attachment 184386 [details] screen record SUMMARY Auto completion erases the leading space after '<' or '>' in if statement when using clangd as lsp server. However when I disable lsp, it works well. Get more detail from https://discuss.kde.org/t/why-auto-completion-after-or-erases-the-leading-spaces-in-kate/38284. STEPS TO REPRODUCE 1. launch kate and enable clangd as lsp server 2. write c++ code like: ```c++ int abcde = 1; if (1 ) { ``` 3. type '<' and a space in if statement, then type 'a' and press TAB to complete the code OBSERVED RESULT the space after '<' was erased EXPECTED RESULT keep the space after '<' SOFTWARE/OS VERSIONS Kate: 25.08.0 KDE Frameworks: 6.17.0 Qt: Using 6.9.1 and built against 6.9.1 Arch Linux (Wayland) Build ABI: x86_64-little_endian-lp64 Kernel: linux 6.12.43-1-lts ADDITIONAL INFORMATION When I disable lsp, it works well. It also happens on MAC platform. lsp configure: ```json "c": { "command": ["clangd", "-log=error", "--background-index", "--limit-results=500", "--completion-style=detailed", "--clang-tidy", "--fallback-style=\"Visual Studio\"", "--header-insertion-decorators"], "commandDebug": ["clangd", "-log=verbose", "--background-index"], "url": "https://clangd.llvm.org", "highlightingModeRegex": "^(C|ANSI C89|Objective-C)$" }, "cpp": { "use": "c", "highlightingModeRegex": "^(C\\+\\+|ISO C\\+\\+|Objective-C\\+\\+)$" } ```