-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preferences -> C/C++ -> Editor (LSP) -> clangd: The currently displayed page contains invalid values. #441
Comments
HI @joaopedrotaveira Thank you for trying out the pre-release of Eclipse CDT. This is very much appreciated! I notice in your stack trace it has "com.espressif.idf.lsp.preferences.IDFClangdPreferredOptions.clangdPath(IDFClangdPreferredOptions.java:30)" which implies you obtained this, in part, from Espressif. Can you explain how to reproduce your setup? Did you update the Espressif IDE to the pre-release of Eclipse CDT? |
I'm having a look at the class with the error and that code is only for the previous version of CDT. The pre-release of Eclipse CDT + Eclipse CDT-LSP requires that Espressif update their code to work with the latest version. The refactored code is in #410 (comment). In the meantime, I do encourage you to test out the pre-release of Eclipse CDT, but you'll have to test it out without the Espressif plug-ins until they make an update. I have added to the previously raised espressif/idf-eclipse-plugin#1127 this issue. |
Hi @jonahgraham My setup is based on Eclipse IDE for C/C++ Developers. I might installed the IDF plugin in the past. This is what shows up on “About Eclipse”:
Expressif -> Product Information:
|
Hi @joaopedrotaveira - if you can uninstall the IDF plugin hopefully it will start working as expected. You may find it cleaner to create a new install for testing the pre-release. Thanks again for taking the time to test and and report back your findings. With any luck IDF plugins can be updated soon so they continue to work with the upcoming release. |
Hi @jonahgraham The IDF plugin was uninstalled very quickly. The LSP started working but the experience is not what I expected. I’m still used to classic experience. Using the LSP editor with a common autoconf-tools project, everything works perfectly. When I try to use a project which was configured by platformio under the hood, the references between included files doesn’t work as I would like to. I might be doing something wrong or the “Path and Symbols” project settings might not being passed to clang server. I don’t know, this is my first time. But it works now. Thank very much. |
Thanks for that @joaopedrotaveira The classic experience is going to be around for a long time still. The LSP experience is most suitable for users who are reaching the limits of the classic editor, most acutely for those users on the most recent C++ standards. The specific feedback on project types is very helpful, and I am delighted to hear the autoconf one worked out of the box. My immediate guess on the platformio one is the same as you - that clangd can't find some of the paths. Configuring clangd to find everything the most successfully involves having the builder generate a compile_commands.json file that clangd knows how to read. We are looking at whether we can generate compile_commands.json for tool chains that don't do it natively. Would you know of a good tutorial/example project that can demonstrate how platformio is setup best in Eclipse CDT to see if we can make sure that flow works well in the future with CDT LSP editor? Thanks! |
Hi
$ mkdir -s /tmp/platformio-blink-test-1
$ cd /tmp/platformio-blink-test-1
$ platformio project init --board esp32-s3-devkitc-1 --ide eclipse
/**
* Blink
* Turns on an LED on for one second,
* then off for one second, repeatedly.
*/
#include "Arduino.h"
void setup()
{
// initialize LED digital pin as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
void loop()
{
// turn the LED on (HIGH is the voltage level)
digitalWrite(LED_BUILTIN, HIGH);
// wait for a second
delay(1000);
// turn the LED off by making the voltage LOW
digitalWrite(LED_BUILTIN, LOW);
// wait for a second
delay(1000);
}
$ ls -a
.
..
.cproject
.gitignore
.pio
.project
.settings
include
lib
platformio.ini
src
test
|
@joaopedrotaveira Thank you for the steps - I have extracted that and added some analysis in #443 |
Hi,
The new banner showed up to try new Editor (LSP) but I can’t get it to work.
The text was updated successfully, but these errors were encountered: