User forums > Help

Code completion doesn't show up for some wxWidgets

<< < (2/2)

Pecan:

--- Quote from: Dibo on March 08, 2025, 12:36:55 pm ---I have prepared and attached simple demo. Created it from wxwidgets template project. You must change compiler settings, linker settings and search directories in debug mode to your own because I have wxwidgets installation in custom home directory. Problematic variables are: mListCtrlSources and thisNOTwork (I already started they with -> )

--- End quote ---

Thanks for the example code.
I have verified that the legacy CodeCompletion plugin will not produce completion choices for the code you indicated.

--- Code: ---    wxStaticBoxSizer * staticBoxSource = new wxStaticBoxSizer(wxHORIZONTAL, this, "Source dirs && files");
    wxListCtrl* mListCtrlSources = new wxListCtrl(this, -1);
    mListCtrlSources->

... and others ..

--- End code ---

In order to produce completions for your code, you will have to use the Clangd_client plugin instead.

Info:
The instuctions for using the Clangd_client language server protocol (LSP):
https://wiki.codeblocks.org/index.php/CB_Clangd_Client

If clangd is already installed on your Linux system, you need only disable the CodeCompletion plugin, enable the Clangd_client plugin, and restart CodeBlocks.

Go to the Settings/Clangd_client/ and enter the address of your Clang executable.


Dibo:
Hmm, but in plugins manager I don't have anything like clangd (see attachment). When I click on "Install new" I have file browser filtered by .cbplugin, not .so or executable. Wiki from your link doesn't say anything about cbplugin installation, it expects that clangd plugin already exists and anything what must be done is just enable it
And seems that I have it installed on my linux:

--- Code: ---locate clangd

/usr/bin/clangd
/usr/bin/clangd-18
/usr/lib/llvm-18/bin/clangd
--- End code ---

Edit: Note that I already have installed codeblocks, codeblocks-common and codeblocks-contrib packages

Pecan:
@ Dibo
What version of CodeBlocks are you running.

Did you build it yourself? If so, did you also build the any of the plugins in the Contrib workspace?

Dibo:
I have version 20.03+svn13046-0.3build2 from official Linux Mint repo, same version is contrib package

Pecan:

--- Quote from: Dibo on March 11, 2025, 03:32:08 pm ---I have version 20.03+svn13046-0.3build2 from official Linux Mint repo, same version is contrib package

--- End quote ---

Clangd_client plugin was not written to support version 20.03.
However, there are some Nightly builds that contain Clangd_client.
You might have a look at:
https://forums.codeblocks.org/index.php/topic,25970.msg176905.html#msg176905

There are two messages there. The one following the Nightly announcement contains:

--- Quote from: Xaviou on February 23, 2025, 01:01:58 am ---Hi.

32 bits version for Windows can also be can be downloaded from my website.

Debian Bookworm and Bullseye (32 and 64 bits) can be installed from my repo
The corresponding unsigned deb files can also be downloaded from the website page linked above.

Ubuntu-22.04, 24.04 versions can be installed from my ppa

Regards
Xav'

--- End quote ---

Maybe there is a way to use CodeBlocks from Xaviou's ppa.
I do not know how to do that. I'm not a knowledgeable Linux user.

Navigation

[0] Message Index

[*] Previous page

Go to full version