clangd config for ide integration#37
Conversation
compile_flags.txt gives clangd the compile flags this one gives it the include directories, letting it perform code completion, linting, etc.
this commit disables transitive include errors
Claegtun
left a comment
There was a problem hiding this comment.
Do these files only affect vscode, not the actual compiling of the binary in CubeIDE?
Yeah, both .clangd and compile_flags.txt are files specific to clangd (the language server, not to be confused with clang, the compiler) |
I dont like the idea of suppressing errors. They should be addressed, rather than being ignored. Either leave them alone or actually solve the errors. If something actually goes wrong and the error messages could have told us something about it, it could lead people to waste lots of time |
|
I definitely agree, and I'm glad you mentioned it actually, because when I wrote those it was giving me a bunch of errors that seemed unavoidable due to not being in the stm32cubeide environment, but I've tried removing the lines just now, and I'm not getting any errors at all, so I think I actually solved the errors in a later commit by providing the proper defines in compile_flags.txt (specifically STM32H753xx). |
adds files (compile_flags.txt, .clangd) to configure clangd so that the clangd extension can be used in vscode (or anywhere with clangd support) for code highlighting, code completion, etc.
the config also does the following:
currently, it uses the default compiler installed on the user's machine, not the target architecture (arm) compiler, for simplicity and so that each user doesn't have to install the cross-compiler