blob: 1cbfe383495eb7f03bbfd6d7817e1a8faa493f29 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
;;; $DOOMDIR/+lang.el -*- lexical-binding: t; -*-
(after! eglot
(cl-defmethod eglot-register-capability
(server (method (eql workspace/didChangeWatchedFiles)) id &key watchers)
nil))
(setq eglot-sync-connect nil
eglot-connect-timeout 60)
(defun my/hs-eval ()
(interactive)
(let* ((src (buffer-file-name))
(out (file-name-sans-extension src)))
(when (zerop (call-process-shell-command
(format "runghc %s" src) nil "*runghc-output*"))
(let ((buf (make-comint "hs-run" out)))
(display-buffer buf)))))
(add-hook 'haskell-mode-hook
(lambda ()
(local-set-key (kbd "<f5>") #'my/hs-eval)))
|