Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
an easy cpp language-server-protocol client(C++)
Pecan:
--- Quote from: ollydbg on December 09, 2020, 09:07:06 am ---...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 ...
--- End quote ---
Agreed that we can use a method somewhat like CodeLites' to allow user code completion choices. But I'm still in the coding stage of adding all the current features of CB CC into the CB CCLS client.
RE: slowness of large projects:
CCLS has a nice way of getting around this problem.
It can be run as a standalone process that creates an indexed cache of all project files and symbols. It then can use/maintain this cache when a client sends didSave, didChange, didClose etc. requests and notifications.
Because it builds a file index/symbol cache as it's used, it gets faster with age. Since it does not have to ask for a clang parse on opening an already cached file, it's responsive immediately on project activation.
It's dependencies are a disadvantage because of size of distribution. To compile CCLS requires the clang includes and llvm dlls. CCLS must be at the same version level as clang/llvm.
For me, compiling CCLS on Windows required Msys2, clang, and some llvm dlls distributed with Msys2. All this because the Windows clang/llvm source is not distributed with all the needed clang headers. Sheesh :(
There must be some way around this since CodeLite does it. I need to explore how.
oBFusCATed:
In my test implementation of LSP plugin. The communication part wasn't a problem. The LSP server replied pretty fast for small test files.
p.s. A LSP client might feel slow, because it is using some modern json c++ library. All those are pretty slow, but of course they compile slowly. :)
Miguel Gimenez:
LSP does not use a full fledged JSON, may be a reduced version written from scratch give better results.
gh_origin:
Everyone seemed to favor CodeLite much? The only thing I know about it code completion is here >:(
https://forums.codelite.org/viewtopic.php?f=11&t=4653
https://forums.codelite.org/viewtopic.php?f=11&t=4611
CodeBlocks' code completion is not good but works (or partially works, I also annoyed by it much). But it served the needs of me and my students well enough. If I want an IDE that has code completion really works, I would download Visual Studio Community. The only downside of that is that thing is too bloated for the computers on our school to run it smoothly >:(
Please don't follow CodeLite. CodeLite starting utilizing LSP, then today they make LSP the default method of code completion. And who knows someday they would rely completely on LSP and abandon their own code completion?
At least, make the LSP plugin not installed or enabled by default and let the users to install or turn it on as a fallback option when the standard CodeBlocks' code completion doesn't suite their needs.
oBFusCATed:
--- Quote from: gh_origin on December 12, 2020, 04:04:59 pm ---Please don't follow CodeLite. CodeLite starting utilizing LSP, then today they make LSP the default method of code completion. And who knows someday they would rely completely on LSP and abandon their own code completion?
At least, make the LSP plugin not installed or enabled by default and let the users to install or turn it on as a fallback option when the standard CodeBlocks' code completion doesn't suite their needs.
--- End quote ---
Unfortunately LSP is the path forward for CC in codeblocks.
I see no one actively maintaining the parser and it is lagging a lot at the moment.
Also given the features introduced in C++ with every new standard - it would be pretty hard task to keep it updated given our resources.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version