When I installed doom emacs, I added lsp, c and c++ support and other things to init.el. When I started writing code in C, after adding the header file, auto completion advised me to add a comment to the code and other strange things. What could this be related to?
Sounds like expected behavior. Many LSPs have style checkers that warn you if you deviate from good practices (documenting functions, commenting headers, etc). You can almost certainly disable these things, but this would depend on which language server you’re using