SUMMARY When I open a .zig file in Kate, it's detected as C language, causing the LSP plugin to launch clangd instead of zls. STEPS TO REPRODUCE 1. Launch Kate and open a .zig file. 2. Optionally enable the "LSP Client" plugin, and open the "LSP Client" tool view and look at the Messages tab. OBSERVED RESULT Kate recognizes the Zig source code file as C. As a result, the LSP client launches clangd (which fails to parse the file, and gives inaccurate completions) instead of zls. EXPECTED RESULT Kate recognizes the Zig source file as Zig, applies Zig syntax highlighting, and launches zls (which the LSP client is already configured to do). I don't know if it's intentional that Kate doesn't offer Zig highlighting and requires that you install it yourself. But it seems strange considering that Kate's LSP plugin offers a built-in rule (https://invent.kde.org/utilities/kate/-/merge_requests/117) to recognize Zig highlighting and run zls, yet Kate doesn't have a built-in Zig highlighting mode. In the end, I installed https://github.com/ziglang/kde-syntax-highlighting (last updated 2018), which required `mkdir -p $HOME/.local/share/org.kde.syntax-highlighting/syntax/` since the folder didn't exist yet. After switching previously opened files from C to Zig highlighting mode, zls is called properly. Operating System: Garuda Linux KDE Plasma Version: 5.20.5 KDE Frameworks Version: 5.79.0 Qt Version: 5.15.2 Kernel Version: 5.10.15-120-tkg-bmq OS Type: 64-bit Processors: 4 × Intel® Core™ i5-6200U CPU @ 2.30GHz Memory: 7.6 GiB of RAM Graphics Processor: Mesa Intel® HD Graphics 520 ADDITIONAL INFORMATION
We had a merge request but it never landed. If you get the author to relicense under MIT (or under the license he based that work on), we can try to merge this. See last try https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/98
Hi, as long as nobody contributes a highlighting, nothing will happen. We have good documentation on https://invent.kde.org/frameworks/syntax-highlighting/-/blob/master/README.md to get somebody started. Beside this, one can always reach out on the channels described on https://kate-editor.org/support/