Adding new LSP languages in Kate?
Nick Battle
nick.battle at gmail.com
Thu Jan 26 14:33:16 GMT 2023
Hi Kate folk,
I've recently managed to get Kate working with the LSP server that we have
for a suite of languages, based around the VDM formal method. Normally we
use the VSCode client for our tools, but I'm interested in expanding the
clients that we can support.
VDM effectively has three languages or dialects, so I've tried to configure
this as three separate Filetypes. It does work, but the configuration is a
bit awkward and I'm wondering whether there's a better way? :-)
There's a wiki page that describes what I did here:
https://github.com/nickbattle/vdmj/wiki/Using-the-Kate-Editor. I'm testing
with version 22.12.1.
A few questions:
- Am I using the highlightingModeRegex correctly? The separate language
"dialects" (filename extensions) translate into different options for the
LSP server, -vdmsl, -vdmpp and -vdmrt. The only way I could get this
working was to choose three *different* random highlight modes that
were *not
used* *elsewhere* in the configuration.
- But this means the actual highlighting is nothing like what is
required! Is there any way to improve that?
- When I try to open a folder with a space in the folder name, your LSP
client sends a "rootUri" with a space in it. That causes Java's URI
handling to reject it (it should be %20?)
- You send the entire file contents on didChange events? That gets quite
expensive with large files; is it possible to configure incremental changes
somehow?
I'm not subscribed to this list, so I would appreciate a CC in any replies.
Many thanks!
Cheers,
-nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20230126/20d70e5a/attachment.htm>
More information about the KWrite-Devel
mailing list