/r/DoomEmacs
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
Im trying to use haskell with emacs doom and it used to work, but after upgrading recently it shows me this error and lsp doesn't load. I tried configuring the packages manually to no avail and im stuck, any help would be welcome.
LSP :: There are no language servers supporting current mode `haskell-mode' registered with `lsp-mode'.
This issue might be caused by:
1. The language you are trying to use does not have built-in support in `lsp-mode'. You must install the required support manually. Examples of this are `lsp-java' or `lsp-metals'.
2. The language server that you expect to run is not configured to run for major mode `haskell-mode'. You may check that by checking the `:major-modes' that are passed to `lsp-register-client'.
3. `lsp-mode' doesn't have any integration for the language behind `haskell-mode'. Refer to https://emacs-lsp.github.io/lsp-mode/page/languages and https://langserver.org/ .
4. You are over `tramp'. In this case follow https://emacs-lsp.github.io/lsp-mode/page/remote/.
5. You have disabled the `lsp-mode' clients for that file. (Check `lsp-enabled-clients' and `lsp-disabled-clients').
You can customize `lsp-warn-no-matched-clients' to disable this message.
I added this in my packages.el:
(package! pdf-tools :recipe(:post-build (pdf-tools-install nil t nil nil)))
When running doom sync, it even prompts me asking if I want to rebuild epdfinfo, but when I actually run Emacs, it asks me to run M-x pdf-tools-install.
Just to clarify, it does work if I run the command manually but I'm looking for a way to have it done automatically when I run doom sync.
Update: The issue is solved. Thanks to Eyoel999Y for the Elisp. I've added some minor modifications to avoid hardcoding paths, so this is the full solution that can go into packages.el
(defun doom-straight-repo-dir (package)
"Return the repository directory for a package"
(let ((repo-path (expand-file-name
(concat "straight/repos/" package)
doom-local-dir)))
(if (file-directory-p repo-path)
repo-path
(error "Repository directory not found for package: %s" package))))
(defun doom-straight-build-dir (package)
"Return the build directory for a package."
(let ((build-path (expand-file-name
(concat "straight/build-" emacs-version "/" package)
doom-local-dir)))
(if (file-directory-p build-path)
build-path
(error "Build directory not found for package: %s" package))))
(defun custom/build-epdfinfo ()
"Build the PDF Tools epdfinfo binary using make, also display the outputs into the terminal."
(let* ((repo-dir (expand-file-name (concat (doom-straight-repo-dir "pdf-tools") "/")))
(build-dir (expand-file-name (concat (doom-straight-build-dir "pdf-tools") "/")))
(binary-path (concat build-dir "epdfinfo"))
(makefile (concat repo-dir "Makefile"))
(default-directory repo-dir)
(make-command (format "make -f %s -C %s server/epdfinfo" makefile repo-dir)))
(if (file-exists-p binary-path)
(print! (item "epdfinfo binary already exists. Skipping build."))
(progn
(print! (start "Building PDF Tools epdfinfo binary..."))
(unless (file-exists-p build-dir)
(make-directory build-dir t))
(let ((result (call-process-shell-command make-command nil nil t)))
(if (zerop result)
(progn
(print! (success "PDF Tools epdfinfo binary built successfully."))
(if (file-exists-p (concat repo-dir "server/epdfinfo"))
(copy-file (concat repo-dir "server/epdfinfo") binary-path t)
(print! (error "Build succeeded, but epdfinfo binary not found in server/"))))
(print! (error "Failed to build PDF Tools epdfinfo binary. Check the terminal output."))))))))
(package! pdf-tools
:recipe (
:post-build (custom/build-epdfinfo)
)
)
Let's say I tap SPC-w, after a second or so, the which-key buffer appears with all available options depending on the next key.
Is there a way to quickly search (maybe hightlight something I'm looking for?). I initially typed / expecting a vim like search, but obviously / search is not available as / could be a key coding for an action.
Is search possible ?
I'm new to doom emacs; is this command usually safe? (no disruption from newly introduced bugs?)
I'm not too sure about the order in which the tabs are saved to a session, but it seems to get shuffled. I'm not sure if I'm looking in the right place, but I found this:
(cl-defun persp-save-state-to-file
(&optional
(fname persp-auto-save-fname) (phash *persp-hash*)
(respect-persp-file-parameter persp-auto-save-persps-to-their-file)
(keep-others-in-non-parametric-file 'no))
(interactive (list (read-file-name "Save perspectives to a file: "
persp-save-dir "")))
So, is it sorting it by the hash? I'm not sure I understand what was the reasoning for this instead of saving it in the same order in which the buffers were opened.
Hello.
Is anyone using both org-mode and any dot-net language? (It doesn't seem to be a popular combination).
I have been using org-mode on and off for a few years, and very gradually increasing the number of features I use. In development I mostly use .Net based languages, I really enjoy writing in F# and in C#.
I am trying to write and execute C# and F# code blocks in org-mode, but having to much success.
org-babel is trying to use Mono to run C#.
I do have (csharp +dotnet)
configured in DoomEmacs, but that doesn't seem to change any org-babel settings.
Has anyone done this before, and maybe know what to set, or configure to have this working?
Thanks, if anyone is able to help :)
I recently upgraded doom emacs (doom upgrade
) after many months. I feel like line spacing is reduced and some characters in consecutive lines and the same column are overlapping (like g in one line and I in the line below). Example image URL. I am using PragmataPro font.
Has anybody faced similar problem?
When I start a capture using a template to capture a new entry to a header in the same buffer I am working on, my cursor is systematically moved to the capture target location after finalizing the process with `C-c C-c`. This is not linked to the use or misuse of the `jump-to-captured` option.
This does not happen with `emacs -Q`, how can I start Doom without loading my config to find out if it is coming from it ?
Today I upgraded doom emacs using doom upgrade
. I didn't notice any error in the logs. However, after opening an org file, I get the following error- (file-missing Cannot open load file No such file or directory emacsql-sqlite)
. Has anybody faced this issue? Tried setting everything from scratch and still faced the same issue. Also, doom doctor is not showing this error.
I think this is due to org-roam but not sure. I used this commit 7bc39f2c1
of doom emacs repo.
I have tried the following:
(after! dashboard
(defun my/open-treemacs-workspace ()
"Open Workspace."
(interactive)
(let ((workspace (completing-read "Select workspace: " (treemacs-workspaces))))
(if workspace
(treemacs-switch-workspace workspace)
(message "No workspace selected"))))
(add-to-list 'dashboard-items '(open-workspace . 1))
(setq dashboard-footer-messages
'("Press SPC w o to open a Treemacs workspace."))
(define-key dashboard-mode-map (kbd "SPC w o") 'my/open-treemacs-workspace)
(dashboard-refresh-buffer))
What am I doing wrong?
I am currently confused by the session saving/loading and workspace saving/loading.
Here is what I would like to do.
I have multiple frames open likely with different projectile projects. With split windows. And some org buffers.
I would like to save frame specific (buffers, files, layout, project, repl, org files etc) and load them on a new frame, after an emacs restart.
After restarting emacs, I would create a new empty frame and load the whole shebang on that frame.
Is that possible? Various bits seem to work with various commands but the split windows and not coming back.
I have this in packages.el
to install eat:
(package! eat
:recipe (:host codeberg
:repo "akib/emacs-eat"
:files ("*.el" ("term" "term/*.el") "*.texi"
"*.ti" ("terminfo/e" "terminfo/e/*")
("terminfo/65" "terminfo/65/*")
("integration" "integration/*")
(:exclude ".dir-locals.el" "*-tests.el"))))
For some reason, it is very slow when printing colored text. In particular, I'm looking at eza -la
, which an alternative to ls -la
. The same thing happens with bat
.
When I run eat in emacs -Q
though, this problem doesn't happen and it gets printed fast. I've tried disabling all the minor modes in the eat buffer and even all the global minor modes, but it's still slow in Doom Emacs; it prints a few lines, and then it's stuck, then it prints a a few more lines, and keeps going until the whole thing is printed.
I've tried it with a stock, brand-new Doom config and its the same thing. I have found though, that if I do a emacs --eval asd
, then it will error out at some point before loading the full config, and it'll print just a little faster, but still slower than vanilla Emacs.
Does anyone have a solution to this problem / use eat in Doom Emacs without this issue?
I can get kinda wordy, my mind wanders in different directions all the time. And I like typing too (I need to write a book maybe).
I've always been a GUI type person. Even in my Commodore years when I had GEOS for the Commodore. I loved that and I think it really prepared me for the PC and Windows 3.0. So, from GEOS occasionally on the C=64 to Windows... I've been 95% a GUI person. Yes, I still used some things at the DOS Prompt. Even the C=64 had a prompt. 'LOAD "*",8,1
' was a very typical thing to enter at a command prompt for those units. Basically, it loaded the first program (usually the only program at the root level of a floppy disk) into memory. So, if you had any game in the floppy drive, that command would start the game.
But when Windows came into the fold, yes, there were still programs I used at the command prompt level. Norton Commander (nc) was one of them. It was a command line file manager with 2 panes. So I could go to a directory on one side and then a different directory on the other side and I could copy files between those 2 locations. It worked really well if you wanted to copy, say, a resume over to a floppy disk from your Documents. Norton Commander did this rather quickly as opposed to Windows File Manager.
I've used other DOS based programs in the past. But since switching to Linux almost 6.5 years now, I still occasionally use the terminal/command line. Ever since I started using Arch, I use the terminal more so than I did with Linux Mint because of the update procedure I use which utilizes the command line. But, ya know... I'm 100% okay with that! I'm really comfortable at a command line because that's really where I started (actually had a TI-99/4A... had to remember what it was... From the early 80s. I Kinda had TS 1 but that was not it... Then, I remembered what it was). So, that was my first foray into keyboard usage at a command line. This is basically what it looked like. You connected it to a TV.
Anyway, you get my point. I knew a lot with command line structures back in the day. Hell, I used MS DOS more than Windows 3.0 when it came out. In fact, for about a year, I refused to put that on my computer. I had all the programs I needed at the DOS prompt level. I even used the DOS version of Word Perfect! I was set with DOS applications and I was perfectly happy with them. I honestly don't know what made me switch to Windows. Probably my best friend in high school was using Windows and he always had great thins to think about it. I started using Windows just before Windows 3.1 came out. Windows 3.0 was pretty archaic even back then.
But, even though, I'm still somewhat of a command line lover, Doom Emacs really isn't a command line application. Not really. I mean, it may look like a command line application like vim, but I don't think it is. I think it's WAY more powerful than vim. I mean, it looks just like a command line interface so I don't know. Maybe it is. But I've heard it described as a GUI tool and not a command line tool. Using things like minimap
seems to make it less Command line level and more GUI. But, just now opening it at a command line terminal (typing emacs
) it does look like a command line utility. There's definitely a difference in look between Emacs from a command line and Emacs from my menu system in my TWM.
So, there is a visual difference between the two. I'm using the GUI version (launching it from the menu/hot keys) over the CLI version but I think they work exactly the same.
But, case in point... I can open the minimap in the GUI, I can't open it in the Command Line version. Even though, the CLI version is using the same config file (I think it is anyway) as the GUI version, I cannot open the minimap in the CLI version.
Which brings up an interesting question... Is the CLI version using what's in the Emacs folder and Doom Emacs is using what's in the Doom folder? Or are they mutually exclusive? I don't think Emacs at the command line is looking at the Doom folder. Simply because some of the modifications I made (like adding Beacon to the packages.el file the other day) in Doom, aren't working in Emacs-CLI. So I think they are 2 different entities there.
So, what are y'alls perspective to everything I've mentioned? There is a lot here! I know! But give it a whirl.
I have multiple org-files. When I open the org-agenda I want all the things that I scheduled in all the files to show up. I tried to add multiple things to my config.el file, but is still doesnt work. These are the things that I tried:
- (setq org-agenda-files
(find-lisp-find-files "~/org" "\\.org$"))
(setq org-agenda-files (list "path/folder/*.org"))
(setq org-agenda-files (list "path/folder/*.org"))
(setq org-agenda-files (file-expand-wildcards "path/folder/*.org"))
(setq org-agenda-files (file-expand-wildcards "path/folder/*.org"))
I've been using vim for a couple of years off and on so I pretty much have the basics down. I tried Doom Emacs maybe a year and a half ago and I did something to the config file. I broke it and I had this screen come up and it was just all messed up with error messages and whatnot. So, I stopped using it.
One of the streamers I frequent, uses Doom Emacs all the time on his channel. I would love to get back into it. I'm on a brand new computer (built it this past July) so, reinstalling Emacs with Doom gives me a whole new start.
Using the Doom Emacs Website, I was able to install it pretty easily. And I've installed it before. It's a little different now. It no longer looks for doom in ~/.emacs.d/bin... So, the documentation on the website helped figure that out.
But, I have it installed and it's functioning. I'm kind of getting used to the key bindings a little bit. The vim keys still work for most of what I need to do with it. But I'm also learning how to kill buffers, opening files with Space-. and things like that. I've even learned how to get the emacs daemon running. That's pretty handy actually! It's a lot quicker because that daemon stays running in the background which is nice and it doesn't use a whole lot of RAM doing it. So, that's something new for me. Getting it running with the emacs daemon.
So, I think I've got a little better grasp of Doom Emacs at the moment. I'd love to keep learning and I've found this document showing (I'm hoping) all of the default keybindings. I'd also like to add some keybindings in the future as soon as I can figure out what I'll use more.
But yeah. I hope to stick with it this time. I'll be coming here looking for references to different things I can do with it. Hopefully, I can stick with it and not break it again. Crossing my fingers!
[SOLVED] It's really annoying and i can not control selection of word with M-d for multi-edit,
Hey! I'm new to Doom Emacs, and have been struggling to get ligatures to work. When consulting with the doctor, I get the following:
> :ui ligatures
! The (:ui ligatures) module does not support your version of Emacs. Make sure to have at least Emacs 28 with Harfbuzz configured (should be the default).
I find this confusing as I have GNU Emacs 29.3
installed, which is more recent than Emacs 28 and thus should have support for Harfbuzz (if I understood this correctly)...
To clarify, I haven't set up any prettify-symbols, since according to this, prettify-symbols is only used as a fallback if Harfbuzz isn't present.
Edit: It seems as though my Emacs just doesn't install Harfbuzz, no matter what I try... I checked the system-configuration-features
variable via C-h v
and it doesn't include HARFBUZZ
or anything similar to it, so I suppose I really don't have it built into my Emacs, even after reinstalling it. I'm honestly at a loss as to how I'm supposed to build Emacs with Harfbuzz support, so if anyone knows, I'd greatly appreciate the help.
Hi all, I have been trying to setup lsp-java on my doom emacs, I am a new emacs user, and I have no idea what's going on :(
https://imgur.com/a/edEENnU
In the ~/.doom.d/init.el I have turned on :lang ( java + lsp) and install flycheck, and not sure what's going on :/ anything that I can do ? thank you
Hello I'm quite new to doom emacs, and I'm trying to rebind <C-s> to save the current buffer, but isearch keeps popping up instead
when i'm in emacs gui i see the cursor become like a line however when i'm in terminal when i switch to insert mode i don't see the cursor become like a line it's just annoying as i've to look to the bar below to check wheather i'm in insert mode>!​!<
I noticed earlier today that running `doom/help-packages` was not building the packages list, and echoing a message I do not remeber exactly saying something was off with Emacs tags. Sounded like a git issue to me, I thought maybe an OS update messed up some pacakge compatibility or something in that vein.
I just ran `doom upgrade` succesfully, fird up Emacs, and retried `doom/help-packages` out of curiosity. It still is not working, I get a `(wrong-type-argument arrayp nil)` error now. Doom doctor sees no issue, I have checked doom-module-context, it is the default value, `doom-module-packages-file` is set to "packages.el", I have never messed with that part of Doom anyway.
It is not a breaking issue, but it is annoying, any help would be appreciated, thanks.
Again, some updates, and now I get this retarded comments. Anyone using typescript-ts-mode
?
Hey, I program solely in C/C++, is there any guide for setting up doom emacs for C programming where I can hop to defination and implementations in my codebase. And should have intellisense for large codebase. Also is how can I add my personal key bindings like el instead of $ for end line jump. Also I use XMake so if there is any plugin that generates compile-commands.json from it then please tell me.
If there already is an answer please share the link to it.
I have an M1 macbook pro and everytime i run: git clone https://github.com/hlissner/doom-emacs ~/.emacs.d
~/.emacs.d/bin/doom install
it gives the error "zsh: no such file or directory: /Users/MyUsername/.emacs.d/bin/doom"
I'm running emacs --daemon and emacsclient
When I make change to a config.el and run eval-buffer it works fine but only once. So if I make another change and run eval-buffer again, changes wouldn't be applied. To apply changes I have to restart daemon (same after restart. eval-buffer would work once)
is there a way to show combined (any) emphasis on the org mode?
i.e. i want /bold italic/ or /italic underline/ or =verbatim bold= or even =/triple markup/=
nb: i use ==, ~~ and ++ as highlighter
i've read and searched the interned it actually still works if i export it, and it just did not showed on fontify.
the thing is, i just use doom emacs as my note taking app, so i dont do any export and just stick with the .org file.
I've been having a rough time getting bookmark-plus to load under doom. Trying to do this using the github mirror for emacswiki: https://github.com/emacsmirror/bookmark-plus
Here's the declared install in my config:
(package! bookmark-plus :recipe (
:host github
:repo "/emacsmirror/bookmark-plus"
:files ("*.el")))
When I run doom sync it recognizes and compiles the package, though commands still don't seem to pop up when I m-x for them. What am I doing wrong here?
Every time I try to reload my doom emacs config with SPC h r r, a doom.ps1 window opens up.
Is this normal? If not, how do I solve this?
For those of us, who are bound to jvm and android development (and, subsequently, to jetbrains IDEs), this plugin lets us replicate a mighty SPACE button leader key in conjunction with IdeaVim. It is simple, yet effective tool to emulate doom emacs experience.
Hi folks!
Jumped to Emacs as I admire org mode from neovim.
One annoying think I can't figure out is that lsp-mode seems to be very laggy. If I only have one buffer of a project open it is all good. The moment I open 2 buffers something breaks loose and the cursor starts blinking vigorously and navigation is painfully laggy (still kinda works)
I have Emacs 29 and native comp enabled (lsp doctor says all Ok) actually tried the lap booster ..does seem to help somewhat but still choppy in particular compared to neovim.
Any ideas?
Using rustic mode with lsp mode. But the same issue happens on eglot.