Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign

an easy cpp language-server-protocol client(C++)

(1/5) > >>

ollydbg:
alextsao1999/lsp-cpp: an easy cpp language-server-protocol client

I found one project in github which can handle LSP in C++.

Maybe, we can use it as a new simple code-completion engine.  :)

This guy also has a similar interesting project: alextsao1999/ast-buffer: Fast incremental parsing using piece table and tree-sitter to generate syntax tree

oBFusCATed:
Yes, but first you need to have a CC plugin which supports LSP.
Mine is in pretty experimental state and I'm not sure I'll be able to get to it in 2021. :(
Then you have plenty of options for LSP C++ support.

BlueHazzard:
If i am not misunderstanding this, this IS a client? Or at least the base for a client?

[Edit:] Yes this is a client, and it looks quite compact. It is windows only, so we would have to adapt it, but the whole protocol handling could probably be taken from this (if the license is ok) and this would be a huge part less work...

Pecan:
I have the alextsao1999/lsp-cpp working as a client CB plugin (on windows) using CCLS/clang as the server.

It works quite well. But I'm disappointed that it is not as fast as the CB CC plugin responding to code completions.

I think this is because CB CC looks up the results directly from its' tree of symbols and can respond nearly immediately.

Where as CB CCLS has to communicate via pipes to CCLS. So there's a 1/4 second (or less) lag between the ccmanagers event notification and the response from CCLS/clang.

ollydbg:

--- Quote from: Pecan on December 09, 2020, 07:02:36 am ---I have the alextsao1999/lsp-cpp working as a client CB plugin (on windows) using CCLS/clang as the server.

It works quite well. But I'm disappointed that it is not as fast as the CB CC plugin responding to code completions.

I think this is because CB CC looks up the results directly from its' tree of symbols and can respond nearly immediately.

Where as CB CCLS has to communicate via pipes to CCLS. So there's a 1/4 second (or less) lag between the ccmanagers event notification and the response from CCLS/clang.

--- End quote ---
Wonderful job!

I think the time lag about 250ms is not that much. Maybe, we can use CodeLite's method, let user choose which code completion they need or make the CCLS as a fallback.
I see some of my friend are using visual studio code, it also use some clang related tool to do code completion, and he said it is slow especially for a prject which has 10 or 20 more cpp files.

The nice thing about CCLS is that it can do more things about code completion, such as variable rename, go to reference ...

Navigation

[0] Message Index

[#] Next page

Go to full version