C++ LSP
#2
It can sometimes be a bit finniky, but Daniel and I both have working LSP integration. I use helix (https://helix-editor.com/), Daniel uses VS Code. I don't think either of us has had to change CMAKE_EXPORT_COMPILE_COMMANDS; my understanding is that something in esp-idf ends up enabling this for us anyway.

The main thing I had to do was pass `-query-driver=**` to clangd. My `.clangd` file in the root of the esp32 firmware directory looks like this:


Code:
CompileFlags:
  Add: [
    -D__XTENSA__,
    --target=mipsel-linux-gnu,
  ]
  Remove: [
    -fno-tree-switch-conversion,
    -mlongcalls,
    -fstrict-volatile-bitfields,
    -fno-shrink-wrap,
  ]



(this is all written up here as well: https://codeberg.org/cool-tech-zone/tang...angd-setup)

Daniel might also have things to add that he's had to do to get things working.
  Reply


Messages In This Thread
C++ LSP - by redshift - 2025-01-07, 12:36 AM
RE: C++ LSP - by jacqueline - 2025-01-07, 01:59 AM
RE: C++ LSP - by redshift - 2025-01-07, 04:45 AM
RE: C++ LSP - by jacqueline - 2025-01-07, 09:23 PM
RE: C++ LSP - by redshift - 2025-01-07, 09:32 PM

Forum Jump: