Skip to main content
  1. Posts/

Kate LSP Client Progress

·1 min·
Kde Kate Development Kde Kate
Christoph Cullmann
Author
Christoph Cullmann
Software Engineer at AbsInt and KDE contributor

The Kate lsp branch contains now the infrastructure as used by Qt Creator. In addition, clangd is now somehow started in a working state for the first project opened inside Kate.

For example, if you use the CMake Kate project generator and you compile Kate from the “lsp” branch, clangd should pick up the compile_commands.json for a CMake generated Kate project.

;=) Unfortunately not much more than starting and informing clangd about the open workspaces (for the first opened project) works ATM.

If you press ALT-1 over some identifier, you will get some debug output on the console about found links, like below:

qtc.languageclient.parse: content: “{"id":"{812e04c6-2bca-42e3-a632-d616fdc2f7d4}","jsonrpc":"2.0","result":[{"range":{"end":{"character":20,"line":67},"start":{"character":6,"line":67}},"uri":"file:///local/cullmann/kde/src/kate/kate/katemainwindow.h"}]}”

The current ALT-1 handling is a big hack, as then one just adds the current document and triggers the GotoDefinitionRequest. A proper implementation tracks the opened/closed documented of the editor.

But at least in principle Kate is now able to start some language server processes and talk a bit with them, all thanks to the nice code borrowed from Qt Creator.

:=) As my spare time is limited, any help in bringing the branch up-to-speed is highly welcome, just drop us a mail to kwrite-devel@kde.org or mail me in private (cullmann@kde.org). A working LSP integration will help to make Kate more attractive for programmers of many languages.

Related

Kate Language Server Protocol Client
·2 mins
Kde Kate Development Kde Kate
Kate History - KDE 4 Porting
·2 mins
Kde Kate Development Kde Kate
Qt Creator 4.9 uses KSyntaxHighlighting
·1 min
Kde Qt Development Kde Qt
Removing Files from Git History
·2 mins
Git Development Git
Web-Server Transition
·2 mins
Www Centos Apache Mariadb
Privacy and Hugo Themes
·1 min
Www Hugo Privacy