Sender | Message | Time |
---|---|---|
14 Jan 2025 | ||
nbp | Julien: I am still using spacemacs, but I am migrating to a hand made config based home manager to provide all packages and symlink the
| 18:50:34 |
cor changed their profile picture. | 20:20:51 | |
cor changed their profile picture. | 20:23:31 | |
16 Jan 2025 | ||
amadaluzia joined the room. | 01:11:15 | |
18 Jan 2025 | ||
peterzky joined the room. | 02:42:47 | |
Stephen D | Do people use emacs client/daemon with nix? One practical issue I've run into is I might want to spawn an emacs from within my nix develop environment, which doesn't work with the daemon | 05:14:29 |
Stephen D | so right now I'm using a mixture of emacsclient and normal emacs depending on if I can get away with the former or not | 05:14:42 |
Solid | Stephen D: envrc is generally pretty good at keeping up with changing environments | 06:36:10 |
@d:arcticfoxes.net joined the room. | 13:56:59 | |
@d:arcticfoxes.net left the room. | 13:57:05 | |
Stephen D | In reply to @slot-:matrix.orgRight but that won't propagate it onto the emacs daemon will it? | 14:01:44 |
Stephen D | Because that's where problems arise | 14:01:55 |
antifuchs | The envrc emacs package should! It runs inside emacs after all (so, inside the server) | 15:22:11 |
antifuchs | Ah, but if I read your question right, you want the development shell in your terminal to have emacsclient connect to the right server? | 15:22:56 |
Stephen D | Yeah exactly | 15:23:08 |
Stephen D | Maybe I'll provide an example to make the problem less abstract. Say I am working on some rust project that requires some C bindings to be installed. Because I use LSP, I need emacs to run in the environment with those C bindings, otherwise compilation (within my LSP server) will fail. This is fine when I use emacs inside of that env but using emacsclient doesn't work, presumably because the LSP is running under the emacs daemon | 15:24:29 |
antifuchs | Ah, yep, in that case definitely check out envrc-mode also! | 16:27:42 |
Stephen D | I don't understand how envrc-mode helps? The server will still be running in the wrong context, won't it? | 16:29:53 |
antifuchs | It will set up the correct execution environment for processes spawned by lsp-mode (and generally in your project); that tends to be sufficient for getting a nix devshell’s env into dev tools | 16:33:23 |
João Moreira joined the room. | 16:35:36 | |
starlit | In reply to @rczb:envs.nethm nixd is fast but it uses too much memory... linux oom killed it sometimes | 18:28:04 |
starlit | likely a memory leaking bug somethin | 18:29:00 |
Stephen D | In reply to @antifuchs:asf.computerBut aren't those executed under the daemon? | 18:31:37 |
Stephen D | If I do nix develop and then emacsclient lsp-mode doesn't have the context of nix develop . Does envrc change this? | 18:32:03 |
antifuchs | correct, it'll be the emacs daemon executing the commands. That's why envrc-mode sets environment variables like PATH on the commands executed by the daemon, according to the direnv settings for the project you're working on. that is, it doesn't matter if you launch emacsclient from the nix shell or not - what matters is that emacs (daemon or not) knows the environment for the project you're working on. | 20:47:23 |
antifuchs | if you launch emacs from the commandline with the shell active, that's trivially the case: the environment gets inherited by emacs. but then you can only effectively work on that project | 20:47:54 |
antifuchs | with envrc-mode, you can work on multiple project and they'll all have the nix shell active inside emacs, depending on what project's buffer you have open | 20:48:26 |
ge24z009 | Hi, I build this overlay for Emacs builds with the new concurrent/incremental garbage collector (branch: feature/igc). Mostly meant for personal use and I will try creating a pull request to the official community overlay once I get the time. I am not sure how I can keep my newly defined derivation inputs inside of their | 21:12:07 |
Stephen D | In reply to @antifuchs:asf.computerhmm okay. sounds like it will work then | 21:13:14 |
Stephen D | ty! | 21:13:15 |