Of course, start with reading https://www.kernel.org/doc/html/latest/process/coding-style.html
Install YCM by
cd ~/.vim/pack/*/start/
git submodule add https://github.com/ycm-core/YouCompleteMe
or
git clone https://github.com/ycm-core/YouCompleteMe
Get compile_commands.json for kernel by
make -j8 compile_commands.json
Thanks to Tom Roeder and Masahiro Yamada for creating and maintaing such a beauty.
Enjoy