feat(emacs): Haskell

This commit is contained in:
Madeleine Sydney
2025-03-02 20:50:53 -07:00
parent cf8b6e7ba1
commit 3dbaa864d4
10 changed files with 242 additions and 2 deletions

View File

@@ -1,5 +1,17 @@
;;; syd-tooling.el -*- lexical-binding: t; -*-
(defun syd-lsp-lookup-documentation ()
(interactive)
(when-let* ((buf (get-buffer "*lsp-help*")))
(kill-buffer buf))
(call-interactively #'lsp-describe-thing-at-point)
(let ((buf (get-buffer "*lsp-help*")))
(when (get-buffer-window-list buf)
;; Bury the buffer so the popup system has full control over how it's
;; selected.
(bury-buffer buf)
buf)))
(use-package lsp-mode
:init
;; We'll bind things ourselves.
@@ -25,7 +37,13 @@
(user-error (concat "Ignoring a call to `lsp-install-server'"
" — tell the caller to use Nix!")))
(set-popup-rule! (rx line-start "*lsp-" (or "help" "install"))
:size 0.35 :quit t :select nil))
:size 13 :quit t :select nil)
;; DEPRECATED: Remove once syd-strategies is working.
(syd-add-hook 'lsp-mode
(defun syd-lsp-set-handlers-h ()
(setq-local syd-lookup-documentation-handlers
(list #'syd-lsp-lookup-documentation)))))
(use-package envrc
;; REVIEW: Can we load this any later/better?