<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.codeblocks.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pecan</id>
	<title>Code::Blocks - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.codeblocks.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pecan"/>
	<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php/Special:Contributions/Pecan"/>
	<updated>2026-05-23T00:31:09Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.0</generator>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9825</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9825"/>
		<updated>2024-11-15T18:02:40Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Windows: Compiler Clangd/LLVM Package Installer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: [https://svn.code.sf.net/p/codeblocks/code/trunk/src/plugins/contrib/clangd_client https://sourceforge.net/projects/cb-clangd-client/]&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
clangd understands your C++ code and adds smart features to your editor&lt;br /&gt;
&lt;br /&gt;
* code completion&lt;br /&gt;
* compile errors&lt;br /&gt;
* go-to-definition&lt;br /&gt;
* go-to-implementation&lt;br /&gt;
* find references&lt;br /&gt;
&lt;br /&gt;
and more.&lt;br /&gt;
&lt;br /&gt;
clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
* call tips&lt;br /&gt;
* function definitions&lt;br /&gt;
* parameter definitions&lt;br /&gt;
* previous and next function positioning&lt;br /&gt;
* symbols browser&lt;br /&gt;
* go-to-file&lt;br /&gt;
* go-to-function&lt;br /&gt;
* symbol renaming&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE: A CodeBlocks '''project is required''' for Clangd_client.&lt;br /&gt;
&lt;br /&gt;
Clangd_client does not work with non-project translation units.&lt;br /&gt;
&lt;br /&gt;
A project provides the necessary resources to interface between the Editor and the Clangd server.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
&lt;br /&gt;
See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
&lt;br /&gt;
or '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
After a successful clangd executable install, perform the following:&amp;lt;blockquote&amp;gt;Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
&lt;br /&gt;
* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
&lt;br /&gt;
'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
Tell CodeBlocks (or verify) where the clangd executable resides:&lt;br /&gt;
&lt;br /&gt;
* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the clangd executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
Note: Clangd_client is now included as a contrib plugin within the &amp;quot;Nightly&amp;quot; builds.&lt;br /&gt;
&lt;br /&gt;
Using a &amp;quot;Nightly&amp;quot; build is the easiest way to update to clangd_client.&lt;br /&gt;
&lt;br /&gt;
Simply install the &amp;quot;Nightly&amp;quot; and configure as specified below.&lt;br /&gt;
&lt;br /&gt;
See the Nightly builds at https://forums.codeblocks.org/index.php/board,20.0.html&lt;br /&gt;
&lt;br /&gt;
# Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#:'''Windows Clangd executable install process'''&lt;br /&gt;
# Disable the Code completion plugin as follows:&lt;br /&gt;
#: a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#: b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#:: i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title&lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
# Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#: a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
# Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#: a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
#: Some examples of this could be:&lt;br /&gt;
#:* C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
#:* C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
#:* C:\msys64\mingw64\bin\clangd.exe&lt;br /&gt;
#:* C:\msys64\mingw32\bin\clangd.exe&lt;br /&gt;
#:* C:\LLVM\bin\clangd.exe&lt;br /&gt;
#:* C:\comilers\clang\clangd.exe&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
# Exit Code::Blocks!&lt;br /&gt;
# If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#: a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
# If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#: a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
# If you want to reuse older code completion remember to re-enable the plugin and restart CodeBlocks.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
The process for the three options above are detailed below.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
# Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#: Github LLVM download page: https://github.com/llvm/llvm-project/releases/tag/llvmorg-18.1.8&lt;br /&gt;
#: As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:* LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:* LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#: where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
'''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
 There are two main options to install the clangd.exe as follows:&lt;br /&gt;
 1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
 tools using one of the following packages:&lt;br /&gt;
 +------------------------------------------+------------------------+&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;|               Package                    |&amp;lt;/nowiki&amp;gt; Clangd executable      |&lt;br /&gt;
 +------------------------------------------+------------------------+&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;| mingw-w64-clang-x86_64-clang-tools-extra |&amp;lt;/nowiki&amp;gt; clang64/bin/clangd.exe |&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;| mingw-w64-x86_64-clang-tools-extra       |&amp;lt;/nowiki&amp;gt; mingw64/bin/clangd.exe |&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;| mingw-w64-ucrt-x86_64-clang-tools-extra  |&amp;lt;/nowiki&amp;gt; ucrt64/bin/clangd.exe  |&lt;br /&gt;
 +------------------------------------------+------------------------+&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         To intall the package do the following:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;          a) Open the msys2.exe bash shell &lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;          b) Run the following command:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                 pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;      &amp;lt;nowiki&amp;gt;'''&amp;lt;/nowiki&amp;gt;OR&amp;lt;nowiki&amp;gt;'''&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;      2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;          a) Open the msys2.exe bash shell &lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;          b) Run the following command:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                 pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
'''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;'''[https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412 Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables]'''&lt;br /&gt;
&lt;br /&gt;
'''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''), you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe. If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''), you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;. I found that I just make a big mistake. That is: I used the gcc toolchain from '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''. The result is I got a lot of LSP diagnostics messages and errors. Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
&lt;br /&gt;
'''A note from eckard_klotz:'''&lt;br /&gt;
&lt;br /&gt;
I faced the same issue. But I'm using the build-suite under in the folder &amp;quot;msys64\'''ucrt64'''\bin&amp;quot; and thus, I had to install package '''mingw-w64-ucrt-x86_64-clang-tools-extra''' for adding the clangd tool to my compiler-suite.&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
NOTE: Clangd_client plugin requires a clangd executable version 13 or greater.&lt;br /&gt;
&lt;br /&gt;
Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
&lt;br /&gt;
If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
&lt;br /&gt;
See https://clangd.llvm.org/installation.html&amp;lt;blockquote&amp;gt;Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
&lt;br /&gt;
Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
&lt;br /&gt;
As of 2022/11/16, this suggest that clangd version 10 will be installed.&amp;lt;/blockquote&amp;gt;If the clangd version shows less than version 13, you'll have to install a specific version as follows:&amp;lt;blockquote&amp;gt;Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
&lt;br /&gt;
'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&amp;lt;/blockquote&amp;gt;This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
&lt;br /&gt;
You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
&lt;br /&gt;
[https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client] '''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
If you prefer to install the entire LLVM/Clang package, for convenience, there is an automatic installation script available that installs LLVM for you.&lt;br /&gt;
&lt;br /&gt;
To install the latest stable version: see [https://apt.llvm.org/] '''Automatic installation script'''.&lt;br /&gt;
&lt;br /&gt;
Note that you can specify the version number with this script.&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9820</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9820"/>
		<updated>2024-10-15T15:34:22Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* What is Clangd */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: [https://svn.code.sf.net/p/codeblocks/code/trunk/src/plugins/contrib/clangd_client https://sourceforge.net/projects/cb-clangd-client/]&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
clangd understands your C++ code and adds smart features to your editor&lt;br /&gt;
&lt;br /&gt;
* code completion&lt;br /&gt;
* compile errors&lt;br /&gt;
* go-to-definition&lt;br /&gt;
* go-to-implementation&lt;br /&gt;
* find references&lt;br /&gt;
&lt;br /&gt;
and more.&lt;br /&gt;
&lt;br /&gt;
clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
* call tips&lt;br /&gt;
* function definitions&lt;br /&gt;
* parameter definitions&lt;br /&gt;
* previous and next function positioning&lt;br /&gt;
* symbols browser&lt;br /&gt;
* go-to-file&lt;br /&gt;
* go-to-function&lt;br /&gt;
* symbol renaming&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE: A CodeBlocks '''project is required''' for Clangd_client.&lt;br /&gt;
&lt;br /&gt;
Clangd_client does not work with non-project translation units.&lt;br /&gt;
&lt;br /&gt;
A project provides the necessary resources to interface between the Editor and the Clangd server.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
&lt;br /&gt;
See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
&lt;br /&gt;
or '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
After a successful clangd executable install, perform the following:&amp;lt;blockquote&amp;gt;Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
&lt;br /&gt;
* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
&lt;br /&gt;
'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
Tell CodeBlocks (or verify) where the clangd executable resides:&lt;br /&gt;
&lt;br /&gt;
* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the clangd executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
Note: Clangd_client is now included as a contrib plugin within the &amp;quot;Nightly&amp;quot; builds.&lt;br /&gt;
&lt;br /&gt;
Using a &amp;quot;Nightly&amp;quot; build is the easiest way to update to clangd_client.&lt;br /&gt;
&lt;br /&gt;
Simply install the &amp;quot;Nightly&amp;quot; and configure as specified below.&lt;br /&gt;
&lt;br /&gt;
See the Nightly builds at https://forums.codeblocks.org/index.php/board,20.0.html&lt;br /&gt;
&lt;br /&gt;
# Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#:'''Windows Clangd executable install process'''&lt;br /&gt;
# Disable the Code completion plugin as follows:&lt;br /&gt;
#: a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#: b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#:: i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title&lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
# Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#: a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
# Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#: a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
#: Some examples of this could be:&lt;br /&gt;
#:* C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
#:* C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
#:* C:\msys64\mingw64\bin\clangd.exe&lt;br /&gt;
#:* C:\msys64\mingw32\bin\clangd.exe&lt;br /&gt;
#:* C:\LLVM\bin\clangd.exe&lt;br /&gt;
#:* C:\comilers\clang\clangd.exe&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
# Exit Code::Blocks!&lt;br /&gt;
# If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#: a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
# If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#: a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
# If you want to reuse older code completion remember to re-enable the plugin and restart CodeBlocks.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
The process for the three options above are detailed below.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
# Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#: Github LLVM download page: https://github.com/llvm/llvm-project/releases/tag/llvmorg-18.1.8&lt;br /&gt;
#: As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:* LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:* LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#: where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
'''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
 There are two main options to install the clangd.exe as follows:&lt;br /&gt;
 1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
 tools using one of the following packages:&lt;br /&gt;
 +------------------------------------------+------------------------+&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;|               Package                    |&amp;lt;/nowiki&amp;gt; Clangd executable      |&lt;br /&gt;
 +------------------------------------------+------------------------+&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;| mingw-w64-clang-x86_64-clang-tools-extra |&amp;lt;/nowiki&amp;gt; clang64/bin/clangd.exe |&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;| mingw-w64-x86_64-clang-tools-extra       |&amp;lt;/nowiki&amp;gt; mingw64/bin/clangd.exe |&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;| mingw-w64-ucrt-x86_64-clang-tools-extra  |&amp;lt;/nowiki&amp;gt; ucrt64/bin/clangd.exe  |&lt;br /&gt;
 +------------------------------------------+------------------------+&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         To intall the package do the following:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;          a) Open the msys2.exe bash shell &lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;          b) Run the following command:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                 pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;      &amp;lt;nowiki&amp;gt;'''&amp;lt;/nowiki&amp;gt;OR&amp;lt;nowiki&amp;gt;'''&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;      2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;          a) Open the msys2.exe bash shell &lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;          b) Run the following command:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                 pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
