Kate jumps to end of file when pylsp formats on save

I tried enabling “Format on save” in the LSP Client configuration, and while it works, the way Python’s pylsp communicates the change to Kate causes my cursor position to be lost. I end up at the bottom of the file if the language server makes any modifications. Both Normal and vi-mode are affected.

This doesn’t happen if only trailing whitespace gets deleted; since this happens without delay, I assume that’s Kate itself and not the language server.

Are folks using a workaround for this? I enabled the Ruff plugin, but that didn’t seem to change Kate’s format-on-save behavior either.

I’m running Kate 25.08.0 on KDE Plasma 6.4.4.

It just happened to me too, did you report it as a bug somehwere?