I want to use sublime text as my c++ editor.
I added LSP-clangd in the editor. I generate some compile_commands.json
and clangd works on almost every files in my project but not with cuda files.
I saw in clangd FAQ that we must ensure :
- that our editor plugin is enabling clangd when CUDA files are open (e.g. enabling for extension *.cu). I didn't found any parameters in LSP-clangd settings to add some file extensions.
- make sure that clangd understands these are CUDA files (e.g. by extension *.cu or adding the clang flag -xcuda). Where should I add these flags? In
compile_commands.json
? - set the path to your cuda installation if it isn’t detected, by adding the clang flag --cuda-path=... Where should I specify this path? I tried using command
clang --cuda-path=my/cuda/path
but it returns meclang: error; no input files
Have you any idea to solve one of these 3 problems ? or did someone suceed to use cuda with clangd in sublime text ?