User forums > Help
clangd code completion
Pecan:
--- Quote from: juxin5 on October 12, 2024, 04:46:13 pm ---
--- Quote from: Michael Agarkov on October 12, 2024, 04:21:15 pm ---I think your problem might be the same as in https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412
--- End quote ---
thx for the reply.
so my clangd.exe is in "C:\Program Files\LLVM\bin\clangd.exe"
is that the problem? how do I fix it, like how do i get the file in the right path?
--- End quote ---
What have you got set at MainMenu/settings/Editor/Clangd_client/C/C++ parser (tab) as the path to clangd.exe ?
juxin5:
--- Quote from: Pecan on October 12, 2024, 11:49:07 pm ---
--- Quote from: juxin5 on October 12, 2024, 04:46:13 pm ---
--- Quote from: Michael Agarkov on October 12, 2024, 04:21:15 pm ---I think your problem might be the same as in https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412
--- End quote ---
thx for the reply.
so my clangd.exe is in "C:\Program Files\LLVM\bin\clangd.exe"
is that the problem? how do I fix it, like how do i get the file in the right path?
--- End quote ---
What have you got set at MainMenu/settings/Editor/Clangd_client/C/C++ parser (tab) as the path to clangd.exe ?
--- End quote ---
thx for the reply.
it's "C:\Program Files\LLVM\bin\clangd.exe".
--- Quote from: Michael Agarkov on October 12, 2024, 05:21:12 pm ---AFAIK you need to use MSYS2 and install GCC and Clang together in the same environment and use "mingw-w64-clang-x86_64-clang-tools-extra" for it to work properly.
--- End quote ---
that is a method listed on the wiki. And so is the LLVM one. They are both supposed to work right...?
Pecan:
--- Quote from: juxin5 on October 13, 2024, 03:15:27 am ---
so my clangd.exe is in "C:\Program Files\LLVM\bin\clangd.exe"
thx for the reply.
it's "C:\Program Files\LLVM\bin\clangd.exe".
that is a method listed on the wiki. And so is the LLVM one. They are both supposed to work right...?
--- End quote ---
I'm going to guess the problem is caused by the space in "Program Files".
Clangd is essentially a Linux program which cannot handle spaces in file names.
We now need to determine if that is actually the problem.
First: Tell us how you start CodeBlocks so that we can then tell you how to turn the clangd_client logs on.
Then we can read the log to see what Clangd_client thinks the problem is.
Thanks for your patients.
wtfisgoingoff:
--- Quote from: Pecan on October 13, 2024, 06:29:40 am ---
--- Quote from: juxin5 on October 13, 2024, 03:15:27 am ---
so my clangd.exe is in "C:\Program Files\LLVM\bin\clangd.exe"
thx for the reply.
it's "C:\Program Files\LLVM\bin\clangd.exe".
that is a method listed on the wiki. And so is the LLVM one. They are both supposed to work right...?
--- End quote ---
I'm going to guess the problem is caused by the space in "Program Files".
Clangd is essentially a Linux program which cannot handle spaces in file names.
We now need to determine if that is actually the problem.
First: Tell us how you start CodeBlocks so that we can then tell you how to turn the clangd_client logs on.
Then we can read the log to see what Clangd_client thinks the problem is.
Thanks for your patients.
--- End quote ---
Does clangd code completion list those keywords candidates ? [ for while switch ... ]
The classic code completion dose. When I using classic code completion, after I typing whi , the whole while will be listed . This happens to [for switch .. ] too.
But when I using clang_client, I have to type whole switch [for while] by myself.
default compiler: GNU GCC Compiler (msys2/ucrt64/bin/)
my projects' path has no spaces
Specify clangd executable to use: msys2/ucrt64/bin/cland.exe
gcc -v: gcc version 14.2.0 (Rev1, Built by MSYS2 project)
clang -version: 18.1.8
my settings [attachments]
juxin5:
--- Quote from: Pecan on October 13, 2024, 06:29:40 am ---
I'm going to guess the problem is caused by the space in "Program Files".
Clangd is essentially a Linux program which cannot handle spaces in file names.
We now need to determine if that is actually the problem.
First: Tell us how you start CodeBlocks so that we can then tell you how to turn the clangd_client logs on.
Then we can read the log to see what Clangd_client thinks the problem is.
Thanks for your patients.
--- End quote ---
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.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version