aboutsummaryrefslogtreecommitdiff
path: root/+lang.el
diff options
context:
space:
mode:
authorZofia Szweda <sophies@disroot.org>2026-09-17 20:06:07 +0200
committerZofia Szweda <sophies@disroot.org>2026-09-17 20:07:35 +0200
commitcbf846b3b78fc304b87bf71664024a90abfce5e0 (patch)
treeb93649222d44f38e2a2ab41630b0a001fe7cfff4 /+lang.el
parente9e7242c898563bfa57ba32fc50d5dff45309983 (diff)
emacs: modularize emacs config
Diffstat (limited to '+lang.el')
-rw-r--r--+lang.el19
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)))