/r/DoomEmacs

Photograph via snooOG

A Reddit for Doom Emacs: a configuration framework for GNU Emacs.

This community is for discussing features, issues, questions, and more related to the Doom flavor of Emacs

/r/DoomEmacs

5,780 Subscribers

1

Why is text highlighting only working for some languages that I have configured?

This is most likely a very simple question, however I am unable to find the answer on my own, and would appreciate some help. In doom/init.el I have for instance uncommitted python from the list, which highlights the syntax correctly in python files. However even after I have uncommented rust and gdscript (and doing doom/reload) files using those languages still appear without any highlighting. I don't really see what I am doing wrong here, as some other languages other than python were also able to work correctly from me simply uncommenting them from the init.el file. Do I have to do something extra to make rust and gdscript work?

I don't know if this is relevant at all, but figured I should mention it just in case: I tried both just having "gdscript" and "(gdscript +lsp)" in the init file, however neither worked.

1 Comment
2025/02/03
15:27 UTC

2

I can type d to see diff between buffer and file on disk when attempting to close Emacs, but now when attempting to close the buffer only (see screenshot)

https://imgur.com/a/VvzJd8W

Any way to enable more options when trying to close the buffer without having to rewrite the code somewhere else ? https://in.comum.org/smart-way-to-close-files.html

Thanks

1 Comment
2025/02/03
12:26 UTC

2

How can I unbind org-cycle from TAB in insert state ?

TAB and S-TAB trigger org-cycle in org-mode.

I find it very annoying in insert state, since it is quite a workflow interruption when you hit it by mistake, and, to me, a main point of modal editing is to focus on editing while in insert state.

Anyway, I have been using Doom for a bit under a year, and, except some very specific modes like org-agenda or gptel among others, I have been able to modify Doom bindings with 'relative' ease, but I cannot remove this one. Even worse, I got some unexpected behavior with the code I added:

Now, when I press TAB in insert mode at the begining of a line, it runs what I believe is the tab-to-tab-stop command, and when in the middle of a word/sentence, it indents the parent header. I have no sign of those changes with describe-key, it actually looks like the modifications are working...

This is what I settled for after many attempts/variations:

```

(map! :after (evil org)

:map org-mode-map

:i "TAB" nil

:i "<tab>" nil

;; :i "<tab>" #'tab-to-tab-stop

:map evil-org-mode-map

:i "<tab>" nil

:i "TAB" nil)

```

Any help would be appreciated, thanks for your time.

0 Comments
2025/02/02
17:29 UTC

2

All third party themes I install break org list faces

I am trying to use non doom themes, but any theme I install and try has the same problem:

The org list markers (`-`, `+`, `1.`, `a.`) are invisible when I load any of them.

Those markers show the following faces whether I am using a Doom theme or not:

face (org-list-dt org-indent)

`org-indent` is supposed to hide characters and as far as I understand is meant for the org headers leading stars. However, when loading a third party theme, `org-indent` takes over and makes org lists illegible.

When using a Doom theme, faces appear to be exactly the same, but `org-list-dt` is used to highlight the markers.

There must be a loading sequence issue because I found out that third party themes actually work as expected in the specific case where I run `doom/restart-and-reload` with an org file focused in the current window. In that case, it works but I cannot figure out why. I tried delaying the theme loading in many ways using varitions of `after!`, but nothing changes the outcome.

I am trying to use `ef-themes`, but I tried `modus-themes`, and half a dozen available themes in Melpa like `catpuccin` among others. I consistently get the same results.

I tested with a 'minimal' config file, only leaving my keybindings and user info, and I am completely running out of ideas. Knowing if anyone else is affected by this problem would be a great help.

Thanks for your time.

===== Workaround =====

I am sharing an acceptable workaround I finally settled for. It simply consists in overriding the `org-indent` face with `org-list-dt`. It is however a trade-off, and involves giving up on a few org 'prettification' options:

  1. Outline indentation looks weird because of star placeholders used by Org and hidden by org-indent face which now shows additional white stars at the beginning of header lines,
  2. Hiding leading stars suffers from the same side effect
  3. If leading stars are shown, `org-superstar` does not make much sense anymore.

For me, it is not a big deal because I have been meaning to remove 'prettification' packages for a while now as it accounts for more than 50% of loading performance costs according to the Emacs profiling tool which is significant on big files like a literate config for example. Without `org-superstar` and indent, hiding leading stars does not make much sense to me. It does feel weird at first (but so does a new theme), but I have already gotten used to it.

