https://bugs.kde.org/show_bug.cgi?id=458775
Bug ID: 458775 Summary: File type detection fails on reload after external change Product: kate Version: 22.04.3 Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: application Assignee: kwrite-bugs-n...@kde.org Reporter: kde.b...@cricalix.net Target Milestone: --- SUMMARY Mutating a file outside of Kate causes Kate to offer a reload option. Taking that option will result in Kate "forgetting" that the file is of a particular type (Python in my case), and disables type-specific behaviours like syntax highlighting and LSP usage. STEPS TO REPRODUCE 1. Install pylsp 2. Install black, flake8 plugins for pylsp 3. Edit a python file with Kate - ensure the file type is detected as Python, with syntax highlighting etc 4. Save the file with content that black will fix (extra long lines or whatever) 5. Mutate the file outside of Kate with black <filename> 6. Back to Kate, accept the reload of the file OBSERVED RESULT Syntax highlighting and LSP support stop working; Kate appears to treat the file as text/plain, not Python. Detected language in the bottom right is still Python. Clicking the detected language, and then clicking the already-ticked Python causes Kate to re-apply syntax highlighting and LSP support for Python. EXPECTED RESULT Upon reload, Kate considers the file to be Python still, with syntax highlighting and LSP support. SOFTWARE/OS VERSIONS Operating System: Kubuntu 22.04 KDE Plasma Version: 5.24.6 KDE Frameworks Version: 5.95.0 Qt Version: 5.15.3 Kernel Version: 5.15.0-47-generic (64-bit) Graphics Platform: X11 Processors: 24 × AMD Ryzen 9 5900X 12-Core Processor Memory: 31.3 GiB of RAM Graphics Processor: NVIDIA GeForce RTX 3060 Ti/PCIe/SSE2 ADDITIONAL INFORMATION -- You are receiving this mail because: You are watching all bug changes.