build kernel with Clang (you may have to answer clang-related questions, e.g. KMSAN, stask init, etc...):
cd ~/src/linux
make CC=clang
generate compile_commands.json:
python3 ./scripts/clang-tools/gen_compile_commands.py
start nvim
in a kernel source dir and wait for indexing completion.
good luck, have fun!