I'm setting up Doom Emacs, and I want to remove flycheck entirely. I'm having a bit of trouble doing that, though.

As an example, I'm working with Ruby, with this setup:

  :completion  company
  :tools       lsp
  :lang        (ruby +rails +rbenv +lsp)
  ;; etc.

So far I have:

  1. disabled the :checkers syntax module from my init.el

  2. disabled the flycheck package in my packages.el

    (package! flycheck :disable t)
  3. turned off a number of related lsp-mode features

    (setq-hook! lsp
      lsp-diagnostics-provider :none
      lsp-ui-sideline-enable nil
      lsp-modeline-diagnostics-enable nil
      lsp-modeline-diagnostics-enable nil
      lsp-signature-render-documentation nil
      lsp-enable-symbol-highlighting nil
      lsp-headerline-breadcrumb-enable nil)

With all of that in place, flycheck initially seems deactivated. However, after a file has been open for some amount of time, it appears that LSP is reactivating flycheck, including bringing back all of the squiggly underlines, the modeline "diagnostics," etc.

When I remove all references to lsp from my init.el, then indeed flycheck goes away entirely—but, of course, that's not ideal, as I'd like to use LSP.

1 Answer 1


I figured it out—it turns out that setq-hook! sets the variables in the wrong scope. When I switched to a more general use-package! declaration for LSP, it started working perfectly.

(use-package! lsp-mode
  ;; Need to repeat this line from the Doom lsp module
  ;; declaration to keep it from eager-loading:
  :commands lsp-install-server

  (setq lsp-diagnostics-provider :none
        lsp-ui-sideline-enable nil
        lsp-modeline-diagnostics-enable nil
        ;; etc.
  • Could this applied for the normal emacs?
    – alper
    Commented Feb 9, 2022 at 17:38
  • 1
    @alper This syntax comes from use-package, which you can certainly use in vanilla Emacs. (Note that use-package! is a Doom-specific wrapper—normally you'd just call it with use-package.) Otherwise, just put the (setq ...) expression where you put your other lsp-mode setup.
    – Violet
    Commented Feb 10, 2022 at 0:30

Your Answer

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

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