I generated a cpp project named keyboard with pico-project-generator.
Using cmake 3.27.4 with
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
, to generate a compile_commands.json for use with clangd (in my case with eglot on emacs).
For the file `keyboard.cpp -I/usr/include/newlib is missing, but it's there for other files such is irq_handler_chain.S and most if not all other .S files.
This causes code completion not to work correctly.
I have been unable to find the cause of this, but worked around it using:
set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES /usr/include/newlib)