Note that removing org-indent altogether works without additional config tweaks, but I cannot give up on org list indentation (use `org-mode-hook` to do so).

What I added to my config (I am sorry if I am not using code blocks, but I cannot get used to reddit editor, and it won't respect line breaks when I paste from Emacs):

```

(after! org

;; Should turn off outline contents indentation altogether

;; Does not seem to have any effect on Doom though...

;; (setq! org-indent-mode-turns-off-org-adapt-indentation t)

;; Set header sections indentation (0 to disable)

;; This removes outline placeholders used to indent headers

;; It looks weird when overriding org-indent face in Doom so

;; third party themes list markers remain visible.

(setq! org-indent-indentation-per-level 0)

;; Control org headers stars visibility

;; (Looks better turned off when outline indentation is disabled)

(setq! org-indent-mode-turns-on-hiding-stars nil)

(setq! org-hide-leading-stars nil)

)

```

3 Comments
2025/02/01
09:10 UTC

1

Side Panel...

When I click the Discord link, it asks me to verify an email address. Mine gets filled in automatically but then it says, I'm already registered with that email... I know that... I want to join the Discord. Maybe an invite link would be more appropriate?

0 Comments
2025/02/01
05:48 UTC

2

Doom eMacs with sly / lisp broken ?

I thought I would try out doom emacs instead of my plain vanilla configuration. I installed it in Mac OS ( with emacs-plus) , uncomment “common lisp” in the init.el and did a “doom sync” . Then when I run it and load a .lisp file , sly tries to connect and then numerous errors get printed and there is no connection to sly. Anyone have the same issue ? I’m not sure anyone is using the Common Lisp configuration so maybe I should abandon.

4 Comments
2025/01/31
19:13 UTC

2

Configuration Recommendations for React Project

Hi Everyone, I am working on a React Typescript Project based on Vite and I was hopeful you could guide me what packages and configuration do I need as per my requirements:

=> Autocomplete for TSX files

=> Autocomplete for CSS modules

=> Recommended LSP to use for React

7 Comments
2025/01/28
10:13 UTC

0

How to install DoomEmacs on Nix os?

I have recently switched to nixos from popos. I had been using org mode to take notes and make Todos. how can I install doom emacs on nixos? I am using home-manager and have managed to install emacs but can't understand how to install doomemacs on it. Any help would be appreciated.

2 Comments
2025/01/27
12:09 UTC

1

Eager macro-expansion failure; file missing

I just got an error out the blue:

```

Unexpected error in Doom's core: list/doom-keybinds.el, (error Eager macro-expansion failure: (file-missing "Cannot open load file" "No such file or directory" "pp"))

```

Any ideas on what went wrong, or what I need to do to remedy this?

0 Comments
2025/01/27
05:40 UTC

5

Do you have advice for a new Emacs and new DoomEmacs user in relation to keyboard shortcut discovery?

I find that most Emacs books and guides online list shortcuts for vanilla Emacs. Do you have a goto website/guide/book, where shortcuts are Evil/DoomEmacs ? I noticed a lot of pages in the DoomEmacs manual are not written, either empty placeholders or links to no page.

10 Comments
2025/01/24
17:05 UTC

3

Don't nag about installing a language server (copilot-ls)

Hi all.

I use web-mode to edit Laravel blade templates (.blade.php extension). I don't want to use LSP on these files so I added this snippet to my config.el file to prevent LSP from starting when I edit them:

(pushnew! lsp-language-id-configuration '(web-mode . ""))

It worked fine until recently.

Now, whenever I open a file in web-mode it asks me to install a language server. It says:

Unable to find installed server supporting this file. The following servers could be installed automatically:

and presents me with a list with only one choice: copilot-ls.

How can I stop this and get the old behavior back?

I'm using Doom Emacs so not really sure if this is something specific for doom or lsp-mode in general.

Thanks in advance.

1 Comment
2025/01/24
09:41 UTC

3

For users of affe.el getting errors from consult all of a sudden.

Affe stopped working for me recently with it's latest update. There were changes made to accommodate the latest version of Consult which Doom isn't using yet. In the meantime, to get Affe working again, here's what fixed it for me:

In packages.el I had to pin the previous commit of affe like so:

(package! affe
 :pin "a9ed240"
 :recipe (:host github :repo "minad/affe"))
1 Comment
2025/01/21
03:34 UTC

3

Trying to install doom emacs but a lot of weird errors

Hello Everyone! I keep trying to install doom emacs on arch linux and i get this output everytime

Installing Doom Emacs!

✓ Created ~/.config/doom/

- Creating ~/.config/doom/init.el...

✓ Done!

- Creating ~/.config/doom/config.el...

✓ Done!

- Creating ~/.config/doom/packages.el...

✓ Done!

Generate an envvar file? (see `doom help env` for details) (y or n) y

> Generating envvars file

✓ Generated ~/.config/emacs/.local/env

> Installing plugins

> Installing straight...

x The package manager threw an error

x Last 16 lines of straight's error log:

$ cd /home/zakky/.config/emacs/.local/straight/repos/melpa/

$ git submodule update --init --recursive

[Return code: 0]

$ cd /home/zakky/.config/emacs/.local/straight/repos/

$ git clone --origin origin --no-checkout https\://git.savannah.gnu.org/git/emacs/nongnu.git /home/zakky/.config/emacs/.local/straight/repos/nongnu-elpa/ --depth 1 --single-branch --no-tags

Cloning into '/home/zakky/.config/emacs/.local/straight/repos/nongnu-elpa'...

fatal: unable to access 'https://git.savannah.gnu.org/git/emacs/nongnu.git/': Empty reply from server

[Return code: 128]

$ cd /home/zakky/.config/emacs/.local/straight/repos/

$ git clone --origin origin --no-checkout https\://git.savannah.gnu.org/git/emacs/nongnu.git /home/zakky/.config/emacs/.local/straight/repos/nongnu-elpa/ --no-single-branch

Cloning into '/home/zakky/.config/emacs/.local/straight/repos/nongnu-elpa'...

fatal: unable to access 'https://git.savannah.gnu.org/git/emacs/nongnu.git/': Empty reply from server

[Return code: 128]

$ cd /home/zakky/.config/emacs/.local/straight/repos/nongnu-elpa/

$ git branch -r

[File error while Setting current directory]

Opening output file: No such file or directory, /home/zakky/.config/emacs/.local/state/logs/cli.doom.250117191351.25260.error

2 Comments
2025/01/17
17:16 UTC

4

Doomemacs and org roam

Can anyone help me setup org roam and dooms emac it js very difficult and complex and help from any one would be highly appreciated……

2 Comments
2025/01/15
12:18 UTC

6

Doom Emacs keeps installing .doom.d directory in an unknown location (due to my non-admin account)

Hi there. Im Ardie. Ive been using Emacs for several. I started with Spacemacs many years ago. Im currently trying to install Doom Emacs on a remote machine, as I plan on "research" and write about it. Mostly becoz due to the nature of my work, which is mostly people with non-programming working in GIS. And the only software they use is Emacs, albeit very VERY vanilla. I plan to present about Doom Emacs.

Anyway, cut to the chase, I cant seem to install properly Doom Emacs. As it keeps installing in the wrong "home" folder. Im using non-admin remote Windows machine, it insists the existence of .doom.d, even when I removed, and no matter how many times I reinstall it.

- Skipping ~/.doom.d/ (already exists)....
  - Skipping ~/.doom.d/init.el (already exists)...

All the other path variables are set properly (emacs.exe, fd.exe...). Is there any way to specify to Doom Emacs to install .doom.d at a specific location

(Im using Emacs 28, I can switch to 29 no problem, if that solves the issue)

7 Comments
2025/01/10
03:03 UTC

1

Looking for advise to change a Vim key binding.

Hi Folks

Even after some years of use with Doom/Vim-bindings setup, my muscle memory from classic emacs for C-e for end-of-line is still bothering me.

It works as I expect in insert mode. In normal/command mode, it doesn't. It scrolls the buffer by one line which is a useless function for me.

How would I go about changing this? I have done some simple key-binding changes in the past. But this sounds like it may go deeper into multiple keymaps?

Advise welcome.

(I tried to create a login in the newly announced discourse. But it failed for some reason..)

EDIT: Ha, the Discourse announcement wasn't new. I just noticed it !

4 Comments
2025/01/07
18:33 UTC

3

Is savannah down?

I just tried to reinstall doom, and then I got this error message.
Yesterday the installation was just fine, but I needed to reinstall it bc of a little mistake I made. Suddenly it does not work anymore and doom wont open up. when I open emacs, only the GNU emacs appears.

fatal: unable to access 'https://git.savannah.gnu.org/git/emacs/nongnu.git/': The requested URL returned error: 502

    [Return code: 128]

At this point I don't know how to move on. Does somebody of you know a solution maybe ?
Running it on a Mac OS M1 Pro

2 Comments
2025/01/07
13:15 UTC

4

"Repository "gptel" has a dirty worktree"

This might be a very newbie question: I'm still getting used to Doom Emacs!

I was updating my emacs when I got this response for gptel, along with another package. (Wallabag)

Repository "gptel" has a dirty worktree
M test

     1) Abort
     2) Stash changes
     3) Discard changes (Choose this if unsure)

