espressif / idf-eclipse-plugin

Espressif-IDE (based on Eclipse CDT) for ESP-IDF CMake based projects 4.x and above
Eclipse Public License 2.0
295 stars 115 forks source link

Wrong file perspective on ESP projects. (IEP-1256) #987

Closed viteo closed 2 weeks ago

viteo commented 2 weeks ago

Describe the bug Source and Header files in Eclipse or Espressif-IDE does not recognised as c/c++ files in ESP projects only. Key bindings, formatting and color theme does not correspond to the settings and uses some other configuration (checked both project and global settings for key bindings and formatter). Any other type of c/c++ project created in IDE works as intended.

To Reproduce I've installed latest Espressif-IDE and Eclipse plugin on my machine and on clean VM, same behaviour in all four cases.

Screenshots image image Same situation with Eclipse plugin on both systems

Espressif-IDE Product Information: Espressif-IDE Version: 3.0.0 Build id: 20240605-1941 Eclipse IDE Version: 2024-06 (4.32.0) Build id: 20240606-1231 ESP-IDF 5.2.2

viteo commented 2 weeks ago

everything was working perfectly until I checked for updates for the first time since 2023. "if it works - don't touch" (c)

viteo commented 2 weeks ago

found out that this is somehow related to LSP Indexer or something. Is is possible to disable it and revert to CDT Indexer?

viteo commented 2 weeks ago

frustrating when you don't know how to configure the basics image same for font coloring, etc can't set default editor for .c .h files in ESP projects as CDT Editor

viteo commented 2 weeks ago

Ok, looks like you have to look at the "Category" column for this new system image Ok, now after a lot of trial and error, I got my bindings back.

Now, how to edit the formatting rules? As I understand it, now it is in 'TextMate' category. (TextMate is a free and open-source general-purpose GUI text editor for macOS ??? ) image How to edit it, or where to find other configurations. My google-fu doesn't give me any result so far. How to change intendation rules and so on?

Some documentation on this would be good. Please.

viteo commented 2 weeks ago

good, after some investigations, i fugured out that now formatting rules is configured via .clang-format file, that you should place in the project folder. generate this file with clang-format clang-format -style=webkit -dump-config > .clang-format edit this file as you need and put in the project folder. i was sooo behind of this all. and the last one thing: how to edit coloring scheme?

viteo commented 2 weeks ago

coloring schemes is in Properties -> TextMate -> Theme in css files. Original files are here one may copy-edit-add theme to TextMate themes. and then right-click in editor on your code ... image

this whole story is so frustrating.

viteo commented 2 weeks ago

p.s. i've reverted to https://dl.espressif.com/dl/idf-eclipse-plugin/updates/com.espressif.idf.update-2.12.1.zip you may pick this, just do not upgrade. https://github.com/espressif/idf-installer/releases/download/espressif-ide-2.12.1-esp-idf-5.2/espressif-ide-setup-2.12.1-with-esp-idf-5.2.exe I'll be back when things are less messy.