'''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;'''[https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412 Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables]'''&lt;br /&gt;
&lt;br /&gt;
'''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''), you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe. If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''), you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;. I found that I just make a big mistake. That is: I used the gcc toolchain from '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''. The result is I got a lot of LSP diagnostics messages and errors. Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
NOTE: Clangd_client plugin requires a clangd executable version 13 or greater.&lt;br /&gt;
&lt;br /&gt;
Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
&lt;br /&gt;
If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
&lt;br /&gt;
See https://clangd.llvm.org/installation.html&amp;lt;blockquote&amp;gt;Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
&lt;br /&gt;
Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
&lt;br /&gt;
As of 2022/11/16, this suggest that clangd version 10 will be installed.&amp;lt;/blockquote&amp;gt;If the clangd version shows less than version 13, you'll have to install a specific version as follows:&amp;lt;blockquote&amp;gt;Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
&lt;br /&gt;
'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&amp;lt;/blockquote&amp;gt;This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
&lt;br /&gt;
You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
&lt;br /&gt;
[https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client] '''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
If you prefer to install the entire LLVM/Clang package, for convenience, there is an automatic installation script available that installs LLVM for you.&lt;br /&gt;
&lt;br /&gt;
To install the latest stable version: see [https://apt.llvm.org/] '''Automatic installation script'''.&lt;br /&gt;
&lt;br /&gt;
Note that you can specify the version number with this script.&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9819</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9819"/>
		<updated>2024-10-15T15:32:52Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* What is Clangd */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: [https://svn.code.sf.net/p/codeblocks/code/trunk/src/plugins/contrib/clangd_client https://sourceforge.net/projects/cb-clangd-client/]&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
clangd understands your C++ code and adds smart features to your editor&lt;br /&gt;
&lt;br /&gt;
* code completion&lt;br /&gt;
* compile errors&lt;br /&gt;
* go-to-definition&lt;br /&gt;
* go-to-implementation&lt;br /&gt;
* find references&lt;br /&gt;
&lt;br /&gt;
and more.&lt;br /&gt;
&lt;br /&gt;
clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
* call tips&lt;br /&gt;
* function definitions&lt;br /&gt;
* parameter definitions&lt;br /&gt;
* previous and next function positioning&lt;br /&gt;
* symbols browser&lt;br /&gt;
* go-to-file&lt;br /&gt;
* go-to-function&lt;br /&gt;
* symbol renaming&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE: A CodeBlocks project is required for Clangd_client.&lt;br /&gt;
&lt;br /&gt;
Clangd_client does not work with non-project translation units.&lt;br /&gt;
&lt;br /&gt;
A project provides the necessary resources to interface between the Editor and the Clangd server.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
&lt;br /&gt;
See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
&lt;br /&gt;
or '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
After a successful clangd executable install, perform the following:&amp;lt;blockquote&amp;gt;Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
&lt;br /&gt;
* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
&lt;br /&gt;
'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
Tell CodeBlocks (or verify) where the clangd executable resides:&lt;br /&gt;
&lt;br /&gt;
* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the clangd executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
Note: Clangd_client is now included as a contrib plugin within the &amp;quot;Nightly&amp;quot; builds.&lt;br /&gt;
&lt;br /&gt;
Using a &amp;quot;Nightly&amp;quot; build is the easiest way to update to clangd_client.&lt;br /&gt;
&lt;br /&gt;
Simply install the &amp;quot;Nightly&amp;quot; and configure as specified below.&lt;br /&gt;
&lt;br /&gt;
See the Nightly builds at https://forums.codeblocks.org/index.php/board,20.0.html&lt;br /&gt;
&lt;br /&gt;
# Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#:'''Windows Clangd executable install process'''&lt;br /&gt;
# Disable the Code completion plugin as follows:&lt;br /&gt;
#: a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#: b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#:: i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title&lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
# Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#: a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
# Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#: a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
#: Some examples of this could be:&lt;br /&gt;
#:* C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
#:* C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
#:* C:\msys64\mingw64\bin\clangd.exe&lt;br /&gt;
#:* C:\msys64\mingw32\bin\clangd.exe&lt;br /&gt;
#:* C:\LLVM\bin\clangd.exe&lt;br /&gt;
#:* C:\comilers\clang\clangd.exe&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
# Exit Code::Blocks!&lt;br /&gt;
# If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#: a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
# If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#: a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
# If you want to reuse older code completion remember to re-enable the plugin and restart CodeBlocks.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
The process for the three options above are detailed below.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
# Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#: Github LLVM download page: https://github.com/llvm/llvm-project/releases/tag/llvmorg-18.1.8&lt;br /&gt;
#: As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:* LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:* LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#: where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
'''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
 There are two main options to install the clangd.exe as follows:&lt;br /&gt;
 1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
 tools using one of the following packages:&lt;br /&gt;
 +------------------------------------------+------------------------+&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;|               Package                    |&amp;lt;/nowiki&amp;gt; Clangd executable      |&lt;br /&gt;
 +------------------------------------------+------------------------+&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;| mingw-w64-clang-x86_64-clang-tools-extra |&amp;lt;/nowiki&amp;gt; clang64/bin/clangd.exe |&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;| mingw-w64-x86_64-clang-tools-extra       |&amp;lt;/nowiki&amp;gt; mingw64/bin/clangd.exe |&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;| mingw-w64-ucrt-x86_64-clang-tools-extra  |&amp;lt;/nowiki&amp;gt; ucrt64/bin/clangd.exe  |&lt;br /&gt;
 +------------------------------------------+------------------------+&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         To intall the package do the following:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;          a) Open the msys2.exe bash shell &lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;          b) Run the following command:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                 pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;      &amp;lt;nowiki&amp;gt;'''&amp;lt;/nowiki&amp;gt;OR&amp;lt;nowiki&amp;gt;'''&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;      2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;          a) Open the msys2.exe bash shell &lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;          b) Run the following command:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                 pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
