feat(sterni/emacs): enable server and include emacsclient

Change-Id: Icaf22595c774bdceb7e79f5302cde8d039aa3b09
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5401
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
This commit is contained in:
sterni 2022-03-24 11:27:21 +01:00 committed by clbot
parent 98371362f2
commit 8e85079012
2 changed files with 11 additions and 2 deletions

View file

@ -65,10 +65,16 @@ let
in in
# sadly we can't give an init-file via the command line # sadly we can't give an init-file via the command line
pkgs.writeShellScriptBin "emacs" '' (pkgs.writeShellScriptBin "emacs" ''
exec ${emacs}/bin/emacs \ exec ${emacs}/bin/emacs \
--no-init-file \ --no-init-file \
--directory ${configDirectory} \ --directory ${configDirectory} \
--eval "(require 'init)" \ --eval "(require 'init)" \
"$@" "$@"
'' '').overrideAttrs (super: {
buildCommand = ''
${super.buildCommand}
ln -s "${emacs}/bin/emacsclient" "$out/bin/emacsclient"
'';
})

View file

@ -248,6 +248,9 @@
(evil-define-key 'normal 'global (kbd "<leader>ls") 'languagetool-set-language) (evil-define-key 'normal 'global (kbd "<leader>ls") 'languagetool-set-language)
(evil-define-key 'normal 'global (kbd "<leader>lr") 'languagetool-clear-buffer)) (evil-define-key 'normal 'global (kbd "<leader>lr") 'languagetool-clear-buffer))
(unless (server-running-p)
(server-start))
(require 'subscriptions) (require 'subscriptions)
(require 'nix-inject) (require 'nix-inject)