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

Code completion using LSP and clangd

<< < (5/92) > >>

sodev:

--- Quote from: Pecan on January 07, 2022, 08:06:13 am ---Does anyone know of a good UTF8 char validator.
Clangd is handing back (occasionally) a 3 byte utf8 char.
It's blowing nlohmann json parser out of the water.

I'd like to scan the clangd stdout responses for invalid UTF8.
They're weird. \xE2\x80\xA6 right in the middle of an empty function() param area. Also that strange period half way up the middle of a char area. Like an item list indicator. \xE2\x80\xA2.

When, in the initialization, we tell clangd to use "Only UTF8", it's supposed to mean 8 bits only, not 24 bits. And evidently they don't know it, because they set the response length as if all chars are 8bit.

Thanks

--- End quote ---

I'm not sure if i fully understand what you have written, but it seems you are mixing some things. UTF8 is a variable length encoding, while each of its code units is 8 bit, a valid encoding can be comprised of 1 to 6 code units. Such a sequence gets decoded to a 32 bit code point, which i think you refer to as character. Both your mentioned sequences above are totally valid UTF8.

BlueHazzard:
i was curious what symbol it is:
https://www.compart.com/en/unicode/U+2026

ps.: I can not post the symbol here, it seems the forum software is not utf8 conform :)

Pecan:
A clangd_client plugin cbPlugin package is available for the 31 December nightly at:
https://sourceforge.net/projects/cb-clangd-client/files/

Download the clangd_client.cbplugin file.

In CodeBlocks MainMenu=>plugins=>Manage plugin=> disable CodeCompletion .

Navigate to the downloaded file (clangd_client_plugin.zip) and unzip it to a temporary folder.
Copy the clangd_client.zip file to the CodeBlocks nightly ...\share\CodeBlocks\ folder.
Copy the clangd_client.dll file to the CodeBlocks nightly ...\share\Codeblocks\plugins\ folder
Restart the nightly CodeBlocks.

To uninstall, delete the above files from the CodeBlocks Nightly folders.

If you uninstall it using the "Manage plugins" menu , a crash may occur if a workspace is active.
Close the workspace first before uninstalling to avoid the crash.
We'll apply a fix for that soonest.

If you previously installed the clangd_client.cbplugin version, delete it with the commands:
 del %APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll
 del %APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip
The .cbplugin version became entirely too invasive.

Thanks to AndrewCot.

AndrewCot:
Due to incompatibilities between plugins built with the latest MSYS2 and the nightly releases that cause then plugin to not load (unless you update the Mingw64 DLL's) there is an update of the plugin available that has been built using Mingw64 8.1.0. This update works with the nightly builds and also locally build C::B built with MSYS2 at:
    https://sourceforge.net/projects/cb-clangd-client/files/

The install docs have been updated with a bunch of options for both the plugin and the clangd.exe.

ollydbg:

--- Quote from: AndrewCot on January 12, 2022, 06:52:25 am ---Due to incompatibilities between plugins built with the latest MSYS2 and the nightly releases that cause then plugin to not load (unless you update the Mingw64 DLL's) there is an update of the plugin available that has been built using Mingw64 8.1.0. This update works with the nightly builds and also locally build C::B built with MSYS2 at:
    https://sourceforge.net/projects/cb-clangd-client/files/

The install docs have been updated with a bunch of options for both the plugin and the clangd.exe.

--- End quote ---

There is a typo in the file: https://sourceforge.net/projects/cb-clangd-client/files/Plugin_Install_Package/Windows_x64/0.2.5%20-%2012JAN2022/Windows-LLVM-ClangD-Install-Readme.txt/download


--- Quote ---instructions below for the specific compiler you haev installed:

--- End quote ---



Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version