1

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?

4

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, privacy policy and cookie policy

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