- Disable or uninstall the official
C/C++ plugin. - Install the
clangdplugin. - Build the kernel with
clang:
/path/to/kernel_source$ make CC=clang defconfig
/path/to/kernel_source$ make CC=clang -j16
- Generate the
compile_commands.json:
/path/to/kernel_source$ python ./scripts/clang-tools/gen_compile_commands.py
If no error occures, you will find compile_commands.json in /path/to/kernel_source/.
- Configure the
clangdplugin with the following parameters:
- Open any
Cfile in kernel source and enjoy it :)

