User forums > Help

clangd code completion

<< < (5/5)

Pecan:

--- Quote from: juxin5 on October 13, 2024, 10:07:46 am ---thx for the reply.

So I unzip the 3 .7z file (CB_20240807_rev13539_win64, wxmsw32u_gcc_cb_wx325_2D_gcc1410-mingw64, Mingw64dlls14.1.0)
 into the same folder and start codeblocks.exe in it.

--- End quote ---

So I guess you start Codeblocks by just typing "Codeblocks" or "Codeblocks.exe".

Good, so from now on type "codeblocks /d" to turn on the codeblocks debugger tab at the bottom.

Then go to Settings/Editor/clangd_client/ C/C++ parser(adv.)
Enable check boxes entitled "Enable plugin info logging" and "Enable plugin Debug logging".

Close CodeBlocks and restart it with the /d parameter to turn on those logs.

Load a project you'd normally load for editing.
Wait until the "Code::Blocks Debug" tab at the bottom stops scrolling information.

Right click on the "Code::Blocks Debug" tab at the bottom and choose "Copy contents to clipboard".

Now choose from the main menu, File/New/EmptyFile and say no if asked to add the file to the project.

Select and move the mouse into that empty file and paste into it (ctrl-z key). You should see the log now pasted into that empty editor file.

Save that file to %tmp%/Juxin5ClangdLog.txt, (or any folder that's convenient to you). %tmp% is the same as your C:\Temp  or C:/tmp folder.

Zip it up so that you can attach it to a reply to this message.

Thanks for your patients.
And forgive me if I insult your intelligence.

juxin5:

--- Quote from: Pecan on October 13, 2024, 06:11:00 pm ---
So I guess you start Codeblocks by just typing "Codeblocks" or "Codeblocks.exe".

Good, so from now on type "codeblocks /d" to turn on the codeblocks debugger tab at the bottom.

Then go to Settings/Editor/clangd_client/ C/C++ parser(adv.)
Enable check boxes entitled "Enable plugin info logging" and "Enable plugin Debug logging".

Close CodeBlocks and restart it with the /d parameter to turn on those logs.

Load a project you'd normally load for editing.
Wait until the "Code::Blocks Debug" tab at the bottom stops scrolling information.
...



--- End quote ---

thx for the reply.

I think I found where the problem is. A project needed to be loaded for the clangd client to work properly. When only open the .cpp file, it will give the following error:


--- Code: ---GetLSPclient: param pProject is missing

--- End code ---

attached file is the log when loading single file.

I'm not sure if it's intended behavior but either way it's not convenient for me because sometimes I just want to edit a single file. Also classic code completion would work fine in such scenario.

juxin5:
I forgot to say that clangd does work fine when I load a project, meaning the code completion works fine, while also has the issue user "wtfisgoingoff" mentioned.

Pecan:

--- Quote from: juxin5 on October 14, 2024, 08:23:27 am ---I forgot to say that clangd does work fine when I load a project, meaning the code completion works fine, while also has the issue user "wtfisgoingoff" mentioned.

--- End quote ---

This guy has got to be a troll. He has wasted a lot of good peoples time.

He said in the beginning that Clangd_client didn't work, now he says it worked fine all along.


--- Quote from: juxin5 on October 11, 2024, 07:38:40 am ---hello, first time here.
I followed the wiki page to enable the Clangd plugin, but the code completion is not working.
Is there something I am missing?
I'm using build 13539 on windows.

--- End quote ---

juxin5:

--- Quote from: Pecan on October 14, 2024, 04:33:22 pm ---
He said in the beginning that Clangd_client didn't work, now he says it worked fine all along.

--- End quote ---

have you really read what I said? It does not work when I open files without a project.

You really think it works fine when it literally works worse than the classic code completion in this scenario?

Navigation

[0] Message Index

[*] Previous page

Go to full version