Using cb svn12990 (win7 64). Code completion does not work well. In my project I have a Header declaring some functions scoped under ed::esd.
Eg. in ed_esd.h
namespace ed::esd
{
void myFunc(int a, float b);
}
In my source cpp I have
include "ed_esd.h"
using namespace ed::esd;
- If I start typing myFunc( ... I get no completion (evidently the cc is not smart enough to detect the using namespace directive ?)
- This is imho a bug: if I start typing ed::myFunc( ...... I get the popup window with the hints. But not so if I type ed::esd::myFunc(.... but myFunc() is scoped as ed::esd, not as ed:: !!
Thanks
Nobody ?
Hi, currently, we have two code completion plugin in codeblocks.
The first one is called code completion plugin, I think you are using this. The second one is called clangd_client plugin.
I'm not sure, can you try the nightly build version of C::B, and enable the second one. This one is using the clangd as the LSP(language server), I think it will solve your problem.
Hi, I updated to the latest NB but I have no luck enabling the clang client plugin. I tried 10 times in vain, saved, closed CB, reopened... when I try to enable it I get a banner saying Clang client is inactive, to run clangd client restart codeblocks after setting a compiler and disabling the code completion plugin. I have disabled it of course but I am not going to mess up with my compiler settings because I risk to ruin my projects and compiler setup. What can I do to enable this plugin ? To me it sounds very strange that enabling it must be so difficult... giving up sorry
Anyway, I think the issue I reported with the default code completion plugin is serious enoigh and should be fixed
I think is a very old issue of the plugin. Try to use in the .cpp file something like
namespace foo
{
....
}
instad of using
using namespace foo
Anyway in my opinion the new clangd_client is excellent and is improving day after day. Have you installed the reuquired clangd package? The NB alone is not enough.
Please verify whether in Setting-Editor-Clangd_client and in the tab "c/c++ parser" the "executable to use" is correctly set. Try the autodetect button.
Hope this helps
I'm going to close this bug report because it's unlikely anyone dares to attempt fixing the legacy CodeCompletion plugin and so many fixes have been applied to the newer Clangd_client plugin that Elena should really try it out to solve the reported problem.
There is no problem for me. I'd be glad to use the clangd client instead but I encountered some difficulty with activating it and I didn't get much support on the forum, nor I can invest too much time for it now (otherwise I should suspend all my ongoing coding works aarghh) That was just to say I'm far from using outdated stuff at any cost and for no reason ;)
Sorry, I didn't mean to leave you hanging when you're have problems activating Clangd_client.
Here's a url showing how to install it.
https://wiki.codeblocks.org/index.php/CB_Clangd_Client
Please post a reply to the forum section
https://forums.codeblocks.org/index.php/topic,24357.0.html
Saying that you have a problem activating Clangd_client.
Tell us
1) Your operation system
2) The version of CB you're using
3) The problem you had when attempting to activate Clangd_client
I will be happy to help and give explicit steps once I know your environment.
Thanks for your patience.
pecan