I chose (3) and continued along. Just for peace of mind, I did the update again. The other package didn't provide this same response, but gptel did, and continues to, every time I run 'doom upgrade.'

Dumb question: does this mean that I have gptel installed? Is this built in to Doom Emacs?

I haven't installed or utilized gptel or any LLM tech in any way, so I'm not sure what I could have done on my end to change anything.

7 Comments
2025/01/02
21:34 UTC

5

Emacs hangs randomly (MacOS)

I'm a total Emacs beginner and essentially a non-programmer. I recently installed Doom Emacs on my Macbook (using emacs-mac on MacOS Monterey, x86 architecture, Emacs 29.1) and am finding that it will lock up randomly with the spinning ball cursor for no discernible reason; sometimes a few seconds or minutes after opening, sometimes a half hour later.

I haven't installed any plugins aside from the Doom defaults, and Doom Doctor only gives me two warnings that don't seem important (one about my grep install not having PCRE lookaheads support and one about emacs not working with Keychain). The crashes don't seem to be caused by any specific keybind as they occur during basic text editing and even just on the splash screen.

Pressing C-g repeatedly doesn't do anything and I end up needing to force close the application. I'm not really sure how to go about debugging this and I can't find too much info on how to debug Emacs in general: Most freezes seem to be the result of faulty elisp plugins, but I'm just running the Doom defaults. Some people say to use the gdb debugger which I've installed but I honestly have no idea how to go about getting Emacs to run with it, let alone use it to actually debug anything.

