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

Code completion using LSP and clangd

<< < (7/92) > >>

AndrewCot:
Repackaged plugin is available from the following page:
https://sourceforge.net/projects/cb-clangd-client/files/Plugin_Install_Package/Windows_x64/0.2.6%20-%2013JAN2022/

Miguel Gimenez:
I have updated the Wiki with your suggestions

ollydbg:

--- Quote from: AndrewCot on January 13, 2022, 07:58:01 am ---@ollydbg In the plugin manager you specify the zip file instead of a .cbplugin and it works

--- End quote ---

I have rename the .zip file to .cbplugin, because I can't select a zip file in the plugin manager to install the new plugin(NO zip files will be shown in the file select dialog).


In the Windows-LLVM-ClangD-Install-Readme.txt


--- Quote ---MSYS2 Compiler - MinGW64
-------------------------
a) Install MSYS 2 clang packages via the msys2.exe bash shell:
    pacman -S mingw-w64-clang-x86_64-toolchain

--- End quote ---

Run this command, I got this:


--- Code: ---# pacman -S mingw-w64-clang-x86_64-toolchain
:: There are 22 members in group mingw-w64-clang-x86_64-toolchain:
:: Repository clang64
   1) mingw-w64-clang-x86_64-clang  2) mingw-w64-clang-x86_64-clang-analyzer
   3) mingw-w64-clang-x86_64-clang-tools-extra
   4) mingw-w64-clang-x86_64-compiler-rt  5) mingw-w64-clang-x86_64-crt-git
   6) mingw-w64-clang-x86_64-headers-git  7) mingw-w64-clang-x86_64-libc++
   8) mingw-w64-clang-x86_64-libc++abi  9) mingw-w64-clang-x86_64-libmangle-git
   10) mingw-w64-clang-x86_64-libunwind
   11) mingw-w64-clang-x86_64-libwinpthread-git  12) mingw-w64-clang-x86_64-lld
   13) mingw-w64-clang-x86_64-lldb  14) mingw-w64-clang-x86_64-llvm
   15) mingw-w64-clang-x86_64-make  16) mingw-w64-clang-x86_64-mlir
   17) mingw-w64-clang-x86_64-openmp  18) mingw-w64-clang-x86_64-pkgconf
   19) mingw-w64-clang-x86_64-polly  20) mingw-w64-clang-x86_64-tools-git
   21) mingw-w64-clang-x86_64-winpthreads-git
   22) mingw-w64-clang-x86_64-winstorecompat-git

Enter a selection (default=all):


--- End code ---

Do I need to only select the option 1?
Or do I need to use the all?


EDIT:

clangd is contained in mingw-w64-clang-x86_64-clang-tools-extra, so normally we should use option 3.

ollydbg:
I also see the "LSP_DidOpen() error: [json.exception.type_error.316] invalid UTF-8 byte at index 1019: 0xB5" message box.

A quick search gives this related discussion:

[json.exception.type_error.316] invalid UTF-8 byte at index 1: 0xC3 Issue #1383 nlohmann/json

Invalid UTF-8 byte at index 1: 0x65 Issue #1831 nlohmann/json

I'm not sure how we pass the source file to clangd, maybe the file is not encoded in UTF8, but you pass the file to clangd as a UTF8 format file, and in this case, clangd return a string which is not encoded in UTF8.  And finally we get the exception message box.

BlueHazzard:
What is the encoding of your source file?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version