Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Code completion using LSP and clangd

<< < (21/92) > >>

gd_on:
I try to use clangd plugin. I use Msys2 and the compiler installed in mingw64/bin, so following your recommandations I have installed with pacman mingw-w64-x86_64-clang-tools-extra.
clangd is installed in mingw64/bin normally. After the first installation my clang64 folder contains only empty folders (\bin, ...). I don't use clang compiler, so that's normal. Like that, clangd plugin works as it should.
Nevertheless, after some time and a few pacman updates, I see several warnings during the update process, and clang64 folders are progressively filled with different files. May be the pacman update process is not well adapted to the installation of clangd inside mingw64 folders ! Dependencies may be ? And all those new files are probably not necessary for clangd client plugin.
My question is : what is striclly necessary for clangd client usage : clangd.exe + a few dlls (used by clangd.exe or may be a static version of clangd.exe), sure, but is there anything else, other dll, other executables ? could we remove the update process to avoid unnecessary filling of clang64 folder ?

ollydbg:

--- Quote ---Nevertheless, after some time and a few pacman updates, I see several warnings during the update process, and clang64 folders are progressively filled with different files. May be the pacman update process is not well adapted to the installation of clangd inside mingw64 folders ! Dependencies may be ? And all those new files are probably not necessary for clangd client plugin.
--- End quote ---

I have run the pacman updates today, and I didn't see such issue. I have clang64 folder, and I see there are some sub folders in this folder, but all are empty.



--- Quote ---My question is : what is striclly necessary for clangd client usage : clangd.exe + a few dlls (used by clangd.exe or may be a static version of clangd.exe), sure, but is there anything else, other dll, other executables ? could we remove the update process to avoid unnecessary filling of clang64 folder ?
--- End quote ---

I guess your msys2 has some issue. You can try to remove the files/packages in clang64 folder, I have did that before, use such command:


--- Code: ---pacman -R $(pacman -Qsq 'mingw-w64-clang-x86_64*')
--- End code ---

gd_on:
I have already tried to uninstall all my msys2, using the pacman -R option and even delete everything manually (C:\msys64), reinstalling msys2 (in C:\msys64), reinstalling C:\msys64\mingw64 and only clang64 extra tools in mingw64. Everything happens correctly and clangd plugin works, but after a while and several upddates with pacman during a few weeks, my C:\msys64\clang64 folder is progressively filled with different things as python, sqlite, p11-kit, ... etc. clangd.exe is still in C:\msys64\mingw64\bin.
So, what could be wrong, I don't know.

PS:
I have tried your command line. Though I was sure everything was suppressed from a previous standard clang try, many packages have been found. Obviously, there was things in the cache that was still there, but not installed as far as I understand. May be that was my problem. Wait and see in 2 or 3 weeks !

Pecan:
@Ollydbg


--- Quote from: ollydbg on March 20, 2022, 04:02:06 am ---Is it possible to enable macro expansion for the llvm master path?

--- Code: ---$(TARGET_COMPILER_DIR)bin\clangd.exe

--- End code ---

--- End quote ---

Yes, I'll do that. Good suggestion.

ollydbg:
I have an issue to use the "find declaration" tool.
Find the declaration of a symbol in a header file, but the header file is not belong to the cbp project.


I have a project, say, it has a file named a.cpp. In this file, I have some definition like


--- Code: ---TypeA a;
--- End code ---

And the TypeA is defined in a header file (e.g. TypeA.h), which is not belong to the cbp project, say, it could be in a include search path.

Now, when I use the "find declaration of TypeA", I see LSP can correctly jump to the TypeA.h.

Now, say the TypeA is actually a typedef, such as:


--- Code: ---typedef TypeB TypeA;

--- End code ---

Now, when I right click on the TypeB symbol, and "find declaration of TypeB", I see the clangd_client plugin will jump a messagebox, it said:


--- Quote ---[Window Title]
LSP OnGotoDeclaration

[Content]
The editor's file does not have an associated project.
Perhaps add the file to a project ?

[OK]
--- End quote ---

This looks wrong, I mean if the a.cpp get parsed by clangd, it should understand where TypeB is declared. So, is this a bug? I think adding the TypeA.h to my cbp project is not the correct way to solve this issue.

Any ideas?

Thanks.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version