Does anyone have any advice on how to resolve this issue? I'm unsure if it's an Emacs problem or a Doom problem, though I've seen a few issue threads that make it seem like it may just be a problem with MacOS Emacs in general.

15 Comments
2024/12/31
12:48 UTC

1

Error (python-mode-local-vars-hook): Error running hook "lsp!" because: (file-missing Cannot open load file No such file or directory lv)

SOLVED: doom sync --rebuild

I have this problem with Python files.

init.el

packages.el

Note that deleting the bottom lines (for pyright LSP) doesn't matter (after doom sync). The same error.
Is this a bug to be reported?

1 Comment
2024/12/30
22:45 UTC

4

Is it better to build Emacs from source or use the system package manager to install it?

I am new to emacs(doom emacs),I’m currently using Emacs 29.4 on Fedora, and I’m seeing this warning when running ./doom doctor

> Checking your Emacs version...
  ! Detected emacs-pgtk 29.4!
    If you are experiencing segfaults (crashes), consider downgrading to
    29.3 or upgrading to 30+. A known bug in 29.4 causes intermittent crashes. See doomemacs#7915 for details.

This warning suggests that the current version of Emacs is prone to crashes, and I’m wondering whether it would be better to build Emacs from source (possibly downgrading to 29.3 or upgrading to a 30+ version) or just use the system package manager (dnf in my case) to handle the installation and updates. Or should I just simply ignore the warning

Source to build from : https://github.com/emacs-mirror/emacs

5 Comments
2024/12/28
19:58 UTC

1

Unable to set evil-shift-width

Hi, I am trying to set the variable evil-shift-width to 4 as- (setq evil-shift-width 4). However, this does not make the change to that variable permanent. I have also tried using setq-default. That is not working as well.

Next, I tried this-

(after! org
  (add-hook 'org-mode-hook
            (function (lambda ()
                        (setq-default evil-shift-width 4)))))

This is not working as well and does not work after I restart emacs.

4 Comments
2024/12/28
11:18 UTC

