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
clangd-based projects often use compilation databases for definition linking.
The most convenient setup to set up for developing firmware for arduino-based microcontrollers in neovim currently is to have a workflow also including lspconfig, arduino-language-server, clangd and arduino-cli. However, this does not work so well, as the library linking during editing is not fully there , so the workflow gets disrupted by not working goto_definition functionality and code completion.
If you want to have this obligatory functionality working, you would have to ditch the arduino-language-server and move to compilation databases generated by arduino-cli or platformio.
However, both lack the feature to link a complete set of system libraries, so the issue persists on the alternatives.
E.g.: If you try to #include <stdlib.h> in any file, it will not be found during code editing. I have not yet confirmed if the code generated by arduino-cli even works using this setup, but, looking at these issues, I have very little hope.
The workaround used by Visual Studio (and potentially the arduino IDEs) generates their own files to link everything, but their approach could change and is not processed by clangd (as it should be!).
Apparently, a workaround currently exists, but is imo difficult to setup (as I have not succeeded in doing so) and is, well, only a workaround.
arduino-cli compile -b arduino:sam:arduino_due_x --only-compilation-database --build-path=$PWD/build - does not link to all libraries used to compile the project
Describe the request
clangd-based projects often use compilation databases for definition linking.
The most convenient setup to set up for developing firmware for arduino-based microcontrollers in neovim currently is to have a workflow also including lspconfig, arduino-language-server, clangd and arduino-cli. However, this does not work so well, as the library linking during editing is not fully there , so the workflow gets disrupted by not working goto_definition functionality and code completion.
If you want to have this obligatory functionality working, you would have to ditch the arduino-language-server and move to compilation databases generated by arduino-cli or platformio.
However, both lack the feature to link a complete set of system libraries, so the issue persists on the alternatives.
E.g.: If you try to #include <stdlib.h> in any file, it will not be found during code editing. I have not yet confirmed if the code generated by arduino-cli even works using this setup, but, looking at these issues, I have very little hope.
The workaround used by Visual Studio (and potentially the arduino IDEs) generates their own files to link everything, but their approach could change and is not processed by clangd (as it should be!).
Apparently, a workaround currently exists, but is imo difficult to setup (as I have not succeeded in doing so) and is, well, only a workaround.
related issues:
#1286
Softmotions/acdb#2
Describe the current behavior
arduino-cli compile -b arduino:sam:arduino_due_x --only-compilation-database --build-path=$PWD/build
- does not link to all libraries used to compile the projectArduino CLI version
arduino-cli Version: 0.35.3-arch Commit: 95cfd65
Operating system
Linux
Operating system version
6.8.9-4-cachyos
Additional context
No response
Issue checklist
The text was updated successfully, but these errors were encountered: