Kate LSP Status – July 21

The new LSP client by Mark Nauwelaerts keeps making nice progress.

It will not be shipped with the KDE Applications 19.08 release, but in master it is now compiled & installed per default. You only need to activate it on the plugin configuration page in Kate’s settings dialog to be able to use it.

For details how to build Kate master with it’s plugins, please take a look at this guide.

If you want to start to hack on the plugin, you find it in the kate.git, addons/lspclient.

Feel welcome to show up on kwrite-devel@kde.org and help out! All development discussions regarding this plugin happen there.

If you are already familiar with Phabricator, post some patch directly at KDE’s Phabricator instance.

What is new this week?

The most thing are internal cleanups and minor improvements.

Feature wise, the hover implementation works now more like in other editors or IDEs, you get some nice tool tip after some delay:

Never try to guess again what some auto means ;=)

There is still a lot that can be improved, e.g. a filter for the symbols outline is in work:

To be able to later out-source some parts of the generic LSP client code to a library, if there is demand, we will aim to make the plugin be licensed under the MIT license. This should make it easier for other projects to depend of our code, if wanted.

Kate LSP Client Continued

The new LSP client by Mark Nauwelaerts made nice progress since the LSP client restart post last week.

Reminder: The plugin is not compiled per default, you can turn it on via:

cmake -DCMAKE_INSTALL_PREFIX=“your prefix” -DENABLE_LSPCLIENT=ON “kate src dir”

The code can still be found kate.git master, see lspclient in the addons directory.

What is new?

  • Diagnostics support: A tab in the LSP client toolview will show the diagnistics, grouped by file with links to jump to the locations. Issues will be highlighted in the editor view, too.

  • Find references: Find all references for some variable/function in your complete program. They are listed like the diagnostics grouped per file in an extra tab.

  • Improved document highlight: Highlight all occurrences of a variable/… inside the current document. Beside highlighting the reads/writes/uses, you get a jump list like for the other stuff as tab, too.

A feature I missed to show last time:

  • Hover support: Show more meta info about a code location, like the proper type, useful e.g. for almost-always-auto C++ programming.

We even got already two patches for the fresh plugin:

Both are aimed to improve the support of the Rust LSP server. As you can see, they got already reviewed and merged.

Feel welcome to show up on kwrite-devel@kde.org and help out! All development discussions regarding this plugin happen there.

If you are already familiar with Phabricator, post some patch directly at KDE’s Phabricator instance.

You want more LSP servers supported? You want to have feature X? You have seen some bug and want it to vanish? => Join!

Kate LSP Client Restart

Since my last post about the LSP client progress in May I didn’t work on that project at all I think.

But the good news is, somebody else did scratch that itch on his own ;=)

We have now a prototype plugin in kate.git master, see lspclient in the addons directory.

It is not compiled per default, you can turn it on via:

cmake -DCMAKE_INSTALL_PREFIX=“your prefix” -DENABLE_LSPCLIENT=ON “kate src dir”

It shares no code with my initial prototype. The author started this without knowing of my work. This might actually be not that bad, as this plugin is composed of a much smaller code base. This allows to get familiar with the code easier as with the code I copied over from Qt Creator for my initial try.

But, even nicer, it does actually work a lot better than my variant, already now!

What does work (tested with clangd and kate.git/work projects) at the moment:

  • Auto completion: you get the proper LSP server provided completion items

  • Outline view: Get an extra tool view with the symbols of your current view

  • Document highlight: highlight all occurrences of a variable/… inside the current view

  • Code navigation: jump to the definition/declaration

There is still a lot of stuff missing and this is all prototype quality. For example the document highlight implementation I added has no way to clear the highlighting at the moment beside document reload.

But given I just needed one hour to add the document highlight support, I would say the code base is easy to adjust.

=> If you have time and want a good LSP client, now you can join the fun and have direct results.

As the author was kind enough to move his work on the plugin to the KDE infrastructure, feel welcome to show up on kwrite-devel@kde.org and help out! All development discussions regarding this plugin happen there. We are happy to accept patches, too, if you are a new contributor!

Scroll to top