0

Syntax highlighting not showing in org source block for sh.

I want to enable syntax highlighting for shell script code blocks in org file. However, there is no syntax highlighting even after enabling tree-sitter. However, there is syntax highlighting for shell script (.sh) files.
org-src-lang-modes has the sh variable set.

Also, src blocks shows syntax highlighting for other languages which I use.

Image link.

14 Comments
2024/12/28
07:35 UTC

4

Is there a way to make pyright less slow? I remember changing a setting for that in the past but I have no idea where it is.

I rely a lot on auto-complete/intellisense when coding. I have tried using pyright but I am having some problems with it. I want the auto-complete window to appear as quick as possible, however it takes 0.5 seconds of idling before it actually pops up. Since I rely on it so frequently that time does add up pretty quickly. I'm very new to Doom Emacs, so I don't really know how everything works yet, but I'm pretty sure that I remember changing some setting for how long the pyright window takes to pop up? I have tried looking around but I have absolutely no idea where I changed that setting. I'm not even sure if it actually works like this or if I am just misremembering.

I'm also wondering if there exists any alternatives to pyright, for if I were to code in another language, like for example Rust. Are there individual packages for each language, or are universal packages that work for every (or at last a lot of) languages a thing?

Thanks in advance!

5 Comments
2024/12/26
10:09 UTC

1

Key binding for my function invocation

Hi!

I have function in config.el (which works if i execute it with C-x-e), but i would like to run it with SPC-1 (press and release space, then press 1). My decision is not working obv

(defun
    hmmb
    ()
    (if (equal 1 max-mini-window-height)
        (setq max-mini-window-height nil)
        (setq max-mini-window-height 1)
     )
)

(map! :leader
      "1" #'hmmb)
2 Comments
2024/12/20
12:05 UTC

8

Do you still write Elisp (not for config) with Doom?

I haven’t found much utility in writing Elisp to do things besides very small functions a matter of 5-10 lines, and configuration of eMacs, just given how much effort it is relative to return, but I may just lack imagination or skill.

Do you find yourself writing substantial Elisp?

9 Comments
2024/12/19
22:58 UTC

12

Where can I find up-to-date changelists for what's happening in Doom?

Every once in a while, a doom upgrade causes something in my config to break, and often that's due to an old/deprecated package being replaced with a different one. In recent memory, company being replaced with corfu, highlight-indent-guides being replaced with indent-bars, and I'm currently searching for whatever has replaced drag-stuff.

It's not the end of the world, but each time this happens it usually takes me a little while to track down the culprit, and I thought there must surely be a changelog somewhere that I can search for the package name to see what the replacement is, but I haven't been able to find it so far!

Does something like that exist? How do folks here usually go about tracking down replacements for missing/broken packages?

7 Comments
2024/12/15
15:04 UTC

2

Doom emacs missing icons

I am totally new to Emacs and I want to learn. I have installed doom Emacs on arch wsl2. I've installed all-the-icons and nerd-fonts, but none of them solved the problem. Can someone help?

5 Comments
2024/12/09
22:14 UTC

6

Trouble converting 'use package' to 'package!' or 'use-package!'

Hi! I've been using doom emacs for a few years now but never really git to customising more than a couple of already packaged information.

I'm trying to setup equake following the project's readme but I'm having trouble with it.

My two problems :

  • I figured I should put the after! macro somewhere. But I'm not sure if it's after eshell or after equake
  • The other problem I'm having is that the equake-invoke command cannot run until after eshell is loaded a first time but I don't know how to make it load. My understanding is that doom lazy loads by default, since I start emacs as a daemon, I currently need to open a client and start eshell manually a first time which is not efficient.

Could someone give me pointers ?

1 Comment
2024/12/09
17:10 UTC

1

Opening a task from org agenda puts the cursor at the top of the file

Whenever I start emacs and see my org agenda, and press RET on a task to open it, the cursor is at the top of the file, which had the task. If I kill this file buffer and again select the task from the org agenda, the cursor still moves to the start of the file. However, if I don't kill the file buffer, and then open the task, the cursor is at the appropriate location of the file.

How can I solve this?

As a side note, my (only) agenda file has a lot of formatting errors; task body being displayed after org-ellipses for some headings. I think it started after I started refiling tasks to my agenda file.

4 Comments
2024/12/07
09:43 UTC

Back To Top