Support Language Server Protocol
lscoughlin opened this issue · 6 comments
Why not support the Language Server Protocol? It gets you a bunch of the boring but important stuff quickly.
I cannot see a C implementation of the language server on their list. If you know of a library that we can plug in that would be great.
There are multiple:
- this one From the clang folks.
- this one from the cquery folks
- this one from which forks from cquery.
These links come from the community site
Hmm, they all look like C++.
Maybe we can access the APIs from our pure C code, I would have to investigate further.
Ah - I see what you mean. LSP breaks down into client and server implementations - so you actually run the server in a separate process and talk to it with jsonrpc, which is less inefficient then it sounds.
I don't really want to package a C++ build into our C based IDE - hence why I think we need to find a C implementation of the server. Or is the server shipped separately in a system package manager and run in the background?
clangd is shipped separately and available on most distros, the cquery based solutions you might have to build and be thoughtful about but they provide greater speed a little more functionality.
And in either case, you would be running the lsp-server in the background and interacting with it as a client.