'''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;'''[https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412 Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables]'''&lt;br /&gt;
&lt;br /&gt;
'''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''), you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe. If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''), you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;. I found that I just make a big mistake. That is: I used the gcc toolchain from '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''. The result is I got a lot of LSP diagnostics messages and errors. Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
NOTE: Clangd_client plugin requires a clangd executable version 13 or greater.&lt;br /&gt;
&lt;br /&gt;
Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
&lt;br /&gt;
If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
&lt;br /&gt;
See https://clangd.llvm.org/installation.html&amp;lt;blockquote&amp;gt;Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
&lt;br /&gt;
Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
&lt;br /&gt;
As of 2022/11/16, this suggest that clangd version 10 will be installed.&amp;lt;/blockquote&amp;gt;If the clangd version shows less than version 13, you'll have to install a specific version as follows:&amp;lt;blockquote&amp;gt;Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
&lt;br /&gt;
'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&amp;lt;/blockquote&amp;gt;This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
&lt;br /&gt;
You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
&lt;br /&gt;
[https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client] '''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
If you prefer to install the entire LLVM/Clang package, for convenience, there is an automatic installation script available that installs LLVM for you.&lt;br /&gt;
&lt;br /&gt;
To install the latest stable version: see [https://apt.llvm.org/] '''Automatic installation script'''.&lt;br /&gt;
&lt;br /&gt;
Note that you can specify the version number with this script.&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9818</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9818"/>
		<updated>2024-10-15T15:31:27Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* What is Clangd */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: [https://svn.code.sf.net/p/codeblocks/code/trunk/src/plugins/contrib/clangd_client https://sourceforge.net/projects/cb-clangd-client/]&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
clangd understands your C++ code and adds smart features to your editor&lt;br /&gt;
&lt;br /&gt;
* code completion&lt;br /&gt;
* compile errors&lt;br /&gt;
* go-to-definition&lt;br /&gt;
* go-to-implementation&lt;br /&gt;
* find references&lt;br /&gt;
&lt;br /&gt;
and more.&lt;br /&gt;
&lt;br /&gt;
clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
* call tips&lt;br /&gt;
* function definitions&lt;br /&gt;
* parameter definitions&lt;br /&gt;
* previous and next function positioning&lt;br /&gt;
* symbols browser&lt;br /&gt;
* go-to-file&lt;br /&gt;
* go-to-function&lt;br /&gt;
* symbol renaming&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE: A CodeBlocks project is required for Clangd_client.&lt;br /&gt;
&lt;br /&gt;
Clangd_client does not work with non-project translation units.&lt;br /&gt;
&lt;br /&gt;
A project provides the necessary resources to interface to the Editor and the Clangd server.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
&lt;br /&gt;
See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
&lt;br /&gt;
or '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
After a successful clangd executable install, perform the following:&amp;lt;blockquote&amp;gt;Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
&lt;br /&gt;
* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
&lt;br /&gt;
'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
Tell CodeBlocks (or verify) where the clangd executable resides:&lt;br /&gt;
&lt;br /&gt;
* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the clangd executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
Note: Clangd_client is now included as a contrib plugin within the &amp;quot;Nightly&amp;quot; builds.&lt;br /&gt;
&lt;br /&gt;
Using a &amp;quot;Nightly&amp;quot; build is the easiest way to update to clangd_client.&lt;br /&gt;
&lt;br /&gt;
Simply install the &amp;quot;Nightly&amp;quot; and configure as specified below.&lt;br /&gt;
&lt;br /&gt;
See the Nightly builds at https://forums.codeblocks.org/index.php/board,20.0.html&lt;br /&gt;
&lt;br /&gt;
# Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#:'''Windows Clangd executable install process'''&lt;br /&gt;
# Disable the Code completion plugin as follows:&lt;br /&gt;
#: a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#: b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#:: i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title&lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
# Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#: a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
# Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#: a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
#: Some examples of this could be:&lt;br /&gt;
#:* C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
#:* C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
#:* C:\msys64\mingw64\bin\clangd.exe&lt;br /&gt;
#:* C:\msys64\mingw32\bin\clangd.exe&lt;br /&gt;
#:* C:\LLVM\bin\clangd.exe&lt;br /&gt;
#:* C:\comilers\clang\clangd.exe&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
# Exit Code::Blocks!&lt;br /&gt;
# If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#: a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
# If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#: a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
# If you want to reuse older code completion remember to re-enable the plugin and restart CodeBlocks.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
The process for the three options above are detailed below.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
# Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#: Github LLVM download page: https://github.com/llvm/llvm-project/releases/tag/llvmorg-18.1.8&lt;br /&gt;
#: As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:* LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:* LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#: where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
'''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
 There are two main options to install the clangd.exe as follows:&lt;br /&gt;
 1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
 tools using one of the following packages:&lt;br /&gt;
 +------------------------------------------+------------------------+&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;|               Package                    |&amp;lt;/nowiki&amp;gt; Clangd executable      |&lt;br /&gt;
 +------------------------------------------+------------------------+&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;| mingw-w64-clang-x86_64-clang-tools-extra |&amp;lt;/nowiki&amp;gt; clang64/bin/clangd.exe |&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;| mingw-w64-x86_64-clang-tools-extra       |&amp;lt;/nowiki&amp;gt; mingw64/bin/clangd.exe |&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;| mingw-w64-ucrt-x86_64-clang-tools-extra  |&amp;lt;/nowiki&amp;gt; ucrt64/bin/clangd.exe  |&lt;br /&gt;
 +------------------------------------------+------------------------+&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         To intall the package do the following:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;          a) Open the msys2.exe bash shell &lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;          b) Run the following command:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                 pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;      &amp;lt;nowiki&amp;gt;'''&amp;lt;/nowiki&amp;gt;OR&amp;lt;nowiki&amp;gt;'''&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;      2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;          a) Open the msys2.exe bash shell &lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;          b) Run the following command:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                 pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
