2

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?

1 Answer 1

6

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.