I just installed Doom Emacs. The version on the screen is DOOM v3.0.0-pre. I wanted to setup the relative line number setup. I put (setq doom-line-numbers-style 'relative) in config.el, exit out, and ran 'doom sync'. Every time i open the config.el or init.el for that matter, i get "failed to load doom. Profile init hasn't been generated. Did you forget to run 'doom sync'" message on top of the screen. Am I using the wrong version of Doom?
How can I fix this error?

1 Answer 1


For some variables configuration, you don't need to sync; this is needed when to add/modify packages, usually there must be a corresponding modification in file packages.el in your doom.d folder.

Searching for variable doom-line-numbers-style reveals nothing, there is a local variable doom--line-number-style however, but this should not be used.

Quoting from docs/faq.org file:

To change the style of line numbers, change the value of the ~display-line-numbers-type~ variable. It accepts the following values:

  • t normal line numbers

  • 'relative relative line numbers

  • 'visual relative line numbers in screen space

  • nil no line numbers

and in your config.el file:

(setq display-line-numbers-type 'relative)

If you need to live revert to other style, there is the function doom/toggle-line-numbers (call it with M-x).

  • I think one of the issue was that i was running the emacs version 27 with doom emacs. i've uninstalled the emacs using the apt and downloaded the source for version 28 and built it. Still getting the error message to run 'doom sync' but the display-line-numbers-type 'relative is working now along with other changes i've made. Thank you.
    – ThomasDKim
    Aug 1, 2023 at 15:44
  • You must run the command doom doctor to see what is wrong - maybe post all messages from that command and someone else will be able to suggest some corrections.
    – Ian
    Aug 2, 2023 at 8:02

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.