From 680eb01f56c0ec098cd0e0ef1d0aa7d91a4f98dc Mon Sep 17 00:00:00 2001 From: Denys Almazov Date: Fri, 18 Oct 2024 11:23:02 +0300 Subject: [PATCH 1/2] Update README.md --- README.md | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/README.md b/README.md index 0db9503a3..2d9f7119d 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ To get a quick understanding of ESP-IDF and Eclipse plugin features, check our s Other IDE Features * [ Configuring the Project using sdkconfig Editor](#projectconfigure)
+* [ LSP Editor](#lspeditor)
* [ CMake Editor](#cmakeproject)
* [ ESP-IDF Application Size Analysis Editor](#sizeanalysiseditor)
* [ Installing ESP-IDF Components](#espidfcomponents)
@@ -260,6 +261,65 @@ To launch the SDK Configuration editor: ![](docs_readme/images/13_sdkconfig_editor.png) + +# LSP Editor +Starting with Espressif IDE 3.0.0, the default code editor is the LSP Editor, which differs in several ways from the previous default editor. Below are the most notable differences: + +## Formatting +To customize the formatting, open the .clang-format file located in your project. By default, the file contains the following content: + +``` +BasedOnStyle: LLVM +UseTab: Always +IndentWidth: 4 +TabWidth: 4 +PackConstructorInitializers: NextLineOnly +BreakConstructorInitializers: AfterColon +IndentAccessModifiers: false +AccessModifierOffset: -4 +``` +You can also disable formatting for specific folders by using the `DisableFormat: true option.` For example, if you want to disable formatting for the managed_components folder in a project structured like this: +``` +project + - managed_components + - .clang-format + - main + - .clang-format +``` +Add the `DisableFormat: true` option to the `.clang-format` file located in the managed_components folder. This flag tells ClangFormat to completely ignore this specific `.clang-format` file and its formatting rules within the managed-components directory. + +For more information about available style options, refer to [the Clang-Format Style Options guide](https://clang.llvm.org/docs/ClangFormatStyleOptions.html#configurable-format-style-options). + +## Search +The “search text” option in the right-click menu is currently unavailable in the LSP-based C/C++ Editor. However, you can use the toolbar menu **Search > Text > Workspace** as a workaround. + + +## Inlay Hints +The LSP Editor has inlay hints enabled by default. If you prefer not to use them, you can disable this feature by editing the `.clangd` file: +``` +CompileFlags: + CompilationDatabase: build + Remove: + - -m* + - -f* + +InlayHints: + Enabled: No +``` +## Searching ESP-IDF Components +To browse ESP-IDF components, follow these steps: +- Create a new project. +- Add the ESP-IDF components folder as a virtual folder to the newly created project. +- Press **Ctrl + Shift + T** or **Ctrl + Shift + R**. +- You should now be able to browse the ESP-IDF component files. +- To search for a specific function or keyword, use the Search menu in the toolbar. + +Creating a Virtual Folder +- Navigate to **New > Folder.** +- Click on **Advanced.** +- Select **Link to alternate Location (Linked Folder)**. +- Click **Browse** and select the `ESP-IDF components` folder. + # CMake Editor From e889a0710c79da6220ac66c8cb1651bef6dba75d Mon Sep 17 00:00:00 2001 From: Kondal Kolipaka Date: Tue, 29 Oct 2024 18:06:24 +0530 Subject: [PATCH 2/2] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 2d9f7119d..ed3d26830 100644 --- a/README.md +++ b/README.md @@ -320,6 +320,8 @@ Creating a Virtual Folder - Select **Link to alternate Location (Linked Folder)**. - Click **Browse** and select the `ESP-IDF components` folder. +It is recommended to always create a new project instead of modifying your current one to avoid unnecessary Git files and error markers created by the indexer for the components folder. As both the projects will be in the same workspace, you should be able to search anywhere within your workspace. + # CMake Editor