SUMMARY Kate's LSP Client plugin matches LSP servers only on a file's Highlighting mode, which requires a KSyntaxHighlighting .xml definition for the language. LSP has the ability to provide syntax highlighting itself since 3.16, which Kate has supported since 21.08.0. If a language or filetype does not have a matching definition in KSyntaxHightlighting, you cannot use LSP. To easily support any language with an LSP server, the LSP client plugin should expose a few options for matching, not just the file's Highlighting mode (highlightingModeRegex). Kate file Modes—which are easy to author in the Settings dialog—are a good choice. Alternatively, LSP Client could match against file extensions directly. SOFTWARE/OS VERSIONS Linux/KDE Plasma: KDE neon 5.23 user edition KDE Plasma Version: 5.23.4 KDE Frameworks Version: 5.89.0 Qt Version: 5.15.3 ADDITIONAL INFORMATION (This is similar to Bug 447172, however that bug was unclear and messy)
I would propose to go the way to match the mode, too, if the highlighting mode didn't lead to a result.
I am potentially interested in contributing this feature.
lspclient: fallback to document mode for unsupported highlight mode https://invent.kde.org/utilities/kate/-/commit/6ae42a782999385b715b041aa11966a22b206593