I want to write some code on Arduino esp32 core with nvim as text editor so I setup Arduino language server through mason, I had tested with a fqbn arduino:avr:uno sketch and no lsp errors show up. Now I changed the fqbn in sketch.yml to esp32:esp32:esp32 and added the platform_index_url field. Then lsp shows that there's no matching member function for call to 'println', but the auto-completion works fine.
I spend a day finding a solution but not come across with anything.
Note that the sketch compiles and uploads to the board successfully.
Setup:
nvim version: 0.11.3
arduino-cli version: 1.2.2
System OS: Arch Linux
Select the "Preferences: Open Settings (UI)" command from the menu. ⓘ You can scroll down through the list of commands to find it, or type the command name in the field.
A "Settings" tab will open in the Arduino IDE main panel.
Type arduino.language.realTimeDiagnostics in the "Search Settings" field of the "Settings" tab.
Check the box under the "Arduino › Language: Real Time Diagnostics" setting.
Close the Preferences tab by clicking its X icon.
Open or create a sketch that contains a Serial.println call, such as the sketch @archurrito shared.
Press the Ctrl+Shift+P keyboard shortcut (Command+Shift+P for macOS users) to open the "Command Palette".
Select the "View: Toggle Problems" command from the menu.
Select Tools > Board > esp32 > ESP32 Dev Module from the Arduino IDE menus.
Wait for Arduino Language Server to finish processing the sketch code, the progress of which is indicated by the "Building sketch" and/or "indexing" messages at the left side of the status bar at the bottom margin of the Arduino IDE window.
You should now see the message in the "Problems" panel at the bottom of the Arduino IDE window:
No matching member function for call to 'println' clang(ovl_no_viable_member_function_in_call) [Ln 11, Col 3]
I'll attach the file from post #4 here in order to make it more accessible to the forum helpers, and to prevent the bit rot that often results from a reliance on files hosted externally: