From cf38879fe89357f1aebd9aff9e86d3df01f46a4d Mon Sep 17 00:00:00 2001 From: Christoph Cullmann Date: Mon, 13 May 2024 21:45:11 +0200 Subject: sort posts --- content/posts/kate-lsp-client-progress/index.md | 28 +++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 content/posts/kate-lsp-client-progress/index.md (limited to 'content/posts/kate-lsp-client-progress/index.md') diff --git a/content/posts/kate-lsp-client-progress/index.md b/content/posts/kate-lsp-client-progress/index.md new file mode 100644 index 0000000..8b9b3b8 --- /dev/null +++ b/content/posts/kate-lsp-client-progress/index.md @@ -0,0 +1,28 @@ +--- +title: "Kate LSP Client Progress" +date: 2019-05-13T00:02:00+02:00 +draft: false +categories: [kde, kate, development] +tags: [kde, kate] +url: /posts/kate-lsp-client-progress/ +author: "Christoph Cullmann" +--- + +The [Kate lsp branch](https://cgit.kde.org/kate.git/log/?h=lsp) contains now the infrastructure as used by Qt Creator. +In addition, [clangd](https://clang.llvm.org/extra/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](mailto:kwrite-devel@kde.org) or mail me in private ([cullmann@kde.org](mailto:cullmann@kde.org)). +A working LSP integration will help to make Kate more attractive for programmers of many languages. -- cgit v1.2.3