Every now and then lsp-mode is adding a header to the C source code I'm working on.
How can this functionality be disabled?
Maybe this is a bit late, but I'm also annoyed by this problem and clangd seems to have trouble working with multiple files. You can use lsp-clients-clangd-args
to configure your clangd. Add the following:
(setq lsp-clients-clangd-args
'("--header-insertion=never"))
For more flags, see clangd --help
.