diff options
Diffstat (limited to '+lang.el')
| -rw-r--r-- | +lang.el | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/+lang.el b/+lang.el new file mode 100644 index 0000000..1cbfe38 --- /dev/null +++ b/+lang.el @@ -0,0 +1,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))) |
