diff --git a/demo.nix b/demo.nix index 22630210504a1b51a4bcc3358981ecef2958f004..df11a168a09dcda2b994655dcf3f3a7482609a58 100644 --- a/demo.nix +++ b/demo.nix @@ -4,5 +4,5 @@ let ghotl-repl = (import ./ghotl-repl.nix { inherit pkgs; }); in mkShell { name = "ghotl"; - buildInputs = [ emacs ghotl ghotl-repl ]; + buildInputs = [ (import ./emacs.nix) ghotl ghotl-repl ]; } diff --git a/emacs.nix b/emacs.nix index 43116885ebc4ad547c2376b669e05518ed643052..ce30d40241c60524dd1408d999672788b42fd3f6 100644 --- a/emacs.nix +++ b/emacs.nix @@ -11,15 +11,17 @@ let :config (evil-mode)) (use-package haskell-mode :bind ("C-c C-c" . haskell-compile)) - ;(use-package ghc) (global-whitespace-mode) (setq whitespace-style '(tab-mark face trailing tabs)) + (defun ghotl-eval () "" () + (shell-command-on-region (point-min) (point-max) "ghotl" "*GHOTL Output*") + (display-buffer "*GHOTL Output*")) + (global-set-key (kbd "C-c C-e") (lambda () (interactive) (ghotl-eval))) ''; }; emacs = pkgs.emacsWithPackages (ps: with ps; [ evil markdown-mode haskell-mode - ghc-mod nix-mode magit use-package