You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/additionalfeatures/clangd_cdt_support.rst
+41-38Lines changed: 41 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,52 +3,55 @@
3
3
Espressif-IDE LSP Support for C/C++ Editor
4
4
==========================================
5
5
6
-
The Espressif-IDE 3.0.0 (and higher) now includes the `Eclipse CDT-LSP <https://github.com/eclipse-cdt/cdt-lsp/>`, enabling support for the latest C/C++ standards and providing an LSP-based C/C++ Editor. This editor, powered by the `LLVM <https://clangd.llvm.org/>` clangd C/C++ language server, offers advanced functionality for ESP-IDF developers.
6
+
:link_to_translation:`zh_CN:[中文]`
7
7
8
-
In line with this enhancement, we've discontinued support for the standard CDT Editor/Indexer, as it only offers support for up to C++ 14. This has been replaced with a new LSP editor, especially considering that ESP-IDF now utilizes C++ 20 (with GCC 11.2) in v5.0.x, transitions to C++ 23 (with GCC 12.1) in v5.1, and to C++ 23 with GCC 13.1 in v5.2.
8
+
The Espressif-IDE 3.0.0 or later now includes the `Eclipse CDT-LSP <https://github.com/eclipse-cdt/cdt-lsp/>`_, enabling support for the latest C/C++ standards and providing an LSP-based C/C++ Editor. This editor, powered by the `LLVM <https://clangd.llvm.org/>`_ clangd C/C++ language server, offers advanced functionality for ESP-IDF developers.
9
+
10
+
In line with this enhancement, we have discontinued support for the standard CDT Editor/Indexer, as it only supports up to C++ 14. This has been replaced with a new LSP editor, especially considering that ESP-IDF now utilizes C++ 20 (with GCC 11.2) in v5.0.x, transitions to C++ 23 (with GCC 12.1) in v5.1, and to C++ 23 with GCC 13.1 in v5.2.
9
11
10
12
The LSP powered C/C++ editor greatly benefits ESP-IDF developers by aligning with the latest language standards and compiler versions, enhancing productivity, and improving code quality.
11
13
12
-
You can find more details on the LSP based C/C++ Editor features in the `Eclipse CDT-LSP documentation <https://github.com/eclipse-cdt/cdt-lsp/>`_.
14
+
You can find more details on the LSP based C/C++ editor features in the `Eclipse CDT-LSP documentation <https://github.com/eclipse-cdt/cdt-lsp/>`_.
13
15
14
16
Prerequisites
15
17
-------------
16
-
* You need to have Espressif-IDE 3.0.0 (and higher) to have access to the LSP powered C/C++ editor.
18
+
19
+
* You need Espressif-IDE 3.0.0 or later to access the LSP-powered C/C++ editor.
17
20
* If you are updating Eclipse CDT or Espressif-IDE via the update site, you need to select the ESP-IDF Eclipse Plugin and its dependencies, as shown below:
By default, the esp-clang toolchain is installed as a part of the ESP-IDF tools installation process, and clangd **Path** is configured in the preferences.
27
+
By default, the esp-clang toolchain is installed as a part of the ESP-IDF tools installation process, and clangd ``Path`` is configured in the preferences.
25
28
26
-
The **Drivers** path and **--compile-commands-dir** path will be configured based on the selected target (esp32, esp32c6 etc.) and the project you're building.
29
+
The ``Drivers`` path and ``--compile-commands-dir`` path will be configured based on the selected target (esp32, esp32c6, etc.) and the project being built.
27
30
28
31
However, if there are any issues in configuration, this can be configured in the following way:
29
32
30
-
1. Go to `Window` > `Preferences` > `C/C++` > `Editor(LSP)`
31
-
2. Navigate to `clangd` node
32
-
3. Provide `Drivers` path as shown in the screenshot.
33
-
4. Set `--compile-commands-dir=/project/build` in the additional argument section.
34
-
5. Click on `Apply and Close`.
33
+
1. Go to ``Window`` > ``Preferences`` > ``C/C++`` > ``Editor(LSP)``.
34
+
2. Navigate to ``clangd`` node.
35
+
3. Provide ``Drivers`` path as shown in the screenshot.
36
+
4. Set ``--compile-commands-dir=/project/build`` in the additional argument section.
If you are seeing the following error markers while navigating to the esp-idf components source code:
54
+
If you see the following error markers while navigating to the ESP-IDF component source code:
52
55
53
56
.. code-block:: none
54
57
@@ -59,34 +62,34 @@ If you are seeing the following error markers while navigating to the esp-idf co
59
62
60
63
Please follow the steps below to fix it:
61
64
62
-
1. Download the script for `fix_compile_commands.py <https://github.com/espressif/idf-eclipse-plugin/tree/master/resources/fix_compile_commands/fix_compile_commands.py>`_.
65
+
1. Download the script for `fix_compile_commands.py <https://github.com/espressif/idf-eclipse-plugin/tree/master/resources/fix_compile_commands/fix_compile_commands.py>`_.
63
66
64
-
2. Invoke the script from the project post build step. Here is example for `CMakeLists.txt <https://github.com/espressif/idf-eclipse-plugin/blob/master/resources/fix_compile_commands/CMakeLists.txt>`_:
67
+
2. Invoke the script from the project post build step. Here is example for `CMakeLists.txt <https://github.com/espressif/idf-eclipse-plugin/blob/master/resources/fix_compile_commands/CMakeLists.txt>`_:
0 commit comments