'''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;'''[https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412 Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables]'''&lt;br /&gt;
&lt;br /&gt;
'''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''), you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe. If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''), you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;. I found that I just make a big mistake. That is: I used the gcc toolchain from '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''. The result is I got a lot of LSP diagnostics messages and errors. Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
NOTE: Clangd_client plugin requires a clangd executable version 13 or greater.&lt;br /&gt;
&lt;br /&gt;
Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
&lt;br /&gt;
If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
&lt;br /&gt;
See https://clangd.llvm.org/installation.html&amp;lt;blockquote&amp;gt;Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
&lt;br /&gt;
Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
&lt;br /&gt;
As of 2022/11/16, this suggest that clangd version 10 will be installed.&amp;lt;/blockquote&amp;gt;If the clangd version shows less than version 13, you'll have to install a specific version as follows:&amp;lt;blockquote&amp;gt;Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
&lt;br /&gt;
'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&amp;lt;/blockquote&amp;gt;This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
&lt;br /&gt;
You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
&lt;br /&gt;
[https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client] '''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
If you prefer to install the entire LLVM/Clang package, for convenience, there is an automatic installation script available that installs LLVM for you.&lt;br /&gt;
&lt;br /&gt;
To install the latest stable version: see [https://apt.llvm.org/] '''Automatic installation script'''.&lt;br /&gt;
&lt;br /&gt;
Note that you can specify the version number with this script.&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9801</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9801"/>
		<updated>2024-08-05T17:53:10Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Windows: Install the LLVM compiler */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: [https://svn.code.sf.net/p/codeblocks/code/trunk/src/plugins/contrib/clangd_client https://sourceforge.net/projects/cb-clangd-client/]&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a successful clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the clangd executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the clangd executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
Note: Clangd_client is now included as a contrib plugin within the &amp;quot;Nightly&amp;quot; builds.&lt;br /&gt;
&lt;br /&gt;
Using a &amp;quot;Nightly&amp;quot; build is the easiest way to update to clangd_client.&lt;br /&gt;
&lt;br /&gt;
Simply install the &amp;quot;Nightly&amp;quot; and configure as specified below.&lt;br /&gt;
&lt;br /&gt;
See the Nightly builds at https://forums.codeblocks.org/index.php/board,20.0.html&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\msys64\mingw64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\mingw32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin and restart CodeBlocks.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases/tag/llvmorg-18.1.8&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a clangd executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that clangd version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
:::: [https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client] '''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: If you prefer to install the entire LLVM/Clang package, for convenience, there is&lt;br /&gt;
:: an automatic installation script available that installs LLVM for you.&lt;br /&gt;
:: To install the latest stable version: see [https://apt.llvm.org/] '''Automatic installation script'''.&lt;br /&gt;
:: Note that you can specify the version number with this script.&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9800</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9800"/>
		<updated>2024-07-31T18:11:18Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Windows: Install the LLVM compiler */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: [https://svn.code.sf.net/p/codeblocks/code/trunk/src/plugins/contrib/clangd_client https://sourceforge.net/projects/cb-clangd-client/]&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a successful clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the clangd executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the clangd executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
Note: Clangd_client is now included as a contrib plugin within the &amp;quot;Nightly&amp;quot; builds.&lt;br /&gt;
&lt;br /&gt;
Using a &amp;quot;Nightly&amp;quot; build is the easiest way to update to clangd_client.&lt;br /&gt;
&lt;br /&gt;
Simply install the &amp;quot;Nightly&amp;quot; and configure as specified below.&lt;br /&gt;
&lt;br /&gt;
See the Nightly builds at https://forums.codeblocks.org/index.php/board,20.0.html&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\msys64\mingw64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\mingw32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin and restart CodeBlocks.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    The LLVM git hub project is no longer providing downloads for Windows other than those for Microsoft Visual C.&lt;br /&gt;
# This leaves only the Msys2 project as a source for clangd.exe for Windows CodeBlocks.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a clangd executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that clangd version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
:::: [https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client] '''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: If you prefer to install the entire LLVM/Clang package, for convenience, there is&lt;br /&gt;
:: an automatic installation script available that installs LLVM for you.&lt;br /&gt;
:: To install the latest stable version: see [https://apt.llvm.org/] '''Automatic installation script'''.&lt;br /&gt;
:: Note that you can specify the version number with this script.&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9799</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9799"/>
		<updated>2024-07-31T18:03:59Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Windows: Install the LLVM compiler */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: [https://svn.code.sf.net/p/codeblocks/code/trunk/src/plugins/contrib/clangd_client https://sourceforge.net/projects/cb-clangd-client/]&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a successful clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the clangd executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the clangd executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
Note: Clangd_client is now included as a contrib plugin within the &amp;quot;Nightly&amp;quot; builds.&lt;br /&gt;
&lt;br /&gt;
Using a &amp;quot;Nightly&amp;quot; build is the easiest way to update to clangd_client.&lt;br /&gt;
&lt;br /&gt;
Simply install the &amp;quot;Nightly&amp;quot; and configure as specified below.&lt;br /&gt;
&lt;br /&gt;
See the Nightly builds at https://forums.codeblocks.org/index.php/board,20.0.html&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\msys64\mingw64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\mingw32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin and restart CodeBlocks.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    The LLVM git hub project is no longer providing downloads for Windows other than those for Microsoft Visual C.&lt;br /&gt;
#    This leaves only the Msys2 project as a source for clangd.exe for Windows.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a clangd executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that clangd version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
:::: [https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client] '''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: If you prefer to install the entire LLVM/Clang package, for convenience, there is&lt;br /&gt;
:: an automatic installation script available that installs LLVM for you.&lt;br /&gt;
:: To install the latest stable version: see [https://apt.llvm.org/] '''Automatic installation script'''.&lt;br /&gt;
:: Note that you can specify the version number with this script.&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9798</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9798"/>
		<updated>2024-07-31T18:02:50Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Windows: Manually Extract File from LLVM compiler */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: [https://svn.code.sf.net/p/codeblocks/code/trunk/src/plugins/contrib/clangd_client https://sourceforge.net/projects/cb-clangd-client/]&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a successful clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the clangd executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the clangd executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
Note: Clangd_client is now included as a contrib plugin within the &amp;quot;Nightly&amp;quot; builds.&lt;br /&gt;
&lt;br /&gt;
Using a &amp;quot;Nightly&amp;quot; build is the easiest way to update to clangd_client.&lt;br /&gt;
&lt;br /&gt;
Simply install the &amp;quot;Nightly&amp;quot; and configure as specified below.&lt;br /&gt;
&lt;br /&gt;
See the Nightly builds at https://forums.codeblocks.org/index.php/board,20.0.html&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\msys64\mingw64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\mingw32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin and restart CodeBlocks.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    The LLVM git hub project is no longer providing downloads for Windows other than those for Microsoft Visual C.&lt;br /&gt;
#    This leaves only the Msys2 project as a source for clangd.exe&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a clangd executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that clangd version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
:::: [https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client] '''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: If you prefer to install the entire LLVM/Clang package, for convenience, there is&lt;br /&gt;
:: an automatic installation script available that installs LLVM for you.&lt;br /&gt;
:: To install the latest stable version: see [https://apt.llvm.org/] '''Automatic installation script'''.&lt;br /&gt;
:: Note that you can specify the version number with this script.&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9797</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9797"/>
		<updated>2024-07-31T18:01:12Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Windows: Install the LLVM compiler */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: [https://svn.code.sf.net/p/codeblocks/code/trunk/src/plugins/contrib/clangd_client https://sourceforge.net/projects/cb-clangd-client/]&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a successful clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the clangd executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the clangd executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
Note: Clangd_client is now included as a contrib plugin within the &amp;quot;Nightly&amp;quot; builds.&lt;br /&gt;
&lt;br /&gt;
Using a &amp;quot;Nightly&amp;quot; build is the easiest way to update to clangd_client.&lt;br /&gt;
&lt;br /&gt;
Simply install the &amp;quot;Nightly&amp;quot; and configure as specified below.&lt;br /&gt;
&lt;br /&gt;
See the Nightly builds at https://forums.codeblocks.org/index.php/board,20.0.html&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\msys64\mingw64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\mingw32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin and restart CodeBlocks.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    The LLVM git hub project is no longer providing downloads for Windows other than those for Microsoft Visual C.&lt;br /&gt;
#    This leaves only the Msys2 project as a source for clangd.exe&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
# &amp;lt;s&amp;gt;Create a new directory to put the clangd.exe and dll's&amp;lt;/s&amp;gt;&lt;br /&gt;
# &amp;lt;s&amp;gt;Copy the following files into a the new directory created from the unziped #::LLVM directory:&amp;lt;/s&amp;gt;&lt;br /&gt;
#:: &amp;lt;s&amp;gt;bin\clangd.exe&amp;lt;/s&amp;gt;&lt;br /&gt;
#:: &amp;lt;s&amp;gt;bin\msvcp140.dll&amp;lt;/s&amp;gt;&lt;br /&gt;
#:: &amp;lt;s&amp;gt;bin\vcruntime140.dll&amp;lt;/s&amp;gt;&lt;br /&gt;
#:: &amp;lt;s&amp;gt;bin\vcruntime140_1.dll&amp;lt;/s&amp;gt;&lt;br /&gt;
#:I've found that copying the exe and dll's out of the LLVM folder causes Clangd to issue incorrect error messages. It's best to just point Clangd_client to the ...\LLMV\bin\clangd.exe @ CodeBlocks MainMenu-&amp;gt;Settings-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C.C++ parser-&amp;gt;Specify clangd executable to use.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a clangd executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that clangd version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
:::: [https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client] '''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: If you prefer to install the entire LLVM/Clang package, for convenience, there is&lt;br /&gt;
:: an automatic installation script available that installs LLVM for you.&lt;br /&gt;
:: To install the latest stable version: see [https://apt.llvm.org/] '''Automatic installation script'''.&lt;br /&gt;
:: Note that you can specify the version number with this script.&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9796</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9796"/>
		<updated>2024-07-31T17:58:56Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Windows: Install the LLVM compiler */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: [https://svn.code.sf.net/p/codeblocks/code/trunk/src/plugins/contrib/clangd_client https://sourceforge.net/projects/cb-clangd-client/]&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a successful clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the clangd executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the clangd executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
Note: Clangd_client is now included as a contrib plugin within the &amp;quot;Nightly&amp;quot; builds.&lt;br /&gt;
&lt;br /&gt;
Using a &amp;quot;Nightly&amp;quot; build is the easiest way to update to clangd_client.&lt;br /&gt;
&lt;br /&gt;
Simply install the &amp;quot;Nightly&amp;quot; and configure as specified below.&lt;br /&gt;
&lt;br /&gt;
See the Nightly builds at https://forums.codeblocks.org/index.php/board,20.0.html&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\msys64\mingw64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\mingw32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin and restart CodeBlocks.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    The LLVM project is no longer providing downloads for Windows other than those for Microsoft Visual C.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
# &amp;lt;s&amp;gt;Create a new directory to put the clangd.exe and dll's&amp;lt;/s&amp;gt;&lt;br /&gt;
# &amp;lt;s&amp;gt;Copy the following files into a the new directory created from the unziped #::LLVM directory:&amp;lt;/s&amp;gt;&lt;br /&gt;
#:: &amp;lt;s&amp;gt;bin\clangd.exe&amp;lt;/s&amp;gt;&lt;br /&gt;
#:: &amp;lt;s&amp;gt;bin\msvcp140.dll&amp;lt;/s&amp;gt;&lt;br /&gt;
#:: &amp;lt;s&amp;gt;bin\vcruntime140.dll&amp;lt;/s&amp;gt;&lt;br /&gt;
#:: &amp;lt;s&amp;gt;bin\vcruntime140_1.dll&amp;lt;/s&amp;gt;&lt;br /&gt;
#:I've found that copying the exe and dll's out of the LLVM folder causes Clangd to issue incorrect error messages. It's best to just point Clangd_client to the ...\LLMV\bin\clangd.exe @ CodeBlocks MainMenu-&amp;gt;Settings-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C.C++ parser-&amp;gt;Specify clangd executable to use.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a clangd executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that clangd version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
:::: [https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client] '''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: If you prefer to install the entire LLVM/Clang package, for convenience, there is&lt;br /&gt;
:: an automatic installation script available that installs LLVM for you.&lt;br /&gt;
:: To install the latest stable version: see [https://apt.llvm.org/] '''Automatic installation script'''.&lt;br /&gt;
:: Note that you can specify the version number with this script.&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9795</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9795"/>
		<updated>2024-07-31T17:52:44Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Manually Remove Clangd-Client Plugin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: [https://svn.code.sf.net/p/codeblocks/code/trunk/src/plugins/contrib/clangd_client https://sourceforge.net/projects/cb-clangd-client/]&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a successful clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the clangd executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the clangd executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
Note: Clangd_client is now included as a contrib plugin within the &amp;quot;Nightly&amp;quot; builds.&lt;br /&gt;
&lt;br /&gt;
Using a &amp;quot;Nightly&amp;quot; build is the easiest way to update to clangd_client.&lt;br /&gt;
&lt;br /&gt;
Simply install the &amp;quot;Nightly&amp;quot; and configure as specified below.&lt;br /&gt;
&lt;br /&gt;
See the Nightly builds at https://forums.codeblocks.org/index.php/board,20.0.html&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\msys64\mingw64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\mingw32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin and restart CodeBlocks.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
# &amp;lt;s&amp;gt;Create a new directory to put the clangd.exe and dll's&amp;lt;/s&amp;gt;&lt;br /&gt;
# &amp;lt;s&amp;gt;Copy the following files into a the new directory created from the unziped #::LLVM directory:&amp;lt;/s&amp;gt;&lt;br /&gt;
#:: &amp;lt;s&amp;gt;bin\clangd.exe&amp;lt;/s&amp;gt;&lt;br /&gt;
#:: &amp;lt;s&amp;gt;bin\msvcp140.dll&amp;lt;/s&amp;gt;&lt;br /&gt;
#:: &amp;lt;s&amp;gt;bin\vcruntime140.dll&amp;lt;/s&amp;gt;&lt;br /&gt;
#:: &amp;lt;s&amp;gt;bin\vcruntime140_1.dll&amp;lt;/s&amp;gt;&lt;br /&gt;
#:I've found that copying the exe and dll's out of the LLVM folder causes Clangd to issue incorrect error messages. It's best to just point Clangd_client to the ...\LLMV\bin\clangd.exe @ CodeBlocks MainMenu-&amp;gt;Settings-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C.C++ parser-&amp;gt;Specify clangd executable to use.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a clangd executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that clangd version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
:::: [https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client] '''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: If you prefer to install the entire LLVM/Clang package, for convenience, there is&lt;br /&gt;
:: an automatic installation script available that installs LLVM for you.&lt;br /&gt;
:: To install the latest stable version: see [https://apt.llvm.org/] '''Automatic installation script'''.&lt;br /&gt;
:: Note that you can specify the version number with this script.&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9794</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9794"/>
		<updated>2024-07-31T17:51:20Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Installing Clangd_client from source or pre-built binary  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: [https://svn.code.sf.net/p/codeblocks/code/trunk/src/plugins/contrib/clangd_client https://sourceforge.net/projects/cb-clangd-client/]&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a successful clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the clangd executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the clangd executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
Note: Clangd_client is now included as a contrib plugin within the &amp;quot;Nightly&amp;quot; builds.&lt;br /&gt;
&lt;br /&gt;
Using a &amp;quot;Nightly&amp;quot; build is the easiest way to update to clangd_client.&lt;br /&gt;
&lt;br /&gt;
Simply install the &amp;quot;Nightly&amp;quot; and configure as specified below.&lt;br /&gt;
&lt;br /&gt;
See the Nightly builds at https://forums.codeblocks.org/index.php/board,20.0.html&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\msys64\mingw64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\mingw32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
# &amp;lt;s&amp;gt;Create a new directory to put the clangd.exe and dll's&amp;lt;/s&amp;gt;&lt;br /&gt;
# &amp;lt;s&amp;gt;Copy the following files into a the new directory created from the unziped #::LLVM directory:&amp;lt;/s&amp;gt;&lt;br /&gt;
#:: &amp;lt;s&amp;gt;bin\clangd.exe&amp;lt;/s&amp;gt;&lt;br /&gt;
#:: &amp;lt;s&amp;gt;bin\msvcp140.dll&amp;lt;/s&amp;gt;&lt;br /&gt;
#:: &amp;lt;s&amp;gt;bin\vcruntime140.dll&amp;lt;/s&amp;gt;&lt;br /&gt;
#:: &amp;lt;s&amp;gt;bin\vcruntime140_1.dll&amp;lt;/s&amp;gt;&lt;br /&gt;
#:I've found that copying the exe and dll's out of the LLVM folder causes Clangd to issue incorrect error messages. It's best to just point Clangd_client to the ...\LLMV\bin\clangd.exe @ CodeBlocks MainMenu-&amp;gt;Settings-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C.C++ parser-&amp;gt;Specify clangd executable to use.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a clangd executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that clangd version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
:::: [https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client] '''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: If you prefer to install the entire LLVM/Clang package, for convenience, there is&lt;br /&gt;
:: an automatic installation script available that installs LLVM for you.&lt;br /&gt;
:: To install the latest stable version: see [https://apt.llvm.org/] '''Automatic installation script'''.&lt;br /&gt;
:: Note that you can specify the version number with this script.&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9788</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9788"/>
		<updated>2024-03-15T22:08:16Z</updated>

		<summary type="html">&lt;p&gt;Pecan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: [https://svn.code.sf.net/p/codeblocks/code/trunk/src/plugins/contrib/clangd_client https://sourceforge.net/projects/cb-clangd-client/]&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a successful clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the clangd executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the clangd executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
Note: Clangd_client is now included as a contrib plugin within the &amp;quot;Nightly&amp;quot; builds.&lt;br /&gt;
&lt;br /&gt;
Using a &amp;quot;Nightly&amp;quot; build is the easiest way to update to clangd_client.&lt;br /&gt;
&lt;br /&gt;
Simply install the &amp;quot;Nightly&amp;quot; and configure as specified below.&lt;br /&gt;
&lt;br /&gt;
See the Nightly builds at https://forums.codeblocks.org/index.php/board,20.0.html&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
# &amp;lt;s&amp;gt;Create a new directory to put the clangd.exe and dll's&amp;lt;/s&amp;gt;&lt;br /&gt;
# &amp;lt;s&amp;gt;Copy the following files into a the new directory created from the unziped #::LLVM directory:&amp;lt;/s&amp;gt;&lt;br /&gt;
#:: &amp;lt;s&amp;gt;bin\clangd.exe&amp;lt;/s&amp;gt;&lt;br /&gt;
#:: &amp;lt;s&amp;gt;bin\msvcp140.dll&amp;lt;/s&amp;gt;&lt;br /&gt;
#:: &amp;lt;s&amp;gt;bin\vcruntime140.dll&amp;lt;/s&amp;gt;&lt;br /&gt;
#:: &amp;lt;s&amp;gt;bin\vcruntime140_1.dll&amp;lt;/s&amp;gt;&lt;br /&gt;
#:I've found that copying the exe and dll's out of the LLVM folder causes Clangd to issue incorrect error messages. It's best to just point Clangd_client to the ...\LLMV\bin\clangd.exe @ CodeBlocks MainMenu-&amp;gt;Settings-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C.C++ parser-&amp;gt;Specify clangd executable to use.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a clangd executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that clangd version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
:::: [https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client] '''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: If you prefer to install the entire LLVM/Clang package, for convenience, there is&lt;br /&gt;
:: an automatic installation script available that installs LLVM for you.&lt;br /&gt;
:: To install the latest stable version: see [https://apt.llvm.org/] '''Automatic installation script'''.&lt;br /&gt;
:: Note that you can specify the version number with this script.&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9787</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9787"/>
		<updated>2024-03-14T18:00:02Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Windows: Manually Extract File from LLVM compiler */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a successful clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the clangd executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the clangd executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
Note: Clangd_client is now included as a contrib plugin within the &amp;quot;Nightly&amp;quot; builds.&lt;br /&gt;
&lt;br /&gt;
Using a &amp;quot;Nightly&amp;quot; build is the easiest way to update to clangd_client.&lt;br /&gt;
&lt;br /&gt;
Simply install the &amp;quot;Nightly&amp;quot; and configure as specified below.&lt;br /&gt;
&lt;br /&gt;
See the Nightly builds at https://forums.codeblocks.org/index.php/board,20.0.html&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
# &amp;lt;s&amp;gt;Create a new directory to put the clangd.exe and dll's&amp;lt;/s&amp;gt;&lt;br /&gt;
# &amp;lt;s&amp;gt;Copy the following files into a the new directory created from the unziped #::LLVM directory:&amp;lt;/s&amp;gt;&lt;br /&gt;
#:: &amp;lt;s&amp;gt;bin\clangd.exe&amp;lt;/s&amp;gt;&lt;br /&gt;
#:: &amp;lt;s&amp;gt;bin\msvcp140.dll&amp;lt;/s&amp;gt;&lt;br /&gt;
#:: &amp;lt;s&amp;gt;bin\vcruntime140.dll&amp;lt;/s&amp;gt;&lt;br /&gt;
#:: &amp;lt;s&amp;gt;bin\vcruntime140_1.dll&amp;lt;/s&amp;gt;&lt;br /&gt;
#:I've found that copying the exe and dll's out of the LLVM folder causes Clangd to issue incorrect error messages. It's best to just point Clangd_client to the ...\LLMV\bin\clangd.exe @ CodeBlocks MainMenu-&amp;gt;Settings-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C.C++ parser-&amp;gt;Specify clangd executable to use.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a clangd executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that clangd version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
:::: [https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client] '''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: If you prefer to install the entire LLVM/Clang package, for convenience, there is&lt;br /&gt;
:: an automatic installation script available that installs LLVM for you.&lt;br /&gt;
:: To install the latest stable version: see [https://apt.llvm.org/] '''Automatic installation script'''.&lt;br /&gt;
:: Note that you can specify the version number with this script.&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9746</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9746"/>
		<updated>2023-03-08T19:29:39Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Installing Clangd_client from source or pre-built binary  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a successful clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the clangd executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the clangd executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
Note: Clangd_client is now included as a contrib plugin within the &amp;quot;Nightly&amp;quot; builds.&lt;br /&gt;
&lt;br /&gt;
Using a &amp;quot;Nightly&amp;quot; build is the easiest way to update to clangd_client.&lt;br /&gt;
&lt;br /&gt;
Simply install the &amp;quot;Nightly&amp;quot; and configure as specified below.&lt;br /&gt;
&lt;br /&gt;
See the Nightly builds at https://forums.codeblocks.org/index.php/board,20.0.html&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a clangd executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that clangd version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
:::: [https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client] '''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: If you prefer to install the entire LLVM/Clang package, for convenience, there is&lt;br /&gt;
:: an automatic installation script available that installs LLVM for you.&lt;br /&gt;
:: To install the latest stable version: see [https://apt.llvm.org/] '''Automatic installation script'''.&lt;br /&gt;
:: Note that you can specify the version number with this script.&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9745</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9745"/>
		<updated>2023-03-08T19:28:34Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Installing Clangd_client from source or pre-built binary  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a successful clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the clangd executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the clangd executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
Note: Clangd_client is now included as a contrib plugin within the &amp;quot;Nightly&amp;quot; builds.&lt;br /&gt;
&lt;br /&gt;
Using a &amp;quot;Nightly&amp;quot; build is the easiest way to update to clangd_client.&lt;br /&gt;
&lt;br /&gt;
Simply install the &amp;quot;Nightly&amp;quot; and configure as specified below.&lt;br /&gt;
&lt;br /&gt;
See the Nightly builds at https://forums.codeblocks.org/index.php/board,20.0.html&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a clangd executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that clangd version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
:::: [https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client] '''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: If you prefer to install the entire LLVM/Clang package, for convenience, there is&lt;br /&gt;
:: an automatic installation script available that installs LLVM for you.&lt;br /&gt;
:: To install the latest stable version: see [https://apt.llvm.org/] '''Automatic installation script'''.&lt;br /&gt;
:: Note that you can specify the version number with this script.&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9744</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9744"/>
		<updated>2023-03-08T19:14:42Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Configuring clangd_client */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a successful clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the clangd executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the clangd executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a clangd executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that clangd version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
:::: [https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client] '''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: If you prefer to install the entire LLVM/Clang package, for convenience, there is&lt;br /&gt;
:: an automatic installation script available that installs LLVM for you.&lt;br /&gt;
:: To install the latest stable version: see [https://apt.llvm.org/] '''Automatic installation script'''.&lt;br /&gt;
:: Note that you can specify the version number with this script.&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9706</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9706"/>
		<updated>2022-11-17T20:15:57Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Linux: Clangd executable install process: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a cland executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that cland version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
:::: [https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client] '''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: If you prefer to install the entire LLVM/Clang package, for convenience, there is&lt;br /&gt;
:: an automatic installation script available that installs LLVM for you.&lt;br /&gt;
:: To install the latest stable version: see [https://apt.llvm.org/] '''Automatic installation script'''.&lt;br /&gt;
:: Note that you can specify the version number with this script.&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9705</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9705"/>
		<updated>2022-11-17T20:13:04Z</updated>

		<summary type="html">&lt;p&gt;Pecan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a cland executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that cland version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
:::: [https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client] '''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: If you prefer to install the entire LLVM/Clang package, for convenience, thereis&lt;br /&gt;
:: an automatic installation script available that installs LLVM for you.&lt;br /&gt;
:: To install the latest stable version: see [https://apt.llvm.org/] '''Automatic installation script'''.&lt;br /&gt;
:: Note that you can specify the version number with this script.&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9704</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9704"/>
		<updated>2022-11-17T20:07:13Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Linux: Clangd executable install process: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a cland executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that cland version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
:::: [https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client] '''Configuring clangd_client'''&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: If you prefer to install the entire LLVM/Clang package, for convenience, there is&lt;br /&gt;
:: an automatic installation script available that installs LLVM for you.&lt;br /&gt;
:: To install the latest stable version: see '''Automatic installation script''' at  &lt;br /&gt;
:::: apt.llvm.org  &lt;br /&gt;
:: Note that you can specify the version number with this script.&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9703</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9703"/>
		<updated>2022-11-17T20:06:02Z</updated>

		<summary type="html">&lt;p&gt;Pecan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a cland executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that cland version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
:::: [https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client] '''Configuring clangd_client'''&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: If you prefer to install the entire LLVM/Clang package, for convenience, there is&lt;br /&gt;
:: an automatic installation script available that installs LLVM for you.&lt;br /&gt;
:: To install the latest stable version: see '''Automatic installation script''' at  &lt;br /&gt;
 apt.llvm.org  &lt;br /&gt;
:: Note that you can specify the version number with this script.&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9702</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9702"/>
		<updated>2022-11-17T20:03:25Z</updated>

		<summary type="html">&lt;p&gt;Pecan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a cland executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that cland version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
:::: [https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client] '''Configuring clangd_client'''&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: If you prefer to install the entire LLVM/Clang package, for convenience, there is&lt;br /&gt;
:: an automatic installation script available that installs LLVM for you.&lt;br /&gt;
:: To install the latest stable version: see '''Automatic installation script''' at &lt;br /&gt;
:: Note that you can specify the version number with this script.&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9701</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9701"/>
		<updated>2022-11-17T20:01:05Z</updated>

		<summary type="html">&lt;p&gt;Pecan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a cland executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that cland version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
:::: [https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client] '''Configuring clangd_client'''&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: If you prefer to install the entire LLVM/Clang package, for convenience, there is&lt;br /&gt;
:: an automatic installation script available that installs LLVM for you.&lt;br /&gt;
:: To install the latest stable version: see&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9700</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9700"/>
		<updated>2022-11-17T20:00:07Z</updated>

		<summary type="html">&lt;p&gt;Pecan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a cland executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that cland version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
:::: [https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client] '''Configuring clangd_client'''&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9699</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9699"/>
		<updated>2022-11-17T19:14:59Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Linux: Clangd executable install process: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a cland executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that cland version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
:::: [https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client] '''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9698</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9698"/>
		<updated>2022-11-17T19:11:51Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Linux: Clangd executable install process: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a cland executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that cland version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
::::'''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
[https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client] '''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9697</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9697"/>
		<updated>2022-11-17T19:02:36Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Linux: Clangd executable install process: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a cland executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that cland version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
::::'''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
[https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client] Configuring clangd_client&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9696</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9696"/>
		<updated>2022-11-17T18:58:19Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Linux: Clangd executable install process: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a cland executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that cland version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
::::'''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
[LinkToIt]: https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9695</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9695"/>
		<updated>2022-11-17T18:54:56Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Linux: Clangd executable install process: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a cland executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that cland version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
::::'''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
[LinkToIt](https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client)&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9694</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9694"/>
		<updated>2022-11-17T18:53:11Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Linux: Clangd executable install process: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a cland executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that cland version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
::::'''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9693</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9693"/>
		<updated>2022-11-17T18:47:19Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Linux: Clangd executable install process: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a cland executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that cland version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
::::'''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
https://wiki.codeblocks.org/index.php/CB_Clangd_Client#Configuring_clangd_client&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9692</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9692"/>
		<updated>2022-11-17T18:39:42Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Configuring clangd_client */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a cland executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that cland version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
::::'''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9691</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9691"/>
		<updated>2022-11-17T18:38:51Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Linux: Clangd executable install process: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
&amp;lt;span id=&amp;quot;configureclientID&amp;quot;&amp;gt;ConfigureClient&amp;lt;/span&amp;gt;&lt;br /&gt;
======================================&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a cland executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that cland version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
::::'''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9690</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9690"/>
		<updated>2022-11-17T18:36:10Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Linux: Clangd executable install process: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
&amp;lt;span id=&amp;quot;configureclientID&amp;quot;&amp;gt;ConfigureClient&amp;lt;/span&amp;gt;&lt;br /&gt;
======================================&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a cland executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that cland version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
::::'''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
[ConfigureClient](./#configureclientID)&lt;br /&gt;
 &amp;lt;!-- &amp;lt;span id=&amp;quot;configureclientID&amp;quot;&amp;gt;ConfigureClient&amp;lt;/span --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9689</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9689"/>
		<updated>2022-11-17T18:35:08Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Configuring clangd_client */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
&amp;lt;span id=&amp;quot;configureclientID&amp;quot;&amp;gt;ConfigureClient&amp;lt;/span&amp;gt;&lt;br /&gt;
======================================&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a cland executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that cland version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
::::'''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
[ConfigureClient](./#configure_client)&lt;br /&gt;
 &amp;lt;!-- span id=&amp;quot;configure_client&amp;quot;&amp;gt;ConfigureClient&amp;lt;/span --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9688</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9688"/>
		<updated>2022-11-17T18:32:00Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Linux: Clangd executable install process: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
&amp;lt;span id=&amp;quot;configure_client&amp;quot;&amp;gt;ConfigureClient&amp;lt;/span&amp;gt;&lt;br /&gt;
======================================&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a cland executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that cland version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
::::'''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
[ConfigureClient](./#configure_client)&lt;br /&gt;
 &amp;lt;!-- span id=&amp;quot;configure_client&amp;quot;&amp;gt;ConfigureClient&amp;lt;/span --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9687</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9687"/>
		<updated>2022-11-17T18:27:29Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Linux: Clangd executable install process: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
&amp;lt;span id=&amp;quot;configure_client&amp;quot;&amp;gt;ConfigureClient&amp;lt;/span&amp;gt;&lt;br /&gt;
======================================&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a cland executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that cland version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
::::'''Configuring clangd_client'''&lt;br /&gt;
&lt;br /&gt;
[ConfigureClient](./#configure_client)&lt;br /&gt;
&amp;lt;span id=&amp;quot;configure_client&amp;quot;&amp;gt;ConfigureClient&amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9686</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9686"/>
		<updated>2022-11-17T18:22:40Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Configuring clangd_client */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
&amp;lt;span id=&amp;quot;configure_client&amp;quot;&amp;gt;ConfigureClient&amp;lt;/span&amp;gt;&lt;br /&gt;
======================================&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a cland executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that cland version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
::::'''Configuring clangd_client'''&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9685</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9685"/>
		<updated>2022-11-17T18:04:55Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Configuring clangd_client */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows: Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
:: or  '''Linux: Clangd executable install process'''&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify or enter the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a cland executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that cland version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
::::'''Configuring clangd_client'''&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9684</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9684"/>
		<updated>2022-11-17T18:01:18Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Linux: Clangd executable install process: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a cland executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that cland version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
:: You can now configure clangd_client plugin by following the above instructions at&lt;br /&gt;
::::'''Configuring clangd_client'''&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9683</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9683"/>
		<updated>2022-11-17T17:57:47Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Linux: Clangd executable install process: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a cland executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
:::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that cland version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
::::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''.&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9682</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9682"/>
		<updated>2022-11-17T17:46:04Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Linux: Clangd executable install process: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a cland executable version 13 or greater.&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;br /&gt;
::See https://clangd.llvm.org/installation.html&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
::Installing the clangd package will usually give you a slightly older version.&lt;br /&gt;
::Test this by issuing '''apt-get install --dry-run clangd'''&lt;br /&gt;
::As of 2022/11/16, this suggest that cland version 10 will be installed.&lt;br /&gt;
::If the clangd version shows less than version 13, you'll have to install a specific version as follows:&lt;br /&gt;
::&lt;br /&gt;
::Try to install a packaged release (''must be version 13 or greater''):&lt;br /&gt;
:::'''sudo apt-get install clangd-13''' ''(Must be version 13 or greater)''.&lt;br /&gt;
&lt;br /&gt;
::This will install clangd as '''/usr/bin/clangd-13'''. You can make it the default clangd with command &lt;br /&gt;
:::'''sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-13 100''' .&lt;br /&gt;
::This is not necessary for the CodeBlocks clangd_client plugin. You can tell the plugin to use '''/usr/bin/clangd-13''' without making it the system default.&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9681</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9681"/>
		<updated>2022-11-17T17:11:04Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Linux: Clangd executable install process: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a cland executable version 13 or greater.&lt;br /&gt;
::&lt;br /&gt;
::Check your current clangd version by running '''clangd --version'''&lt;br /&gt;
::If the version is less than 13 you will have to install a newer version.&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9680</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9680"/>
		<updated>2022-11-17T17:08:34Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Linux: Clangd executable install process: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client plugin requires a cland executable version 13 or greater.&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9679</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9679"/>
		<updated>2022-11-17T17:08:02Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Linux: Clangd executable install process: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;br /&gt;
::&lt;br /&gt;
::NOTE: Clangd_client requires a cland executable version 13 or greater.&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9678</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9678"/>
		<updated>2022-11-17T17:05:47Z</updated>

		<summary type="html">&lt;p&gt;Pecan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;br /&gt;
== '''Linux: Clangd executable install process:''' ==&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9677</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9677"/>
		<updated>2022-11-17T17:04:06Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Windows Compiler Clangd/LLVM Package Installer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9676</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9676"/>
		<updated>2022-11-17T17:03:34Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Windows Clangd executable install process: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9675</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9675"/>
		<updated>2022-11-17T17:02:22Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Manually Extract File from LLVM compiler */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9674</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9674"/>
		<updated>2022-11-17T17:01:25Z</updated>

		<summary type="html">&lt;p&gt;Pecan: /* Windows: Install the LLVM compiler */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The repository page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.html Code completion using LSP and clangd]&lt;br /&gt;
== '''What is Clangd'''==&lt;br /&gt;
&lt;br /&gt;
    clangd understands your C++ code and adds smart features to your editor:&lt;br /&gt;
:::* code completion&lt;br /&gt;
:::* compile errors &lt;br /&gt;
:::* go-to-definition &lt;br /&gt;
:::* go-to-implementation&lt;br /&gt;
:::* find references&lt;br /&gt;
:::   and more.&lt;br /&gt;
&lt;br /&gt;
    clangd is a language server that can work with your editor via a plugin.&lt;br /&gt;
    CodeBlocks provides Clangd_client as the needed plugin.&lt;br /&gt;
&lt;br /&gt;
    Clangd_client additionally enhances the clangd server by providing:&lt;br /&gt;
&lt;br /&gt;
:::* call tips&lt;br /&gt;
:::* function definitions&lt;br /&gt;
:::* parameter definitions&lt;br /&gt;
:::* previous and next function positioning&lt;br /&gt;
:::* symbols browser&lt;br /&gt;
:::* go-to-file&lt;br /&gt;
:::* go-to-function&lt;br /&gt;
:::* symbol renaming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=='''Configuring clangd_client'''==&lt;br /&gt;
:: Clangd_client requires the third-party binary clangd executable.&lt;br /&gt;
:: See '''Windows Compiler Clangd/LLVM Package Installer''' below to install it.&lt;br /&gt;
&lt;br /&gt;
:: After a success clangd executable install, perform the following:&lt;br /&gt;
:::Disable the &amp;quot;CodeCompletion&amp;quot; plugin.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''disable''' CodeCompletion.&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Plugins-&amp;gt;Manage Plugins and '''enable''' Clangd_client.&lt;br /&gt;
:::'''Restart Codeblocks'''.&lt;br /&gt;
&lt;br /&gt;
:::Tell CodeBlocks (or verify) where the cland executable resides:&lt;br /&gt;
::::* Navigate to Setting-&amp;gt;Editor-&amp;gt;Clangd_client-&amp;gt;C/C++ parser(tab) and verify the location of the cland executable in the box labeled &amp;quot;Specify clangd executable to use&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Installing Clangd_client from source or pre-built binary ''' ==&lt;br /&gt;
&lt;br /&gt;
#     Install the LLVM or Clangd.exe as documented in the section below entitled:&lt;br /&gt;
#: '''Windows Clangd executable install process'''&lt;br /&gt;
#::&amp;lt;br /&amp;gt;&lt;br /&gt;
#     Disable the Code completion plugin as follows:&lt;br /&gt;
#:    a) Open the Plugin manager via  Code::Blocks menu &lt;br /&gt;
#::         &amp;quot;MainMenu=&amp;gt;Plugins=&amp;gt;Manage plugins...&amp;quot; &lt;br /&gt;
#:    b) In the Manage Plugin dialog do the following:&lt;br /&gt;
#::          i  ) Find and select the &amp;quot;Code completion&amp;quot; plugin via it's title &lt;br /&gt;
#::          ii ) Press the &amp;quot;Disable&amp;quot; button on the right near the top&lt;br /&gt;
#::          iii) If you get any errors please try again.&lt;br /&gt;
#::&amp;lt;br /&amp;gt;	   &lt;br /&gt;
#    Install the Clangd-Client Plugin using one of the following options, which are documented below: &lt;br /&gt;
#:      a) Install via the Plugin Manager&lt;br /&gt;
#:      b) Manually install the plugin files&lt;br /&gt;
#:&amp;lt;br /&amp;gt;	&lt;br /&gt;
#    Configure the Clangd-Client Plugin for use as follows:&lt;br /&gt;
#:      a) Select the CodeBlocks menu item &amp;quot;Settings-&amp;gt;Editor...&amp;quot;&lt;br /&gt;
#:      b) In the list on the left click/select the &amp;quot;clangd_client&amp;quot; option.&lt;br /&gt;
#:      c) In the &amp;quot;C/C++ parser&amp;quot; tab change the &amp;quot;Specify clangd executable to use&amp;quot; to reference the clangd.exe you installed via step 1) above. &lt;br /&gt;
           Some examples of this could be:&lt;br /&gt;
              C:\msys64\clang64\bin\clangd.exe&lt;br /&gt;
              C:\msys64\clang32\bin\clangd.exe&lt;br /&gt;
              C:\LLVM\bin\clangd.exe&lt;br /&gt;
              C:\comilers\clang\clangd.exe&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Remove Clangd-Client Plugin''' ==&lt;br /&gt;
&lt;br /&gt;
#   Exit Code::Blocks!&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#   If you manually installed the files or used the Plugin manager then you can do the following:&lt;br /&gt;
#:  a) In the Code::Blocks '''...\share\CodeBlocks''' folder delete the clangd_client.zip file&lt;br /&gt;
#:  b) In the Code::Blocks '''...\share\CodeBlocks\plugins''' folder delete the clangd_client.dll file&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#        If you installed via the Plugin manager then you can delete the files with the following commands:&lt;br /&gt;
#:  a) del '''%APPDATA%\CodeBlocks\share\codeblocks\plugins\clangd_client.dll'''&lt;br /&gt;
#:  b) del '''%APPDATA%\CodeBlocks\share\codeblocks\clangd_client.zip'''&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    If you want to reuse older code completion remember to re-enable the plugin&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows Clangd executable install process:''' ==&lt;br /&gt;
&lt;br /&gt;
::There are three main options to install the clangd.exe:&lt;br /&gt;
#        Install the LLVM compiler.&lt;br /&gt;
#        Manully extract the required files from the LLVM compiler.&lt;br /&gt;
#        Install the Clangd package for the Windows compiler you are using if it is available.&lt;br /&gt;
:&amp;lt;br /&amp;gt;&lt;br /&gt;
::The  process for the three options above are detailed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows: Install the LLVM compiler''' ==&lt;br /&gt;
&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following&lt;br /&gt;
#:       Github LLVM download page:&lt;br /&gt;
#:       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#:   As of Jan 2022 the Windows files are named as follows:&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#:      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#:   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#:&amp;lt;br /&amp;gt;&lt;br /&gt;
#    Run the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe you downloaded to install the LLVM compiler.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Manually Extract File from LLVM compiler''' ==&lt;br /&gt;
#    Download the latest (non RC/Beta) LLVM Windows executable for your OS (Win32 or Win64) from the following &lt;br /&gt;
#::       Github LLVM download page:&lt;br /&gt;
#::       https://github.com/llvm/llvm-project/releases&lt;br /&gt;
#::&lt;br /&gt;
#::   As of Jan 2022 the Windows files are names as follows:&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win64.exe&lt;br /&gt;
#::      LLVM-&amp;lt;version&amp;gt;-win32.exe&lt;br /&gt;
#::   where &amp;lt;version&amp;gt; is the LLVM version, like 13.0.0 or 13.0.1.&lt;br /&gt;
#::&lt;br /&gt;
#    Unzip the LLVM-&amp;lt;version&amp;gt;-win&amp;lt;xx&amp;gt;.exe file you downloaded using 7zip or your prefered ZIP program into a sub directory&lt;br /&gt;
#    Create a new directory to put the clangd.exe and dll's&lt;br /&gt;
#    Copy the following files into a the new directory created from the unziped #::LLVM directory:&lt;br /&gt;
#::            bin\clangd.exe&lt;br /&gt;
#::            bin\msvcp140.dll&lt;br /&gt;
#::            bin\vcruntime140.dll&lt;br /&gt;
#::            bin\vcruntime140_1.dll&lt;br /&gt;
#::&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== '''Windows Compiler Clangd/LLVM Package Installer''' ==&lt;br /&gt;
    Due to the number of different compilers available for Windows not all of the compilers will have either/both the Clang or LLVM required files.&lt;br /&gt;
&lt;br /&gt;
    If you want to install the specific package(s) for the Windows compiler you are using in order to use it's clangd.exe file please follow the instructions below for the specific compiler you have installed:&lt;br /&gt;
&lt;br /&gt;
    '''MSYS2 Compiler - MinGW64'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-x86_64-clang-tools-extra | clang64/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-x86_64-clang-tools-extra       | mingw64/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
       '''OR'''&lt;br /&gt;
   &lt;br /&gt;
       2) The second option is to intall the full Clang tool chain as follows:&lt;br /&gt;
           a) Open the msys2.exe bash shell &lt;br /&gt;
           b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-x86_64-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    '''MSYS2 Compiler - MinGW32'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       There are two main options to install the clangd.exe as follows:&lt;br /&gt;
&lt;br /&gt;
       1) The first option in order to  minimise disk space is to install the Clang extra &lt;br /&gt;
          tools using one of the following packages:&lt;br /&gt;
&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           |               Package                    | Clangd executable      |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
           | mingw-w64-clang-i686-clang-tools-extra   | clang32/bin/clangd.exe |&lt;br /&gt;
           | mingw-w64-i686-clang-tools-extra         | mingw32/bin/clangd.exe |&lt;br /&gt;
           +------------------------------------------+------------------------+&lt;br /&gt;
&lt;br /&gt;
          To intall the package do the following:&lt;br /&gt;
            a) Open the msys2.exe bash shell &lt;br /&gt;
            b) Run the following command:&lt;br /&gt;
                  pacman -S &amp;lt;Package name in the table above&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        '''OR'''&lt;br /&gt;
&lt;br /&gt;
       2) The second option is to install the full Clang tool chain as follows:&lt;br /&gt;
          a) Open the msys2.exe bash shell &lt;br /&gt;
          b) Run the following command:&lt;br /&gt;
                  pacman -S mingw-w64-clang-i686-toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
 '''Notes from the CodeBlocks forum to avoid mixing incompatible gcc/clangd executables.'''&lt;br /&gt;
 -------------------------------------------------------------------------------------&lt;br /&gt;
    https://forums.codeblocks.org/index.php/topic,24357.msg169412.html#msg169412&lt;br /&gt;
&lt;br /&gt;
::: '''Don't mix mingw64 with clang64'''.&lt;br /&gt;
&lt;br /&gt;
:: If you are using the gcc from msys2, (the compilers in the folder '''msys64\mingw64\bin'''),&lt;br /&gt;
:: you should use &amp;quot;mingw-w64-x86_64-clang-tools-extra&amp;quot;, &lt;br /&gt;
:: (the clangd.exe is under the folder '''msys64\mingw64\bin''') the same folder as your gcc.exe.&lt;br /&gt;
::&amp;lt;br /&amp;gt; &lt;br /&gt;
:: If you are using the clang tool chain, (the folder '''msys64\clang64\bin'''),&lt;br /&gt;
::	you should use &amp;quot;mingw-w64-clang-x86_64-clang-tools-extra&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:: I found that I just make a big mistake. That is: I used the gcc toolchain from&lt;br /&gt;
:: '''msys64\mingw64\bin''', but I used the clangd.exe from '''msys64\clang64\bin'''.&lt;br /&gt;
:: The result is I got a lot of LSP diagnostics messages and errors.&lt;br /&gt;
:: Luckily I found the reason, and fixed this issue. Hope this will help others.&lt;br /&gt;
::&amp;lt;br /&amp;gt;&lt;br /&gt;
-----&lt;/div&gt;</summary>
		<author><name>Pecan</name></author>
	</entry>
</feed>